diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/auditor-report.tex.j2 | 326 | ||||
-rwxr-xr-x | contrib/render.py | 14 |
2 files changed, 247 insertions, 93 deletions
diff --git a/contrib/auditor-report.tex.j2 b/contrib/auditor-report.tex.j2 index 28c40f88d..ccb249dd3 100644 --- a/contrib/auditor-report.tex.j2 +++ b/contrib/auditor-report.tex.j2 @@ -64,51 +64,58 @@ This report is based on a template licensed under the Affero General Public License, either version 3, or (at your option) any later version. The source code for the template is available at \url{https://git.taler.net/}. -The report was generated by the auditor started at -{\bf {{ data.auditor_start_time }} } and concluded at -{\bf {{ data.auditor_end_time }} }. +The report was generated by the auditors at the following times: -In that time, the auditor processed the following table ranges: +\begin{table}[h!] +\begin{center} +\begin{tabular}{l|r|r} + Auditor & Start & End \\ \hline \hline + Aggregation & {{ aggregation.auditor_start_time }} & {{ aggregation.auditor_end_time }} \\ \hline + Coins & {{ coins.auditor_start_time }} & {{ coins.auditor_end_time }} \\ \hline + Deposits & {{ deposits.auditor_start_time }} & {{ deposits.auditor_end_time }} \\ \hline + Reserves & {{ reserves.auditor_start_time }} & {{ reserves.auditor_end_time }} \\ \hline + Wire & {{ wire.wire_auditor_start_time }} & {{ wire.wire_auditor_end_time }} \\ +\end{tabular} +\end{center} +\end{table} + +In that time, the auditors processed the following table ranges: \begin{table}[h!] \begin{center} \begin{tabular}{l|r|r} Table & Start & End \\ \hline \hline - Reserves Incoming & {{ data.start_ppr_reserve_in_serial_id }} - & {{ data.end_ppr_reserve_in_serial_id }} \\ \hline - Reserves Out (withdraw) & {{ data.start_ppr_reserve_out_serial_id }} - & {{ data.end_ppr_reserve_out_serial_id }} \\ \hline - Reserves Recoup & {{ data.start_ppr_reserve_recoup_serial_id }} - & {{ data.end_ppr_reserve_recoup_serial_id }} \\ \hline - Reserves Close & {{ data.start_ppr_reserve_close_serial_id }} - & {{ data.end_ppr_reserve_close_serial_id }} \\ \hline - Aggregation & {{ data.start_ppa_wire_out_serial_id }} - & {{ data.end_ppa_wire_out_serial_id }} \\ \hline - Coin withdraw & {{ data.start_ppc_withdraw_serial_id }} - & {{ data.end_ppc_withdraw_serial_id }} \\ \hline - Coin deposit & {{ data.start_ppc_deposit_serial_id }} - & {{ data.end_ppc_deposit_serial_id }} \\ \hline - Coin melt & {{ data.start_ppc_melt_serial_id }} - & {{ data.end_ppc_melt_serial_id }} \\ \hline - Coin refund & {{ data.start_ppc_refund_serial_id }} - & {{ data.end_ppc_refund_serial_id }} \\ \hline - Coin recoup & {{ data.start_ppc_recoup_serial_id }} - & {{ data.end_ppc_recoup_serial_id }} \\ \hline - Coin recoup refresh & {{ data.start_ppc_recoup_refresh_serial_id }} - & {{ data.end_ppc_recoup_refresh_serial_id }} \\ + Reserves Incoming & {{ reserves.start_ppr_reserve_in_serial_id }} + & {{ reserves.end_ppr_reserve_in_serial_id }} \\ \hline + Reserves Out (withdraw) & {{ reserves.start_ppr_reserve_out_serial_id }} + & {{ reserves.end_ppr_reserve_out_serial_id }} \\ \hline + Reserves Recoup & {{ reserves.start_ppr_reserve_recoup_serial_id }} + & {{ reserves.end_ppr_reserve_recoup_serial_id }} \\ \hline + Reserves Close & {{ reserves.start_ppr_reserve_close_serial_id }} + & {{ reserves.end_ppr_reserve_close_serial_id }} \\ \hline + Aggregation & {{ aggregation.start_ppa_wire_out_serial_id }} + & {{ aggregation.end_ppa_wire_out_serial_id }} \\ \hline + Coin withdraw & {{ coins.start_ppc_withdraw_serial_id }} + & {{ coins.end_ppc_withdraw_serial_id }} \\ \hline + Coin deposit & {{ coins.start_ppc_deposit_serial_id }} + & {{ coins.end_ppc_deposit_serial_id }} \\ \hline + Coin melt & {{ coins.start_ppc_melt_serial_id }} + & {{ coins.end_ppc_melt_serial_id }} \\ \hline + Coin refund & {{ coins.start_ppc_refund_serial_id }} + & {{ coins.end_ppc_refund_serial_id }} \\ \hline + Coin recoup & {{ coins.start_ppc_recoup_serial_id }} + & {{ coins.end_ppc_recoup_serial_id }} \\ \hline + Coin recoup refresh & {{ coins.start_ppc_recoup_refresh_serial_id }} + & {{ coins.end_ppc_recoup_refresh_serial_id }} \\ \end{tabular} \end{center} \caption{Serial number ranges of the tables processed by the audit.} \label{table:auditor_range} \end{table} -The report was generated by the wire auditor started at -{\bf {{ wire.wire_auditor_start_time }} } and concluded at -{\bf {{ wire.wire_auditor_end_time }} }. - {% if wire.account_progress|length() == 0 %} -In that time, the auditor processed NO accounts at all. +In that time, the wire auditor processed NO accounts at all. {% else %} -In that time, the auditor processed the following table ranges: +In that time, the wire auditor processed the following table ranges: \begin{center} \begin{longtable}{l|c|r|r} Account & Table & Start & End \\ \hline @@ -136,19 +143,21 @@ In that time, the auditor processed the following table ranges: \section{Operations} The balance of the escrow account should -be {\bf {{ data.total_escrow_balance }}}. +be {\bf {{ coins.total_escrow_balance }}} (coins) +plus {\bf {{ reserves.total_escrow_balance }}} (reserves). \noindent The active operational risk stands at -{\bf {{ data.total_active_risk }}}. +{\bf {{ coins.total_active_risk }}}. \noindent Loss (actualized risk from recoups) is -{\bf {{ data.total_recoup_loss }}}. +{\bf {{ coins.total_recoup_loss }}}. \noindent Recoups of non-revoked coins are at -{\bf {{ data.total_irregular_recoups }}}. +{\bf {{ coins.total_irregular_recoups }}} (coins) +plus {\bf {{ reserves.total_irregular_recoups }}} (reserves). \section{Income} @@ -160,12 +169,11 @@ This section analyzes the income of the exchange operator from fees. \label{table:revenue} \begin{tabular}{l|r} Category & Amount \\ \hline \hline - Withdraw fees & {{ data.total_withdraw_fee_income }} \\ - Deposit fees & {{ data.total_deposit_fee_income }} \\ - Melt fees & {{ data.total_melt_fee_income }} \\ - Refund fees & {{ data.total_refund_fee_income }} \\ - Aggregation fees & {{ data.total_aggregation_fee_income }} \\ \hline \hline - {\bf Total} & {{ data.income_fee_total }} \\ + Withdraw fees & {{ reserves.total_withdraw_fee_income }} \\ + Deposit fees & {{ coins.total_deposit_fee_income }} \\ + Melt fees & {{ coins.total_melt_fee_income }} \\ + Refund fees & {{ coins.total_refund_fee_income }} \\ + Aggregation fees & {{ aggregation.total_aggregation_fee_income }} \\ \end{tabular} \end{center} \end{table} @@ -297,15 +305,15 @@ and should be answered by revoking the exchange's online siging keys. % TODO: maybe reference PhD thesis on this? The total amount the exchange currently lags behind is -{\bf {{ data.missing_deposit_confirmation_total }} } from a total number of -{\bf {{ data.missing_deposit_confirmation_count }} } deposit confirmations. +{\bf {{ deposits.missing_deposit_confirmation_total }} } from a total number of +{\bf {{ deposits.missing_deposit_confirmation_count }} } deposit confirmations. Note that some lag is perfectly normal. Below, we report {\em all} deposit confirmations that are lagging behind. % Table generation tested by testcase #24 in test-auditor.sh -{% if data.deposit_confirmation_inconsistencies|length() == 0 %} +{% if deposits.deposit_confirmation_inconsistencies|length() == 0 %} {\bf No deposit confirmations that are lagging behind detected.} {% else %} \begin{longtable}{r|r|r} @@ -325,7 +333,7 @@ Below, we report {\em all} deposit confirmations that are lagging behind. \caption{Missing deposit confirmations.} \label{table:missing_dc} \endlastfoot -{% for item in data.deposit_confirmation_inconsistencies %} +{% for item in deposits.deposit_confirmation_inconsistencies %} {{ item.timestamp }} & {{ item.amount }} & {{ item.rowid }} \\ @@ -355,18 +363,18 @@ exposure} is the amount of coins in circulation for a particular denomination and the maximum loss for the exchange from this type of compromise. -{% if (data.emergencies|length() != 0) %} +{% if (coins.emergencies|length() != 0) %} The total risk from emergencies detected by amount is -{\bf {{ data.emergencies_risk_by_amount }} }. +{\bf {{ coins.emergencies_risk_by_amount }} }. The total loss from emergencies detected by amount is -{\bf {{ data.emergencies_loss }} }. +{\bf {{ coins.emergencies_loss }} }. {% endif %} -{% if (data.emergencies_by_count|length() != 0) %} +{% if (coins.emergencies_by_count|length() != 0) %} The total risk from emergencies detected by counting coins is -{\bf {{ data.emergencies_risk_by_count }} } +{\bf {{ coins.emergencies_risk_by_count }} } The total loss from emergencies detected by counting coins could be up to -{\bf {{ data.emergencies_loss_by_count }} }. +{\bf {{ coins.emergencies_loss_by_count }} }. {% endif %} @@ -374,7 +382,7 @@ The total loss from emergencies detected by counting coins could be up to % Table generation tested by testcase #18 in test-auditor.sh -{% if data.emergencies_by_count|length() == 0 %} +{% if coins.emergencies_by_count|length() == 0 %} {\bf No emergencies detected by counting coins.} {% else %} \begin{longtable}{r|c|r|r} @@ -391,7 +399,7 @@ The total loss from emergencies detected by counting coins could be up to \caption{Emergencies by counting coins.} \label{table:emergencies_coin_counting} \endlastfoot -{% for item in data.emergencies_by_count %} +{% for item in coins.emergencies_by_count %} \multicolumn{4}{l}{ {\tt \truncate{0.95\textwidth}{ {{ item.denompub_hash }} } } } \\ \nopagebreak {{ item.value }} & @@ -416,7 +424,7 @@ indicator that the exchange's private signing key was compromised. % Table generation tested by testcases #18, #25 in test-auditor.sh -{% if data.emergencies|length() == 0 %} +{% if coins.emergencies|length() == 0 %} {\bf No emergencies by value detected.} {% else %} \begin{longtable}{r|c|r|r} @@ -433,7 +441,7 @@ indicator that the exchange's private signing key was compromised. \caption{Emergencies by value deposited.} \label{table:emergencies} \endlastfoot -{% for item in data.emergencies %} +{% for item in coins.emergencies %} \multicolumn{4}{l}{ {\tt \truncate{0.95\textwidth}{ {{ item.denompub_hash }} } } } \\ \nopagebreak {{ item.value }} & @@ -504,7 +512,7 @@ compromise resulting in proportional financial losses to the exchange. % Table generation tested by testcase #2 in test-auditor.sh -{% if data.reserve_balance_insufficient_inconsistencies|length() == 0 %} +{% if reserves.reserve_balance_insufficient_inconsistencies|length() == 0 %} {\bf All withdrawals were covered by sufficient reserve funding.} {% else %} \begin{longtable}{p{8.5cm}|r} @@ -517,11 +525,11 @@ compromise resulting in proportional financial losses to the exchange. \endfoot \hline {\bf Total loss} & - {{ data.total_loss_balance_insufficient }} \\ + {{ reserves.total_loss_balance_insufficient }} \\ \caption{Reserves with withdrawals higher than reserve funding.} \label{table:reserve:balance_insufficient} \endlastfoot -{% for item in data.reserve_balance_insufficient_inconsistencies %} +{% for item in reserves.reserve_balance_insufficient_inconsistencies %} {\tt \small {{ item.reserve_pub }} } & {{ item.loss }} \\ \hline @@ -543,7 +551,7 @@ would be reported separately in Section~\ref{sec:wire_check_out}. % Table generation tested by testcase #23 in test-auditor.sh -{% if data.wire_out_inconsistencies|length() == 0 %} +{% if aggregation.wire_out_inconsistencies|length() == 0 %} {\bf All aggregations matched up.} {% else %} \begin{longtable}{r|r|r} @@ -559,12 +567,12 @@ would be reported separately in Section~\ref{sec:wire_check_out}. \endfoot \hline {\bf Total deltas} & - {{ data.total_wire_out_delta_plus}} & - - {{ data.total_wire_out_delta_minus}} \\ + {{ aggregation.total_wire_out_delta_plus}} & + - {{ aggregation.total_wire_out_delta_minus}} \\ \caption{Claimed wire out aggregate totals not matching up.} \label{table:reserve:wire_out_balance_inconsistencies} \endlastfoot -{% for item in data.wire_out_inconsistencies %} +{% for item in aggregation.wire_out_inconsistencies %} \multicolumn{3}{l}{ {\tt \truncate{0.95\textwidth}{ {% if 'payto_uri' in item.destination_account %} {{ item.destination_account.payto_uri }} @@ -589,7 +597,7 @@ any effects on its own balance, those entries are excluded from the total. % Table generation tested by testcase #25 in test-auditor.sh -{% if data.coin_inconsistencies|length() == 0 %} +{% if aggregation.coin_inconsistencies|length() == 0 %} {\bf All coin histories were unproblematic.} {% else %} \begin{longtable}{p{1.8cm}|r|r} @@ -607,12 +615,12 @@ any effects on its own balance, those entries are excluded from the total. \endfoot \hline $\sum$ {\bf Delta (Auditor-Exchange)} & - {{ data.total_coin_delta_plus }} & - - {{ data.total_coin_delta_minus }} \\ + {{ aggregation.total_coin_delta_plus }} & + - {{ aggregation.total_coin_delta_minus }} \\ \caption{Arithmetic inconsistencies of amount calculations involving a coin.} \label{table:amount:arithmetic:coin:inconsistencies} \endlastfoot -{% for item in data.coin_inconsistencies %} +{% for item in aggregation.coin_inconsistencies %} {{ item.operation }} & \multicolumn{2}{l}{ {\tt \small {{ item.coin_pub }} } } \\ \nopagebreak & @@ -637,9 +645,81 @@ the (hash of the) denomination public key for ``recoup-verify'' and ``deposit-verify'' operations, and the master public key for ``recoup-master'' operations. -% Table generation tested by testcase #4/#5/#6/#7/#13 in test-auditor.sh +\subsubsection{For aggregations} + +% Table generation tested by testcase #XX in test-auditor.sh + +{% if aggregation.bad_sig_losses|length() == 0 %} + {\bf All signatures were valid.} +{% else %} + \begin{longtable}{l|r|r} + \multicolumn{3}{l}{ {\bf Public key} }\\ + {\bf Operation type} & Database row & {\bf Loss amount} \\ + \hline \hline +\endfirsthead + \multicolumn{3}{l}{ {\bf Public key} }\\ + {\bf Operation type} & Database row & {\bf Loss amount} \\ \hline \hline +\endhead + \hline \hline + \multicolumn{3}{l}{ {\bf Public key} }\\ + {\bf Operation type} & Database row & {\bf Loss amount} \\ +\endfoot + \hline + \multicolumn{2}{l}{ {\bf Total losses} } & + {\bf {{ aggregation.total_bad_sig_loss}} } \\ + \caption{Losses from operations performed on coins without proper signatures.} + \label{table:bad_signature_losses} +\endlastfoot +{% for item in aggregation.bad_sig_losses %} + \multicolumn{3}{l}{ {\tt \small \truncate{0.9\textwidth}{ {{ item.key_pub }} } } } \\ +\nopagebreak + {{ item.operation }} & + {{ item.row }} & + {{ item.loss }} \\ \hline +{% endfor %} + \end{longtable} +{% endif %} + +\subsubsection{For coins} + +% Table generation tested by testcase #4/#5/#6/#13 in test-auditor.sh + +{% if coins.bad_sig_losses|length() == 0 %} + {\bf All signatures were valid.} +{% else %} + \begin{longtable}{l|r|r} + \multicolumn{3}{l}{ {\bf Public key} }\\ + {\bf Operation type} & Database row & {\bf Loss amount} \\ + \hline \hline +\endfirsthead + \multicolumn{3}{l}{ {\bf Public key} }\\ + {\bf Operation type} & Database row & {\bf Loss amount} \\ \hline \hline +\endhead + \hline \hline + \multicolumn{3}{l}{ {\bf Public key} }\\ + {\bf Operation type} & Database row & {\bf Loss amount} \\ +\endfoot + \hline + \multicolumn{2}{l}{ {\bf Total losses} } & + {\bf {{ coins.total_bad_sig_loss}} } \\ + \caption{Losses from operations performed on coins without proper signatures.} + \label{table:bad_signature_losses} +\endlastfoot +{% for item in coins.bad_sig_losses %} + \multicolumn{3}{l}{ {\tt \small \truncate{0.9\textwidth}{ {{ item.key_pub }} } } } \\ +\nopagebreak + {{ item.operation }} & + {{ item.row }} & + {{ item.loss }} \\ \hline +{% endfor %} + \end{longtable} +{% endif %} + +\subsubsection{For reserves} -{% if data.bad_sig_losses|length() == 0 %} +% Table generation tested by testcase #7 in test-auditor.sh + +{% if reserves.bad_sig_losses|length() == 0 %} {\bf All signatures were valid.} {% else %} \begin{longtable}{l|r|r} @@ -656,11 +736,11 @@ public key for ``recoup-master'' operations. \endfoot \hline \multicolumn{2}{l}{ {\bf Total losses} } & - {\bf {{ data.total_bad_sig_loss}} } \\ + {\bf {{ reserves.total_bad_sig_loss}} } \\ \caption{Losses from operations performed on coins without proper signatures.} \label{table:bad_signature_losses} \endlastfoot -{% for item in data.bad_sig_losses %} +{% for item in reserves.bad_sig_losses %} \multicolumn{3}{l}{ {\tt \small \truncate{0.9\textwidth}{ {{ item.key_pub }} } } } \\ \nopagebreak {{ item.operation }} & @@ -826,7 +906,7 @@ translate into a financial loss (yet). % Table generation tested by testcase #3 in test-auditor.sh -{% if data.reserve_balance_summary_wrong_inconsistencies|length() == 0 %} +{% if reserves.reserve_balance_summary_wrong_inconsistencies|length() == 0 %} {\bf All balances matched up.} {% else %} \begin{longtable}{p{6cm}|r|r} @@ -840,12 +920,12 @@ translate into a financial loss (yet). \hline \hline {\bf Total deltas} & - {{ data.total_balance_summary_delta_plus}} & - - {{ data.total_balance_summary_delta_minus}} \\ + {{ reserves.total_balance_summary_delta_plus}} & + - {{ reserves.total_balance_summary_delta_minus}} \\ \caption{Reserves balances not matching up.} \label{table:reserve:balance_inconsistencies} \endlastfoot -{% for item in data.reserve_balance_summary_wrong_inconsistencies %} +{% for item in reserves.reserve_balance_summary_wrong_inconsistencies %} {\tt \tiny {{ item.reserve_pub }} } & {{ item.auditor }} & {{ item.exchange }} \\ \hline @@ -853,16 +933,16 @@ translate into a financial loss (yet). \end{longtable} {% endif %} -{% if data.reserve_balance_summary_wrong_inconsistencies|length() != 0 %} +{% if reserves.reserve_balance_summary_wrong_inconsistencies|length() != 0 %} This means that there are inconsistencies in the exchange's summary data about reserve balances. \begin{itemize} \item The exchange believes some reserves contain (in total) -{\bf {{ data.total_balance_summary_delta_plus}} } {\em less} than they +{\bf {{ reserves.total_balance_summary_delta_plus}} } {\em less} than they actually contain. A non-zero value here means the exchange may deny legitimate withdrawal requests, denying customers access to their funds. \item The exchange believes some reserves contain (in total) -{\bf {{ data.total_balance_summary_delta_minus}} } {\em more} than they +{\bf {{ reserves.total_balance_summary_delta_minus}} } {\em more} than they actually contain. A non-zero value here means the exchange may allow coins to be withdrawn for which it never received any income, at a loss (for the exchange). \end{itemize} @@ -958,7 +1038,7 @@ with respect to what wire fee it charges at what time. % Table generation tested by testcase #14 in test-auditor.sh -{% if data.wire_fee_time_inconsistencies|length() == 0 %} +{% if aggregation.wire_fee_time_inconsistencies|length() == 0 %} {\bf No wire fee timing issues detected.} {% else %} \begin{longtable}{p{1.5cm}|r|p{6}} @@ -976,7 +1056,7 @@ with respect to what wire fee it charges at what time. \caption{Wire fees with ambiguous timestamps.} \label{table:wire_fee:ambiguity} \endlastfoot -{% for item in data.wire_fee_time_inconsistencies %} +{% for item in aggregation.wire_fee_time_inconsistencies %} {\tt {{ item.type }} } & {{ item.time }} & {{ item.diagnostic }} \\ \hline {% endfor %} \end{longtable} @@ -989,9 +1069,71 @@ with respect to what wire fee it charges at what time. This section describes issues found that do not have a clear financial impact. -% Table generation tested by testcase #13/#15/#25 in test-auditor.sh +\subsubsection{For aggregations} + +% Table generation tested by testcase #15/#25 in test-auditor.sh + +{% if aggregation.row_inconsistencies|length() == 0 %} + {\bf No row inconsistencies found.} +{% else %} + \begin{longtable}{p{2.5cm}|l|p{5cm}} + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ + \hline \hline +\endfirsthead + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ + \hline \hline +\endhead + \hline \hline + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ +\endfoot + \hline \hline + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ + \caption{Other issues found (by table and row).} + \label{table:misc:aggregation} +\endlastfoot +{% for item in aggregation.row_inconsistencies %} + \verb! {{ item.table }} ! & + {{ item.row }} & + {{ item.diagnostic }} \\ \hline +{% endfor %} + \end{longtable} +{% endif %} + +\subsubsection{For coins} + +% Table generation tested by testcase #13 in test-auditor.sh + +{% if coins.row_inconsistencies|length() == 0 %} + {\bf No row inconsistencies found.} +{% else %} + \begin{longtable}{p{2.5cm}|l|p{5cm}} + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ + \hline \hline +\endfirsthead + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ + \hline \hline +\endhead + \hline \hline + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ +\endfoot + \hline \hline + {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ + \caption{Other issues found (by table and row).} + \label{table:misc:coins} +\endlastfoot +{% for item in coins.row_inconsistencies %} + \verb! {{ item.table }} ! & + {{ item.row }} & + {{ item.diagnostic }} \\ \hline +{% endfor %} + \end{longtable} +{% endif %} + +\subsubsection{For reserves} + +% Table generation tested by testcase #XX in test-auditor.sh -{% if data.row_inconsistencies|length() == 0 %} +{% if reserves.row_inconsistencies|length() == 0 %} {\bf No row inconsistencies found.} {% else %} \begin{longtable}{p{2.5cm}|l|p{5cm}} @@ -1007,9 +1149,9 @@ impact. \hline \hline {\bf Table} & {\bf Row} & {\bf Diagnostic} \\ \caption{Other issues found (by table and row).} - \label{table:misc} + \label{table:misc:reserves} \endlastfoot -{% for item in data.row_inconsistencies %} +{% for item in reserves.row_inconsistencies %} \verb! {{ item.table }} ! & {{ item.row }} & {{ item.diagnostic }} \\ \hline @@ -1032,7 +1174,7 @@ reserve expired. % Table generation tested by testcase #20 in test-auditor.sh -{% if data.reserve_not_closed_inconsistencies|length() == 0 %} +{% if reserves.reserve_not_closed_inconsistencies|length() == 0 %} {\bf All expired reserves were closed.} {% else %} \begin{longtable}{p{4.5cm}|c|r} @@ -1045,11 +1187,11 @@ reserve expired. \endfoot \hline {\bf Sum} & & - {{ data.total_balance_reserve_not_closed}} \\ + {{ reserves.total_balance_reserve_not_closed}} \\ \caption{Reserves not closed on time.} \label{table:reserve:not_closed} \endlastfoot -{% for item in data.reserve_not_closed_inconsistencies %} +{% for item in reserves.reserve_not_closed_inconsistencies %} {\tt \tiny \truncate{4.3cm}{ {{ item.reserve_pub }} } } & {\tiny {{ item.expiration_time }} } & {{ item.balance }} \\ \hline @@ -1067,7 +1209,7 @@ may happen even if the exchange is correct. % Table generation tested by testcase #12 in test-auditor.sh -{% if data.refresh_hanging|length() == 0 %} +{% if coins.refresh_hanging|length() == 0 %} {\bf All melted coins were refreshed.} {% else %} \begin{longtable}{p{6.5cm}|c|r} @@ -1082,11 +1224,11 @@ may happen even if the exchange is correct. \endfoot \hline {\bf Sum} & & - {{ data.total_refresh_hanging}} \\ + {{ coins.total_refresh_hanging}} \\ \caption{Refresh operations hanging.} \label{table:refresh:hanging} \endlastfoot -{% for item in data.refresh_hanging %} +{% for item in coins.refresh_hanging %} \truncate{6.2cm}{ {\tt \small {{ item.coin_pub }} } } & {{ item.row }} & {{ item.amount }} \\ \hline @@ -1104,7 +1246,7 @@ implications. % Table generation tested by testcase #22 in test-auditor.sh -{% if data.denomination_key_validity_withdraw_inconsistencies|length() == 0 %} +{% if reserves.denomination_key_validity_withdraw_inconsistencies|length() == 0 %} {\bf All denomination keys were valid at the time of withdrawals.} {% else %} \begin{longtable}{p{7.5cm}|r} @@ -1124,7 +1266,7 @@ implications. \caption{Execution times not matching denomination key validity period.} \label{table:withdraw:bad_time} \endlastfoot -{% for item in data.denomination_key_validity_withdraw_inconsistencies %} +{% for item in reserves.denomination_key_validity_withdraw_inconsistencies %} {\tt \small \truncate{0.6\textwidth}{ {{ item.reserve_pub }} } } & {{ item.row }} \\ \nopagebreak {\tt \small \truncate{0.6\textwidth}{ {{ item.denompub_h }} } } & {{ item.execution_date }} \\ \hline diff --git a/contrib/render.py b/contrib/render.py index 2290e92f8..cd50f7164 100755 --- a/contrib/render.py +++ b/contrib/render.py @@ -36,6 +36,18 @@ jsonData1 = json.load(jsonFile1) jsonFile2 = open (sys.argv[2], 'r') jsonData2 = json.load(jsonFile2) +jsonFile3 = open (sys.argv[3], 'r') +jsonData3 = json.load(jsonFile3) + +jsonFile4 = open (sys.argv[4], 'r') +jsonData4 = json.load(jsonFile4) + +jsonFile5 = open (sys.argv[5], 'r') +jsonData5 = json.load(jsonFile5) + +jsonFile6 = open (sys.argv[6], 'r') +jsonData6 = json.load(jsonFile6) + jinjaEnv = jinja2.Environment(loader=StdinLoader(), lstrip_blocks=True, trim_blocks=True, @@ -43,4 +55,4 @@ jinjaEnv = jinja2.Environment(loader=StdinLoader(), autoescape=False) tmpl = jinjaEnv.get_template('stdin'); -print(tmpl.render(data = jsonData1, wire = jsonData2)) +print(tmpl.render(data = jsonData1, wire = jsonData2, aggregation = jsonData3, coins = jsonData4, deposits = jsonData5, reserves = jsonData6)) |