-remove dead field, return h_commitment_age to auditor

This commit is contained in:
Christian Grothoff 2022-03-17 14:45:12 +01:00
parent 12809b28ec
commit bab36a2ac8
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 4 additions and 15 deletions

View File

@ -439,7 +439,6 @@ CREATE TABLE IF NOT EXISTS refresh_commitments
(melt_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY -- UNIQUE
,rc BYTEA PRIMARY KEY CHECK (LENGTH(rc)=64)
,old_coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON DELETE CASCADE
,h_age_commitment BYTEA CHECK(LENGTH(h_age_commitment)=32)
,old_coin_sig BYTEA NOT NULL CHECK(LENGTH(old_coin_sig)=64)
,amount_with_fee_val INT8 NOT NULL
,amount_with_fee_frac INT4 NOT NULL
@ -454,8 +453,6 @@ COMMENT ON COLUMN refresh_commitments.rc
IS 'Commitment made by the client, hash over the various client inputs in the cut-and-choose protocol';
COMMENT ON COLUMN refresh_commitments.old_coin_pub
IS 'Coin being melted in the refresh process.';
COMMENT ON COLUMN refresh_commitments.h_age_commitment
IS 'The (optional) age commitment that was involved in the minting process of the coin, may be NULL. -- FIXME: Oec: this is in known_coins, why replicated here!??!';
CREATE TABLE IF NOT EXISTS refresh_commitments_default
PARTITION OF refresh_commitments
@ -1640,7 +1637,6 @@ CREATE OR REPLACE FUNCTION exchange_do_melt(
IN in_old_coin_pub BYTEA,
IN in_old_coin_sig BYTEA,
IN in_known_coin_id INT8, -- not used, but that's OK
IN in_h_age_commitment BYTEA,
IN in_noreveal_index INT4,
IN in_zombie_required BOOLEAN,
OUT out_balance_ok BOOLEAN,
@ -1663,7 +1659,6 @@ INSERT INTO refresh_commitments
,old_coin_sig
,amount_with_fee_val
,amount_with_fee_frac
,h_age_commitment
,noreveal_index
)
VALUES
@ -1672,7 +1667,6 @@ INSERT INTO refresh_commitments
,in_old_coin_sig
,in_amount_with_fee_val
,in_amount_with_fee_frac
,in_h_age_commitment
,in_noreveal_index)
ON CONFLICT DO NOTHING;

View File

@ -415,8 +415,6 @@ irbt_cb_table_refresh_commitments (struct PostgresClosure *pg,
&td->details.refresh_commitments.noreveal_index),
GNUNET_PQ_query_param_auto_from_type (
&td->details.refresh_commitments.old_coin_pub),
GNUNET_PQ_query_param_auto_from_type (
&td->details.refresh_commitments.h_age_commitment),
GNUNET_PQ_query_param_end
};

View File

@ -649,7 +649,7 @@ prepare_statements (struct PostgresClosure *pg)
",out_zombie_bad AS zombie_required"
",out_noreveal_index AS noreveal_index"
" FROM exchange_do_melt"
" ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10);",
" ($1,$2,$3,$4,$5,$6,$7,$8,$9);",
9),
/* Used in #postgres_do_refund() to refund a deposit. */
GNUNET_PQ_make_prepare (
@ -1582,7 +1582,7 @@ prepare_statements (struct PostgresClosure *pg)
" recoup_refresh_uuid"
",recoup_timestamp"
",old_coins.coin_pub AS old_coin_pub"
",old_coins.age_commitment_hash"
",new_coins.age_commitment_hash"
",old_denoms.denom_pub_hash AS old_denom_pub_hash"
",new_coins.coin_pub As coin_pub"
",coin_sig"
@ -2736,9 +2736,8 @@ prepare_statements (struct PostgresClosure *pg)
",amount_with_fee_frac"
",noreveal_index"
",old_coin_pub"
",h_age_commitment"
") VALUES "
"($1, $2, $3, $4, $5, $6, $7, $8);",
"($1, $2, $3, $4, $5, $6, $7);",
7),
GNUNET_PQ_make_prepare (
"insert_into_table_refresh_revealed_coins",
@ -4860,7 +4859,6 @@ postgres_do_melt (
GNUNET_PQ_query_param_auto_from_type (&refresh->coin.coin_pub),
GNUNET_PQ_query_param_auto_from_type (&refresh->coin_sig),
GNUNET_PQ_query_param_uint64 (&known_coin_id),
GNUNET_PQ_query_param_auto_from_type (&refresh->coin.h_age_commitment),
GNUNET_PQ_query_param_uint32 (&refresh->noreveal_index),
GNUNET_PQ_query_param_bool (*zombie_required),
GNUNET_PQ_query_param_end
@ -9692,7 +9690,7 @@ recoup_refresh_serial_helper_cb (void *cls,
&amount),
GNUNET_PQ_result_spec_end
};
int ret;
enum GNUNET_GenericReturnValue ret;
if (GNUNET_OK !=
GNUNET_PQ_extract_result (result,

View File

@ -313,7 +313,6 @@ struct TALER_EXCHANGEDB_TableData
struct TALER_CoinSpendPublicKeyP old_coin_pub;
struct TALER_CoinSpendSignatureP old_coin_sig;
struct TALER_Amount amount_with_fee;
struct TALER_AgeCommitmentHash h_age_commitment;
uint32_t noreveal_index;
} refresh_commitments;