[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 06/29: [æge-withdraw] WiP: towards new API
From: |
gnunet |
Subject: |
[taler-exchange] 06/29: [æge-withdraw] WiP: towards new API |
Date: |
Mon, 03 Jul 2023 16:23:42 +0200 |
This is an automated email from the git hooks/post-receive script.
oec pushed a commit to branch master
in repository exchange.
commit 4a31a180a4595aa040060e91ccde4f839aa02f72
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Sun May 14 13:11:36 2023 +0200
[æge-withdraw] WiP: towards new API
---
src/exchange/taler-exchange-httpd_age-withdraw.c | 15 +++++++++++++--
src/exchangedb/0003-age_withdraw_commitments.sql | 15 ++++-----------
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_age-withdraw.c
b/src/exchange/taler-exchange-httpd_age-withdraw.c
index 0978421a..d9475e8f 100644
--- a/src/exchange/taler-exchange-httpd_age-withdraw.c
+++ b/src/exchange/taler-exchange-httpd_age-withdraw.c
@@ -92,9 +92,20 @@ struct AgeWithdrawContext
struct TALER_EXCHANGEDB_AgeWithdrawCommitment commitment;
/**
- * Current time for the DB transaction.
+ * Number of coins/denonations in the reveal
*/
- struct GNUNET_TIME_Timestamp now;
+ uint32_t num_coins;
+
+ /**
+ * kappa * #num_coins hashes of blinded coin planchets.
+ */
+ struct TALER_BlindedPlanchet *coin_evs;
+
+ /**
+ * #num_coins hashes of the denominations from which the coins are withdrawn.
+ * Those must support age restriction.
+ */
+ struct TALER_DenominationHashP *denoms_h;
};
diff --git a/src/exchangedb/0003-age_withdraw_commitments.sql
b/src/exchangedb/0003-age_withdraw_commitments.sql
index 2ee462ec..3106a07a 100644
--- a/src/exchangedb/0003-age_withdraw_commitments.sql
+++ b/src/exchangedb/0003-age_withdraw_commitments.sql
@@ -30,10 +30,9 @@ BEGIN
',max_age SMALLINT NOT NULL CONSTRAINT max_age_positive
CHECK(max_age>=0)'
',reserve_pub BYTEA NOT NULL CONSTRAINT reserve_pub_length
CHECK(LENGTH(reserve_pub)=32)'
',reserve_sig BYTEA NOT NULL CONSTRAINT reserve_sig_length
CHECK(LENGTH(reserve_sig)=64)'
- ',num_coins SMALLINT NOT NULL CONSTRAINT num_coins_positive
CHECK(num_coins>0)'
- ',denominations_serials INT8[] NOT NULL CONSTRAINT
denominations_serial_array_length
CHECK(cardinality(denominations_serials)=num_coins)'
- ',denom_sigs BYTEA[] NOT NULL CONSTRAINT denom_sigs_array_length
CHECK(cardinality(denom_sigs)=num_coins)'
',noreveal_index SMALLINT NOT NULL CONSTRAINT noreveal_index_positive
CHECK(noreveal_index>=0)'
+ ',denominations_serials INT8[] NOT NULL CONSTRAINT
denominations_serial_array_length
CHECK(cardinality(denominations_serials)=cardinality(denom_sigs))'
+ ',denom_sigs BYTEA[] NOT NULL CONSTRAINT denom_sigs_array_length
CHECK(cardinality(denom_sigs)=cardinality(denominations_serials))'
') %s ;'
,table_name
,'PARTITION BY HASH (reserve_pub)'
@@ -75,20 +74,14 @@ BEGIN
,table_name
,partition_suffix
);
- PERFORM comment_partinioned_column(
- 'Number of coins to be withdrawn'
- ,'num_coins'
- ,table_name
- ,partition_suffix
- );
PERFORM comment_partitioned_column(
- 'Array of #num_coins of references to the denominations'
+ 'Array of references to the denominations'
,'denominations_serials'
,table_name
,partition_suffix
);
PERFORM comment_partitioned_column(
- 'Array of #num_coins signatures over the blinded envelopes'
+ 'Array of signatures over the blinded envelopes'
,'denom_sigs'
,table_name
,partition_suffix
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] branch master updated (2d4ebd3f -> f969bd3c), gnunet, 2023/07/03
- [taler-exchange] 07/29: Merge branch 'master' into age-withdraw, gnunet, 2023/07/03
- [taler-exchange] 02/29: Merge branch 'master' into age-withdraw, gnunet, 2023/07/03
- [taler-exchange] 03/29: Merge branch 'master' into age-withdraw, gnunet, 2023/07/03
- [taler-exchange] 01/29: -fix typos for doxygen, gnunet, 2023/07/03
- [taler-exchange] 11/29: Merge branch 'master' into age-withdraw, gnunet, 2023/07/03
- [taler-exchange] 04/29: [age-withdraw] WIP: change schema to use new support for array types, 11/n, gnunet, 2023/07/03
- [taler-exchange] 08/29: Need libgnunetpq v4.0.0++, gnunet, 2023/07/03
- [taler-exchange] 05/29: Merge branch 'age-withdraw' of ssh://git.kesim.org/taler/exchange into age-withdraw, gnunet, 2023/07/03
- [taler-exchange] 06/29: [æge-withdraw] WiP: towards new API,
gnunet <=
- [taler-exchange] 10/29: Merge branch 'master' into age-withdraw, gnunet, 2023/07/03
- [taler-exchange] 14/29: -comment updates, gnunet, 2023/07/03
- [taler-exchange] 19/29: added birthdate parser, gnunet, 2023/07/03
- [taler-exchange] 18/29: -fixed typos, gnunet, 2023/07/03
- [taler-exchange] 09/29: Merge branch 'master' into age-withdraw, gnunet, 2023/07/03
- [taler-exchange] 17/29: add exchange_do_age_withdraw.sql, gnunet, 2023/07/03
- [taler-exchange] 20/29: -fix parameter in stored procedures, gnunet, 2023/07/03
- [taler-exchange] 13/29: Merge branch 'master' into age-withdraw-merge, gnunet, 2023/07/03
- [taler-exchange] 16/29: -ruuid not needed, gnunet, 2023/07/03
- [taler-exchange] 15/29: -free spec, gnunet, 2023/07/03