-remove dead field, return h_commitment_age to auditor
This commit is contained in:
parent
12809b28ec
commit
bab36a2ac8
@ -439,7 +439,6 @@ CREATE TABLE IF NOT EXISTS refresh_commitments
|
|||||||
(melt_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY -- UNIQUE
|
(melt_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY -- UNIQUE
|
||||||
,rc BYTEA PRIMARY KEY CHECK (LENGTH(rc)=64)
|
,rc BYTEA PRIMARY KEY CHECK (LENGTH(rc)=64)
|
||||||
,old_coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON DELETE CASCADE
|
,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)
|
,old_coin_sig BYTEA NOT NULL CHECK(LENGTH(old_coin_sig)=64)
|
||||||
,amount_with_fee_val INT8 NOT NULL
|
,amount_with_fee_val INT8 NOT NULL
|
||||||
,amount_with_fee_frac INT4 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';
|
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
|
COMMENT ON COLUMN refresh_commitments.old_coin_pub
|
||||||
IS 'Coin being melted in the refresh process.';
|
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
|
CREATE TABLE IF NOT EXISTS refresh_commitments_default
|
||||||
PARTITION OF refresh_commitments
|
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_pub BYTEA,
|
||||||
IN in_old_coin_sig BYTEA,
|
IN in_old_coin_sig BYTEA,
|
||||||
IN in_known_coin_id INT8, -- not used, but that's OK
|
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_noreveal_index INT4,
|
||||||
IN in_zombie_required BOOLEAN,
|
IN in_zombie_required BOOLEAN,
|
||||||
OUT out_balance_ok BOOLEAN,
|
OUT out_balance_ok BOOLEAN,
|
||||||
@ -1663,7 +1659,6 @@ INSERT INTO refresh_commitments
|
|||||||
,old_coin_sig
|
,old_coin_sig
|
||||||
,amount_with_fee_val
|
,amount_with_fee_val
|
||||||
,amount_with_fee_frac
|
,amount_with_fee_frac
|
||||||
,h_age_commitment
|
|
||||||
,noreveal_index
|
,noreveal_index
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
@ -1672,7 +1667,6 @@ INSERT INTO refresh_commitments
|
|||||||
,in_old_coin_sig
|
,in_old_coin_sig
|
||||||
,in_amount_with_fee_val
|
,in_amount_with_fee_val
|
||||||
,in_amount_with_fee_frac
|
,in_amount_with_fee_frac
|
||||||
,in_h_age_commitment
|
|
||||||
,in_noreveal_index)
|
,in_noreveal_index)
|
||||||
ON CONFLICT DO NOTHING;
|
ON CONFLICT DO NOTHING;
|
||||||
|
|
||||||
|
@ -415,8 +415,6 @@ irbt_cb_table_refresh_commitments (struct PostgresClosure *pg,
|
|||||||
&td->details.refresh_commitments.noreveal_index),
|
&td->details.refresh_commitments.noreveal_index),
|
||||||
GNUNET_PQ_query_param_auto_from_type (
|
GNUNET_PQ_query_param_auto_from_type (
|
||||||
&td->details.refresh_commitments.old_coin_pub),
|
&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
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ prepare_statements (struct PostgresClosure *pg)
|
|||||||
",out_zombie_bad AS zombie_required"
|
",out_zombie_bad AS zombie_required"
|
||||||
",out_noreveal_index AS noreveal_index"
|
",out_noreveal_index AS noreveal_index"
|
||||||
" FROM exchange_do_melt"
|
" FROM exchange_do_melt"
|
||||||
" ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10);",
|
" ($1,$2,$3,$4,$5,$6,$7,$8,$9);",
|
||||||
9),
|
9),
|
||||||
/* Used in #postgres_do_refund() to refund a deposit. */
|
/* Used in #postgres_do_refund() to refund a deposit. */
|
||||||
GNUNET_PQ_make_prepare (
|
GNUNET_PQ_make_prepare (
|
||||||
@ -1582,7 +1582,7 @@ prepare_statements (struct PostgresClosure *pg)
|
|||||||
" recoup_refresh_uuid"
|
" recoup_refresh_uuid"
|
||||||
",recoup_timestamp"
|
",recoup_timestamp"
|
||||||
",old_coins.coin_pub AS old_coin_pub"
|
",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"
|
",old_denoms.denom_pub_hash AS old_denom_pub_hash"
|
||||||
",new_coins.coin_pub As coin_pub"
|
",new_coins.coin_pub As coin_pub"
|
||||||
",coin_sig"
|
",coin_sig"
|
||||||
@ -2736,9 +2736,8 @@ prepare_statements (struct PostgresClosure *pg)
|
|||||||
",amount_with_fee_frac"
|
",amount_with_fee_frac"
|
||||||
",noreveal_index"
|
",noreveal_index"
|
||||||
",old_coin_pub"
|
",old_coin_pub"
|
||||||
",h_age_commitment"
|
|
||||||
") VALUES "
|
") VALUES "
|
||||||
"($1, $2, $3, $4, $5, $6, $7, $8);",
|
"($1, $2, $3, $4, $5, $6, $7);",
|
||||||
7),
|
7),
|
||||||
GNUNET_PQ_make_prepare (
|
GNUNET_PQ_make_prepare (
|
||||||
"insert_into_table_refresh_revealed_coins",
|
"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.coin_pub),
|
||||||
GNUNET_PQ_query_param_auto_from_type (&refresh->coin_sig),
|
GNUNET_PQ_query_param_auto_from_type (&refresh->coin_sig),
|
||||||
GNUNET_PQ_query_param_uint64 (&known_coin_id),
|
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_uint32 (&refresh->noreveal_index),
|
||||||
GNUNET_PQ_query_param_bool (*zombie_required),
|
GNUNET_PQ_query_param_bool (*zombie_required),
|
||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
@ -9692,7 +9690,7 @@ recoup_refresh_serial_helper_cb (void *cls,
|
|||||||
&amount),
|
&amount),
|
||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
int ret;
|
enum GNUNET_GenericReturnValue ret;
|
||||||
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_PQ_extract_result (result,
|
GNUNET_PQ_extract_result (result,
|
||||||
|
@ -313,7 +313,6 @@ struct TALER_EXCHANGEDB_TableData
|
|||||||
struct TALER_CoinSpendPublicKeyP old_coin_pub;
|
struct TALER_CoinSpendPublicKeyP old_coin_pub;
|
||||||
struct TALER_CoinSpendSignatureP old_coin_sig;
|
struct TALER_CoinSpendSignatureP old_coin_sig;
|
||||||
struct TALER_Amount amount_with_fee;
|
struct TALER_Amount amount_with_fee;
|
||||||
struct TALER_AgeCommitmentHash h_age_commitment;
|
|
||||||
uint32_t noreveal_index;
|
uint32_t noreveal_index;
|
||||||
} refresh_commitments;
|
} refresh_commitments;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user