gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: remove redundant old_coin_pub fr


From: gnunet
Subject: [taler-exchange] branch master updated: remove redundant old_coin_pub from link data
Date: Sun, 10 Jan 2021 12:15:49 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new b40afe19 remove redundant old_coin_pub from link data
b40afe19 is described below

commit b40afe196c3c76c3df1538ff64be55de4e1dbcec
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jan 10 12:15:47 2021 +0100

    remove redundant old_coin_pub from link data
---
 src/exchangedb/exchange-0001.sql      |  4 ++-
 src/include/taler_exchangedb_plugin.h | 55 +++++++++++++++++++++++++++++------
 src/include/taler_signatures.h        |  5 ----
 src/util/wallet_signatures.c          |  3 --
 4 files changed, 49 insertions(+), 18 deletions(-)

diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql
index 8ee5d0e0..1f7e005e 100644
--- a/src/exchangedb/exchange-0001.sql
+++ b/src/exchangedb/exchange-0001.sql
@@ -341,10 +341,12 @@ COMMENT ON TABLE wire_out
 CREATE TABLE IF NOT EXISTS aggregation_tracking
   (aggregation_serial_id BIGSERIAL UNIQUE
   ,deposit_serial_id INT8 PRIMARY KEY REFERENCES deposits (deposit_serial_id) 
ON DELETE CASCADE
-  ,wtid_raw BYTEA  CONSTRAINT wire_out_ref REFERENCES wire_out(wtid_raw) ON 
DELETE CASCADE DEFERRABLE
+  ,wtid_raw BYTEA CONSTRAINT wire_out_ref REFERENCES wire_out(wtid_raw) ON 
DELETE CASCADE DEFERRABLE
   );
 COMMENT ON TABLE aggregation_tracking
   IS 'mapping from wire transfer identifiers (WTID) to deposits (and back)';
+COMMENT ON COLUMN aggregation_tracking.wtid_raw
+  IS 'We first create entries in the aggregation_tracking table and then 
finally the wire_out entry once we know the total amount. Hence the constraint 
must be deferrable and we cannot use a wireout_uuid here, because we do not 
have it when these rows are created. Changing the logic to first INSERT a dummy 
row into wire_out and then UPDATEing that row in the same transaction would 
theoretically reduce per-deposit storage costs by 5 percent (24/~460 bytes).';
 
 CREATE INDEX IF NOT EXISTS aggregation_tracking_wtid_index
   ON aggregation_tracking
diff --git a/src/include/taler_exchangedb_plugin.h 
b/src/include/taler_exchangedb_plugin.h
index da320d39..cecbf8df 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -303,19 +303,56 @@ struct TALER_EXCHANGEDB_TableData
 
     struct
     {
-      struct TALER_MerchantPublicKeyP merchant_pub; // FIXME
       struct TALER_MerchantSignatureP merchant_sig;
-      struct GNUNET_HashCode h_contract_terms; // FIXME
       uint64_t rtransaction_id;
       struct TALER_Amount amount_with_fee;
-      uint64_t known_coin_id;
+      uint64_t deposit_serial_id;
     } refunds;
 
-    struct {} wire_out;
-    struct {} aggregation_tracking;
-    struct {} wire_fee;
-    struct {} recoup;
-    struct {} recoup_refresh;
+    struct
+    {
+      struct GNUNET_TIME_Absolute execution_date;
+      struct TALER_WireTransferIdentifierRawP wtid_raw;
+      json_t *wire_target;
+      char *exchange_account_section;
+      struct TALER_Amount amount;
+    } wire_out;
+
+    struct
+    {
+      uint64_t deposit_serial_id;
+      struct TALER_WireTransferIdentifierRawP wtid_raw;
+    } aggregation_tracking;
+
+    struct
+    {
+      char *wire_method;
+      struct GNUNET_TIME_Absolute start_date;
+      struct GNUNET_TIME_Absolute end_date;
+      struct TALER_Amount wire_fee;
+      struct TALER_Amount closing_fee;
+      struct TALER_MasterSignatureP master_sig;
+    } wire_fee;
+
+    struct
+    {
+      struct TALER_CoinSpendSignatureP coin_sig;
+      struct TALER_DenominationBlindingKeyP coin_blind;
+      struct TALER_Amount amount;
+      struct GNUNET_TIME_Absolute timestamp;
+      uint64_t known_coin_id;
+      uint64_t reserve_out_serial_id;
+    } recoup;
+
+    struct
+    {
+      struct TALER_CoinSpendSignatureP coin_sig;
+      struct TALER_DenominationBlindingKeyP coin_blind;
+      struct TALER_Amount amount;
+      struct GNUNET_TIME_Absolute timestamp;
+      uint64_t known_coin_id;
+      uint64_t rrc_serial;
+    } recoup_refresh;
 
   } details;
 
@@ -1638,7 +1675,7 @@ typedef int
  *
  * @param cls closure
  * @param rowid unique serial ID for the refresh session in our DB
- * @param reserve_pub public key of the reserve (also the WTID)
+ * @param reserve_pub public key of the reserve (also the wire subject)
  * @param credit amount that was received
  * @param sender_account_details information about the sender's bank account, 
in payto://-format
  * @param wire_reference unique identifier for the wire transfer
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index 5622c7b6..f80a71d7 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -377,11 +377,6 @@ struct TALER_LinkDataPS
    */
   struct GNUNET_HashCode h_denom_pub;
 
-  /**
-   * Public key of the old coin being refreshed.
-   */
-  struct TALER_CoinSpendPublicKeyP old_coin_pub;
-
   /**
    * Transfer public key (for which the private key was not revealed)
    */
diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c
index ef343d17..1916740c 100644
--- a/src/util/wallet_signatures.c
+++ b/src/util/wallet_signatures.c
@@ -41,8 +41,6 @@ TALER_wallet_link_sign (const struct GNUNET_HashCode 
*h_denom_pub,
   GNUNET_CRYPTO_hash (coin_ev,
                       coin_ev_size,
                       &ldp.coin_envelope_hash);
-  GNUNET_CRYPTO_eddsa_key_get_public (&old_coin_priv->eddsa_priv,
-                                      &ldp.old_coin_pub.eddsa_pub);
   GNUNET_CRYPTO_eddsa_sign (&old_coin_priv->eddsa_priv,
                             &ldp,
                             &coin_sig->eddsa_signature);
@@ -62,7 +60,6 @@ TALER_wallet_link_verify (
     .purpose.size = htonl (sizeof (ldp)),
     .purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_LINK),
     .h_denom_pub = *h_denom_pub,
-    .old_coin_pub = *old_coin_pub,
     .transfer_pub = *transfer_pub
   };
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]