exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 032865011b1705a683b651be6b747fc80ba79f8b
parent 50ee0286c18a7491e6a0c18b706f7598748316d0
Author: Özgür Kesim <oec@codeblau.de>
Date:   Wed,  7 May 2025 20:22:04 +0200

[exchangedb] auditor-sync: add support for new refresh, remove old

also: remove traces of BATCH_WITHDRAW in sync

Diffstat:
Msrc/auditor/taler-auditor-sync.c | 4+---
Msrc/auditor/taler-helper-auditor-coins.c | 1-
Msrc/exchangedb/pg_insert_records_by_table.c | 179+++++++++++++++++++++++++------------------------------------------------------
Msrc/exchangedb/pg_lookup_records_by_table.c | 251+++++++++++++++++++++++--------------------------------------------------------
Msrc/exchangedb/pg_lookup_serial_by_table.c | 26+++++---------------------
Msrc/include/taler_exchange_service.h | 5-----
Msrc/include/taler_exchangedb_plugin.h | 55+++++++++++++------------------------------------------
Msrc/lib/exchange_api_reserves_history.c | 2--
8 files changed, 147 insertions(+), 376 deletions(-)

diff --git a/src/auditor/taler-auditor-sync.c b/src/auditor/taler-auditor-sync.c @@ -106,9 +106,7 @@ static struct Table tables[] = { { .rt = TALER_EXCHANGEDB_RT_EXCHANGE_SIGN_KEYS}, { .rt = TALER_EXCHANGEDB_RT_SIGNKEY_REVOCATIONS}, { .rt = TALER_EXCHANGEDB_RT_KNOWN_COINS}, - { .rt = TALER_EXCHANGEDB_RT_REFRESH_COMMITMENTS}, - { .rt = TALER_EXCHANGEDB_RT_REFRESH_REVEALED_COINS}, - { .rt = TALER_EXCHANGEDB_RT_REFRESH_TRANSFER_KEYS}, + { .rt = TALER_EXCHANGEDB_RT_REFRESH}, { .rt = TALER_EXCHANGEDB_RT_BATCH_DEPOSITS}, { .rt = TALER_EXCHANGEDB_RT_COIN_DEPOSITS}, { .rt = TALER_EXCHANGEDB_RT_REFUNDS}, diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c @@ -1350,7 +1350,6 @@ refresh_session_cb (void *cls, struct CoinContext *cc = cls; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; struct DenominationSummary *dso; - struct TALER_Amount amount_without_fee; enum GNUNET_DB_QueryStatus qs; (void) noreveal_index; diff --git a/src/exchangedb/pg_insert_records_by_table.c b/src/exchangedb/pg_insert_records_by_table.c @@ -834,139 +834,81 @@ irbt_cb_table_known_coins (struct PostgresClosure *pg, /** - * Function called with refresh_commitments records to insert into table. + * Function called with refresh records to insert into table. * * @param pg plugin context * @param td record to insert */ static enum GNUNET_DB_QueryStatus -irbt_cb_table_refresh_commitments (struct PostgresClosure *pg, - const struct TALER_EXCHANGEDB_TableData *td) +irbt_cb_table_refresh (struct PostgresClosure *pg, + const struct TALER_EXCHANGEDB_TableData *td) { struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_uint64 (&td->serial), - GNUNET_PQ_query_param_auto_from_type (&td->details.refresh_commitments.rc), - GNUNET_PQ_query_param_auto_from_type ( - &td->details.refresh_commitments.old_coin_sig), + GNUNET_PQ_query_param_auto_from_type (&td->details.refresh.rc), + GNUNET_PQ_query_param_auto_from_type (&td->details.refresh.execution_date), TALER_PQ_query_param_amount ( pg->conn, - &td->details.refresh_commitments.amount_with_fee), - GNUNET_PQ_query_param_uint32 ( - &td->details.refresh_commitments.noreveal_index), + &td->details.refresh.amount_with_fee), + GNUNET_PQ_query_param_auto_from_type ( + &td->details.refresh.old_coin_pub), GNUNET_PQ_query_param_auto_from_type ( - &td->details.refresh_commitments.old_coin_pub), + &td->details.refresh.old_coin_sig), + GNUNET_PQ_query_param_auto_from_type ( + &td->details.refresh.refresh_seed), + GNUNET_PQ_query_param_uint32 ( + &td->details.refresh.noreveal_index), + GNUNET_PQ_query_param_auto_from_type ( + &td->details.refresh.planchets_h), + GNUNET_PQ_query_param_auto_from_type ( + &td->details.refresh.selected_h), + td->details.refresh.no_blinding_seed + ? GNUNET_PQ_query_param_null () + : GNUNET_PQ_query_param_auto_from_type ( + &td->details.refresh.blinding_seed), + td->details.refresh.no_blinding_seed + ? GNUNET_PQ_query_param_null () + : TALER_PQ_query_param_array_cs_r_pub ( + td->details.refresh.num_cs_r_values, + td->details.refresh.cs_r_values, + pg->conn), + td->details.refresh.no_blinding_seed + ? GNUNET_PQ_query_param_null () + : GNUNET_PQ_query_param_uint64 ( + &td->details.refresh.cs_r_choices), + GNUNET_PQ_query_param_array_uint64 ( + td->details.refresh.num_coins, + td->details.refresh.denom_serials, + pg->conn), + TALER_PQ_query_param_array_blinded_denom_sig ( + td->details.refresh.num_coins, + td->details.refresh.denom_sigs, + pg->conn), GNUNET_PQ_query_param_end }; PREPARE (pg, - "insert_into_table_refresh_commitments", - "INSERT INTO refresh_commitments" - "(melt_serial_id" + "insert_into_table_refresh", + "INSERT INTO refresh" + "(refresh_id" ",rc" - ",old_coin_sig" + ",execution_date" ",amount_with_fee" - ",noreveal_index" ",old_coin_pub" + ",old_coin_sig" + ",refresh_seed" + ",noreveal_index" + ",planchets_h" + ",selected_h" + ",blinding_seed" + ",cs_r_values" + ",cs_r_choices" + ",denom_serials" + ",denom_sigs" ") VALUES " - "($1, $2, $3, $4, $5, $6);"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "insert_into_table_refresh_commitments", - params); -} - - -/** - * Function called with refresh_revealed_coins records to insert into table. - * - * @param pg plugin context - * @param td record to insert - */ -static enum GNUNET_DB_QueryStatus -irbt_cb_table_refresh_revealed_coins ( - struct PostgresClosure *pg, - const struct TALER_EXCHANGEDB_TableData *td) -{ - struct GNUNET_HashCode h_coin_ev; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&td->serial), - GNUNET_PQ_query_param_uint32 ( - &td->details.refresh_revealed_coins.freshcoin_index), - GNUNET_PQ_query_param_auto_from_type ( - &td->details.refresh_revealed_coins.link_sig), - GNUNET_PQ_query_param_fixed_size ( - td->details.refresh_revealed_coins.coin_ev, - td->details.refresh_revealed_coins. - coin_ev_size), - GNUNET_PQ_query_param_auto_from_type (&h_coin_ev), - TALER_PQ_query_param_blinded_denom_sig ( - &td->details.refresh_revealed_coins.ev_sig), - TALER_PQ_query_param_exchange_blinding_values ( - &td->details.refresh_revealed_coins.ewv), - GNUNET_PQ_query_param_uint64 ( - &td->details.refresh_revealed_coins.denominations_serial), - GNUNET_PQ_query_param_uint64 ( - &td->details.refresh_revealed_coins.melt_serial_id), - GNUNET_PQ_query_param_end - }; - - PREPARE (pg, - "insert_into_table_refresh_revealed_coins", - "INSERT INTO refresh_revealed_coins" - "(rrc_serial" - ",freshcoin_index" - ",link_sig" - ",coin_ev" - ",h_coin_ev" - ",ev_sig" - ",ewv" - ",denominations_serial" - ",melt_serial_id" - ") VALUES " - "($1, $2, $3, $4, $5, $6, $7, $8, $9);"); - GNUNET_CRYPTO_hash (td->details.refresh_revealed_coins.coin_ev, - td->details.refresh_revealed_coins.coin_ev_size, - &h_coin_ev); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "insert_into_table_refresh_revealed_coins", - params); -} - - -/** - * Function called with refresh_transfer_keys records to insert into table. - * - * @param pg plugin context - * @param td record to insert - */ -static enum GNUNET_DB_QueryStatus -irbt_cb_table_refresh_transfer_keys ( - struct PostgresClosure *pg, - const struct TALER_EXCHANGEDB_TableData *td) -{ - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&td->serial), - GNUNET_PQ_query_param_auto_from_type ( - &td->details.refresh_transfer_keys.tp), - GNUNET_PQ_query_param_fixed_size ( - &td->details.refresh_transfer_keys.tprivs[0], - (TALER_CNC_KAPPA - 1) - * sizeof (struct TALER_TransferPrivateKeyP)), - GNUNET_PQ_query_param_uint64 ( - &td->details.refresh_transfer_keys.melt_serial_id), - GNUNET_PQ_query_param_end - }; - - PREPARE (pg, - "insert_into_table_refresh_transfer_keys", - "INSERT INTO refresh_transfer_keys" - "(rtc_serial" - ",transfer_pub" - ",transfer_privs" - ",melt_serial_id" - ") VALUES " - "($1, $2, $3, $4);"); + "($1, $2, $3, $4, $5, $6,$7,$8,$9,$10,$11,$12,$13,$14,$15);"); return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "insert_into_table_refresh_transfer_keys", + "insert_into_table_refresh", params); } @@ -2373,15 +2315,8 @@ TEH_PG_insert_records_by_table (void *cls, case TALER_EXCHANGEDB_RT_KNOWN_COINS: rh = &irbt_cb_table_known_coins; break; -#pragma message "add REFRESH; remove others" - case TALER_EXCHANGEDB_RT_REFRESH_COMMITMENTS: - rh = &irbt_cb_table_refresh_commitments; - break; - case TALER_EXCHANGEDB_RT_REFRESH_REVEALED_COINS: - rh = &irbt_cb_table_refresh_revealed_coins; - break; - case TALER_EXCHANGEDB_RT_REFRESH_TRANSFER_KEYS: - rh = &irbt_cb_table_refresh_transfer_keys; + case TALER_EXCHANGEDB_RT_REFRESH: + rh = &irbt_cb_table_refresh; break; case TALER_EXCHANGEDB_RT_BATCH_DEPOSITS: rh = &irbt_cb_table_batch_deposits; diff --git a/src/exchangedb/pg_lookup_records_by_table.c b/src/exchangedb/pg_lookup_records_by_table.c @@ -910,160 +910,86 @@ lrbt_cb_table_known_coins (void *cls, /** - * Function called with refresh_commitments table entries. + * Function called with refresh table entries. * * @param cls closure * @param result the postgres result * @param num_results the number of results in @a result */ static void -lrbt_cb_table_refresh_commitments (void *cls, - PGresult *result, - unsigned int num_results) +lrbt_cb_table_refresh (void *cls, + PGresult *result, + unsigned int num_results) { struct LookupRecordsByTableContext *ctx = cls; struct PostgresClosure *pg = ctx->pg; struct TALER_EXCHANGEDB_TableData td = { - .table = TALER_EXCHANGEDB_RT_REFRESH_COMMITMENTS + .table = TALER_EXCHANGEDB_RT_REFRESH }; for (unsigned int i = 0; i<num_results; i++) { + bool no_cs_r_values; + bool no_cs_r_choices; + size_t num_denom_sigs; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ( "serial", &td.serial), GNUNET_PQ_result_spec_auto_from_type ( "rc", - &td.details.refresh_commitments.rc), + &td.details.refresh.rc), GNUNET_PQ_result_spec_auto_from_type ( - "old_coin_sig", - &td.details.refresh_commitments.old_coin_sig), + "execution_date", + &td.details.refresh.execution_date), TALER_PQ_RESULT_SPEC_AMOUNT ( "amount_with_fee", - &td.details.refresh_commitments.amount_with_fee), - GNUNET_PQ_result_spec_uint32 ( - "noreveal_index", - &td.details.refresh_commitments.noreveal_index), + &td.details.refresh.amount_with_fee), GNUNET_PQ_result_spec_auto_from_type ( "old_coin_pub", - &td.details.refresh_commitments.old_coin_pub), - GNUNET_PQ_result_spec_end - }; - - if (GNUNET_OK != - GNUNET_PQ_extract_result (result, - rs, - i)) - { - GNUNET_break (0); - ctx->error = true; - return; - } - ctx->cb (ctx->cb_cls, - &td); - GNUNET_PQ_cleanup_result (rs); - } -} - - -/** - * Function called with refresh_revealed_coins table entries. - * - * @param cls closure - * @param result the postgres result - * @param num_results the number of results in @a result - */ -static void -lrbt_cb_table_refresh_revealed_coins (void *cls, - PGresult *result, - unsigned int num_results) -{ - struct LookupRecordsByTableContext *ctx = cls; - struct TALER_EXCHANGEDB_TableData td = { - .table = TALER_EXCHANGEDB_RT_REFRESH_REVEALED_COINS - }; - - for (unsigned int i = 0; i<num_results; i++) - { - struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_uint64 ( - "serial", - &td.serial), + &td.details.refresh.old_coin_pub), + GNUNET_PQ_result_spec_auto_from_type ( + "old_coin_sig", + &td.details.refresh.old_coin_sig), + GNUNET_PQ_result_spec_auto_from_type ( + "refresh_seed", + &td.details.refresh.refresh_seed), GNUNET_PQ_result_spec_uint32 ( - "freshcoin_index", - &td.details.refresh_revealed_coins.freshcoin_index), + "noreveal_index", + &td.details.refresh.noreveal_index), GNUNET_PQ_result_spec_auto_from_type ( - "link_sig", - &td.details.refresh_revealed_coins.link_sig), - GNUNET_PQ_result_spec_variable_size ( - "coin_ev", - (void **) &td.details.refresh_revealed_coins.coin_ev, - &td.details.refresh_revealed_coins.coin_ev_size), - TALER_PQ_result_spec_blinded_denom_sig ( - "ev_sig", - &td.details.refresh_revealed_coins.ev_sig), - TALER_PQ_result_spec_exchange_withdraw_values ( - "ewv", - &td.details.refresh_revealed_coins.ewv), - GNUNET_PQ_result_spec_uint64 ( - "denominations_serial", - &td.details.refresh_revealed_coins.denominations_serial), - GNUNET_PQ_result_spec_uint64 ( - "melt_serial_id", - &td.details.refresh_revealed_coins.melt_serial_id), - GNUNET_PQ_result_spec_end - }; - - if (GNUNET_OK != - GNUNET_PQ_extract_result (result, - rs, - i)) - { - GNUNET_break (0); - ctx->error = true; - return; - } - ctx->cb (ctx->cb_cls, - &td); - GNUNET_PQ_cleanup_result (rs); - } -} - - -/** - * Function called with refresh_transfer_keys table entries. - * - * @param cls closure - * @param result the postgres result - * @param num_results the number of results in @a result - */ -static void -lrbt_cb_table_refresh_transfer_keys (void *cls, - PGresult *result, - unsigned int num_results) -{ - struct LookupRecordsByTableContext *ctx = cls; - struct TALER_EXCHANGEDB_TableData td = { - .table = TALER_EXCHANGEDB_RT_REFRESH_TRANSFER_KEYS - }; - - for (unsigned int i = 0; i<num_results; i++) - { - void *tpriv; - size_t tpriv_size; - struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_uint64 ("serial", - &td.serial), - GNUNET_PQ_result_spec_auto_from_type ("transfer_pub", - &td.details.refresh_transfer_keys.tp - ), - GNUNET_PQ_result_spec_variable_size ("transfer_privs", - &tpriv, - &tpriv_size), - GNUNET_PQ_result_spec_uint64 ("melt_serial_id", - &td.details.refresh_transfer_keys. - melt_serial_id), + "planchets_h", + &td.details.refresh.planchets_h), + GNUNET_PQ_result_spec_auto_from_type ( + "selected_h", + &td.details.refresh.selected_h), + GNUNET_PQ_result_spec_allow_null ( + GNUNET_PQ_result_spec_auto_from_type ( + "blinding_seed", + &td.details.refresh.blinding_seed), + &td.details.refresh.no_blinding_seed), + GNUNET_PQ_result_spec_allow_null ( + TALER_PQ_result_spec_array_cs_r_pub ( + pg->conn, + "cs_r_values", + &td.details.refresh.num_cs_r_values, + &td.details.refresh.cs_r_values), + &no_cs_r_values), + GNUNET_PQ_result_spec_allow_null ( + GNUNET_PQ_result_spec_uint64 ( + "cs_r_choices", + &td.details.refresh.cs_r_choices), + &no_cs_r_choices), + GNUNET_PQ_result_spec_array_uint64 ( + pg->conn, + "denom_serials", + &td.details.refresh.num_coins, + &td.details.refresh.denom_serials), + TALER_PQ_result_spec_array_blinded_denom_sig ( + pg->conn, + "denom_sigs", + &num_denom_sigs, + &td.details.refresh.denom_sigs), GNUNET_PQ_result_spec_end }; @@ -1076,21 +1002,6 @@ lrbt_cb_table_refresh_transfer_keys (void *cls, ctx->error = true; return; } - /* Both conditions should be identical, but we conservatively also guard against - unwarranted changes to the structure here. */ - if ( (tpriv_size != - sizeof (td.details.refresh_transfer_keys.tprivs)) || - (tpriv_size != - (TALER_CNC_KAPPA - 1) * sizeof (struct TALER_TransferPrivateKeyP)) ) - { - GNUNET_break (0); - GNUNET_PQ_cleanup_result (rs); - ctx->error = true; - return; - } - GNUNET_memcpy (&td.details.refresh_transfer_keys.tprivs[0], - tpriv, - tpriv_size); ctx->cb (ctx->cb_cls, &td); GNUNET_PQ_cleanup_result (rs); @@ -3360,48 +3271,28 @@ TEH_PG_lookup_records_by_table (void *cls, " ORDER BY known_coin_id ASC;"); rh = &lrbt_cb_table_known_coins; break; -#pragma message "add REFRESH; remove others" - case TALER_EXCHANGEDB_RT_REFRESH_COMMITMENTS: - XPREPARE ("select_above_serial_by_table_refresh_commitments", + case TALER_EXCHANGEDB_RT_REFRESH: + XPREPARE ("select_above_serial_by_table_refresh", "SELECT" - " melt_serial_id AS serial" + " refresh_id AS serial" ",rc" - ",old_coin_sig" + ",execution_date" ",amount_with_fee" - ",noreveal_index" ",old_coin_pub" - " FROM refresh_commitments" - " WHERE melt_serial_id > $1" - " ORDER BY melt_serial_id ASC;"); - rh = &lrbt_cb_table_refresh_commitments; - break; - case TALER_EXCHANGEDB_RT_REFRESH_REVEALED_COINS: - XPREPARE ("select_above_serial_by_table_refresh_revealed_coins", - "SELECT" - " rrc_serial AS serial" - ",freshcoin_index" - ",link_sig" - ",coin_ev" - ",ev_sig" - ",ewv" - ",denominations_serial" - ",melt_serial_id" - " FROM refresh_revealed_coins" - " WHERE rrc_serial > $1" - " ORDER BY rrc_serial ASC;"); - rh = &lrbt_cb_table_refresh_revealed_coins; - break; - case TALER_EXCHANGEDB_RT_REFRESH_TRANSFER_KEYS: - XPREPARE ("select_above_serial_by_table_refresh_transfer_keys", - "SELECT" - " rtc_serial AS serial" - ",transfer_pub" - ",transfer_privs" - ",melt_serial_id" - " FROM refresh_transfer_keys" - " WHERE rtc_serial > $1" - " ORDER BY rtc_serial ASC;"); - rh = &lrbt_cb_table_refresh_transfer_keys; + ",old_coin_sig" + ",refresh_seed" + ",noreveal_index" + ",planchets_h" + ",selected_h" + ",blinding_seed" + ",cs_r_values" + ",cs_r_choices" + ",denom_serials" + ",denom_sigs" + " FROM refresh" + " WHERE refresh_id > $1" + " ORDER BY refresh_id ASC;"); + rh = &lrbt_cb_table_refresh; break; case TALER_EXCHANGEDB_RT_BATCH_DEPOSITS: XPREPARE ("select_above_serial_by_table_batch_deposits", diff --git a/src/exchangedb/pg_lookup_serial_by_table.c b/src/exchangedb/pg_lookup_serial_by_table.c @@ -173,28 +173,12 @@ TEH_PG_lookup_serial_by_table (void *cls, " ORDER BY known_coin_id DESC" " LIMIT 1;"); break; - case TALER_EXCHANGEDB_RT_REFRESH_COMMITMENTS: - XPREPARE ("select_serial_by_table_refresh_commitments", + case TALER_EXCHANGEDB_RT_REFRESH: + XPREPARE ("select_serial_by_table_refresh", "SELECT" - " melt_serial_id AS serial" - " FROM refresh_commitments" - " ORDER BY melt_serial_id DESC" - " LIMIT 1;"); - break; - case TALER_EXCHANGEDB_RT_REFRESH_REVEALED_COINS: - XPREPARE ("select_serial_by_table_refresh_revealed_coins", - "SELECT" - " rrc_serial AS serial" - " FROM refresh_revealed_coins" - " ORDER BY rrc_serial DESC" - " LIMIT 1;"); - break; - case TALER_EXCHANGEDB_RT_REFRESH_TRANSFER_KEYS: - XPREPARE ("select_serial_by_table_refresh_transfer_keys", - "SELECT" - " rtc_serial AS serial" - " FROM refresh_transfer_keys" - " ORDER BY rtc_serial DESC" + " refresh_id AS serial" + " FROM refresh" + " ORDER BY refresh_id DESC" " LIMIT 1;"); break; case TALER_EXCHANGEDB_RT_BATCH_DEPOSITS: diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h @@ -1958,11 +1958,6 @@ enum TALER_EXCHANGE_ReserveTransactionType TALER_EXCHANGE_RTT_WITHDRAWAL, /** - * Batch-Withdrawal from the reserve (pre26) - */ - TALER_EXCHANGE_RTT_BATCH_WITHDRAWAL, - - /** * /recoup operation. */ TALER_EXCHANGE_RTT_RECOUP, diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h @@ -294,9 +294,7 @@ enum TALER_EXCHANGEDB_ReplicatedTable TALER_EXCHANGEDB_RT_EXCHANGE_SIGN_KEYS, TALER_EXCHANGEDB_RT_SIGNKEY_REVOCATIONS, TALER_EXCHANGEDB_RT_KNOWN_COINS, - TALER_EXCHANGEDB_RT_REFRESH_COMMITMENTS, - TALER_EXCHANGEDB_RT_REFRESH_REVEALED_COINS, - TALER_EXCHANGEDB_RT_REFRESH_TRANSFER_KEYS, + TALER_EXCHANGEDB_RT_REFRESH, TALER_EXCHANGEDB_RT_BATCH_DEPOSITS, TALER_EXCHANGEDB_RT_COIN_DEPOSITS, TALER_EXCHANGEDB_RT_REFUNDS, @@ -321,11 +319,9 @@ enum TALER_EXCHANGEDB_ReplicatedTable TALER_EXCHANGEDB_RT_WADS_IN, TALER_EXCHANGEDB_RT_WADS_IN_ENTRIES, TALER_EXCHANGEDB_RT_PROFIT_DRAINS, - /* From exchange-0003.sql: */ TALER_EXCHANGEDB_RT_AML_STAFF, TALER_EXCHANGEDB_RT_PURSE_DELETION, TALER_EXCHANGEDB_RT_WITHDRAW, - /* From exchange-0005.sql: */ TALER_EXCHANGEDB_RT_LEGITIMIZATION_MEASURES, TALER_EXCHANGEDB_RT_LEGITIMIZATION_OUTCOMES, TALER_EXCHANGEDB_RT_LEGITIMIZATION_PROCESSES, @@ -562,48 +558,23 @@ struct TALER_EXCHANGEDB_TableData struct { struct TALER_RefreshCommitmentP rc; + struct GNUNET_TIME_Timestamp execution_date; + struct TALER_Amount amount_with_fee; struct TALER_CoinSpendPublicKeyP old_coin_pub; struct TALER_CoinSpendSignatureP old_coin_sig; - struct TALER_Amount amount_with_fee; + struct TALER_PublicRefreshMasterSeedP refresh_seed; uint32_t noreveal_index; - uint64_t num_coins; - uint64_t *denominations_serials; - struct TALER_BlindedCoinHashP *h_coin_evs; - struct TALER_BlindedDenominationSignature *denom_sigs; + struct TALER_HashBlindedPlanchetsP planchets_h; + struct TALER_HashBlindedPlanchetsP selected_h; bool no_blinding_seed; struct TALER_BlindingMasterSeedP blinding_seed; - uint64_t num_cs_r_pubs; - struct GNUNET_CRYPTO_CSPublicRPairP *cs_r_pubs; - } refresh_v27; - - struct - { - struct TALER_RefreshCommitmentP rc; - struct TALER_CoinSpendPublicKeyP old_coin_pub; - struct TALER_CoinSpendSignatureP old_coin_sig; - struct TALER_Amount amount_with_fee; - uint32_t noreveal_index; - } refresh_commitments; - - struct - { - uint64_t melt_serial_id; - uint32_t freshcoin_index; - struct TALER_CoinSpendSignatureP link_sig; - uint64_t denominations_serial; - void *coin_ev; - size_t coin_ev_size; - struct TALER_ExchangeBlindingValues ewv; - // h_coin_ev omitted, to be recomputed! - struct TALER_BlindedDenominationSignature ev_sig; - } refresh_revealed_coins; - - struct - { - uint64_t melt_serial_id; - struct TALER_TransferPublicKeyP tp; - struct TALER_TransferPrivateKeyP tprivs[TALER_CNC_KAPPA - 1]; - } refresh_transfer_keys; + size_t num_cs_r_values; + struct GNUNET_CRYPTO_CSPublicRPairP *cs_r_values; + uint64_t cs_r_choices; + uint64_t num_coins; + uint64_t *denom_serials; + struct TALER_BlindedDenominationSignature *denom_sigs; + } refresh; struct { diff --git a/src/lib/exchange_api_reserves_history.c b/src/lib/exchange_api_reserves_history.c @@ -768,8 +768,6 @@ free_reserve_history ( break; case TALER_EXCHANGE_RTT_WITHDRAWAL: break; - case TALER_EXCHANGE_RTT_BATCH_WITHDRAWAL: - break; case TALER_EXCHANGE_RTT_RECOUP: break; case TALER_EXCHANGE_RTT_CLOSING: