gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] branch master updated: -misc edits on phone


From: gnunet
Subject: [taler-donau] branch master updated: -misc edits on phone
Date: Wed, 04 Oct 2023 18:34:42 +0200

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

grothoff pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new a2bd219  -misc edits on phone
a2bd219 is described below

commit a2bd2193af616f11b872e3eaeacc6e6044f62d62
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Wed Oct 4 18:34:39 2023 +0200

    -misc edits on phone
---
 src/donaudb/0002-donau_charities.sql          |  2 +-
 src/donaudb/0002-donau_history.sql            |  2 +-
 src/donaudb/0002-donau_receipts_issued.sql    | 11 ++++---
 src/donaudb/0002-donau_receipts_submitted.sql |  6 ++--
 src/donaudb/0002-donau_sign_keys.sql          |  1 -
 src/include/taler_donau_service.h             | 47 ++++++++-------------------
 6 files changed, 27 insertions(+), 42 deletions(-)

diff --git a/src/donaudb/0002-donau_charities.sql 
b/src/donaudb/0002-donau_charities.sql
index 64102d5..b2d6c38 100644
--- a/src/donaudb/0002-donau_charities.sql
+++ b/src/donaudb/0002-donau_charities.sql
@@ -28,4 +28,4 @@ COMMENT ON COLUMN charities.charity_pub
 COMMENT ON COLUMN charities.max_per_year
   IS 'The annual donation limit.';
 COMMENT ON COLUMN charities.receipts_to_date
-  IS 'The current amount of donations in the current year.';
+  IS 'The current amount of donations in the current year. Reset to 0 when 
incrementing the current_year (but remember historic values in history table 
when doing so).';
diff --git a/src/donaudb/0002-donau_history.sql 
b/src/donaudb/0002-donau_history.sql
index 92ea5ce..5e10741 100644
--- a/src/donaudb/0002-donau_history.sql
+++ b/src/donaudb/0002-donau_history.sql
@@ -17,7 +17,7 @@
 CREATE TABLE history
   (charity_id BIGINT KEY REFERENCES charities (charity_id) ON DELETE CASCADE
   ,final_amount taler_amount NOT NULL
-  ,year INT8 NOT NULL
+  ,donation_year INT8 NOT NULL
   );
 COMMENT ON TABLE history
   IS 'Table containing the yearly donation amount for each charity.';
diff --git a/src/donaudb/0002-donau_receipts_issued.sql 
b/src/donaudb/0002-donau_receipts_issued.sql
index ca4f73b..1817cef 100644
--- a/src/donaudb/0002-donau_receipts_issued.sql
+++ b/src/donaudb/0002-donau_receipts_issued.sql
@@ -1,6 +1,6 @@
 --
 -- This file is part of TALER
--- Copyright (C) 2014--2022 Taler Systems SA
+-- Copyright (C) 2023 Taler Systems SA
 --
 -- TALER is free software; you can redistribute it and/or modify it under the
 -- terms of the GNU General Public License as published by the Free Software
@@ -18,9 +18,10 @@ CREATE TABLE receipts_issued
   (receipt_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
   ,charity_sig BYTEA CHECK (LENGTH(charity_sig)=64)
   ,charity_id BIGINT NOT NULL REFERENCES charities (charity_id) ON DELETE 
CASCADE
-  ,receipt_hash BYTEA NOT NULL
-  ,donation_unit_key_id INT8 NOT NULL
-  ,donation_unit_sig BYTEA CHECK (LENGTH(donation_unit_sig)=64)
+  ,receipt_hash BYTEA NOT NULL -- H(BDID+...)
+  -- + amount
+--  ,donation_unit_key_id INT8 NOT NULL
+--  ,donation_unit_sig BYTEA CHECK (LENGTH(donation_unit_sig)=64)
   );
 COMMENT ON TABLE receipts_issued
   IS 'Table containing the issued blinded donation receipts to the charity.';
@@ -28,3 +29,5 @@ COMMENT ON COLUMN receipts_issued.charity_sig
   IS 'Signature from the charity.';
 COMMENT ON COLUMN receipts_issued.receipt_hash
   IS 'Hash value of the receipt received.';
+
+-- Sign (total-amount, H(BDID_1 + H(p1), BDID_2 + H(p2), ...)) 
diff --git a/src/donaudb/0002-donau_receipts_submitted.sql 
b/src/donaudb/0002-donau_receipts_submitted.sql
index 863212e..6812746 100644
--- a/src/donaudb/0002-donau_receipts_submitted.sql
+++ b/src/donaudb/0002-donau_receipts_submitted.sql
@@ -17,8 +17,10 @@
 CREATE TABLE receipts_submitted
   (receipt_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
   ,hash_tax_number BYTEA NOT NULL
-  ,total_amount taler_amount NOT NULL
-  ,year INT8 NOT NULL
+  ,nonce BYTEA NOT NULL UNIQUE -- LENGTH constraint
+  ,total_amount taler_amount NOT NULL -- or maybe better: reference to public 
key used to sign! => donation unit key
+  ,donau_sig BYTEA NOT NULL UNIQUE
+  ,donation_year INT8 NOT NULL
   );
 COMMENT ON TABLE receipts_submitted
   IS 'Table containing information of the donation receips submitted from the 
donor.';
diff --git a/src/donaudb/0002-donau_sign_keys.sql 
b/src/donaudb/0002-donau_sign_keys.sql
index 82aa244..094b587 100644
--- a/src/donaudb/0002-donau_sign_keys.sql
+++ b/src/donaudb/0002-donau_sign_keys.sql
@@ -17,7 +17,6 @@
 CREATE TABLE donau_sign_keys
   (esk_serial BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
   ,donau_pub BYTEA PRIMARY KEY CHECK (LENGTH(donau_pub)=32)
-  ,master_sig BYTEA NOT NULL CHECK (LENGTH(master_sig)=64)
   ,valid_from INT8 NOT NULL
   ,expire_sign INT8 NOT NULL
   ,expire_legal INT8 NOT NULL
diff --git a/src/include/taler_donau_service.h 
b/src/include/taler_donau_service.h
index 013f9bc..42d2cea 100644
--- a/src/include/taler_donau_service.h
+++ b/src/include/taler_donau_service.h
@@ -34,7 +34,7 @@
 
 
 /**
- * @brief Donau's signature key
+ * @brief Donau's statement signing public key
  */
 struct TALER_DONAU_SigningPublicKey
 {
@@ -44,48 +44,34 @@ struct TALER_DONAU_SigningPublicKey
   struct TALER_DonauPublicKeyP key;
 
   /**
-   * Signature over this signing key by the donau's master signature.
+   * Tax year this key is valid for.
    */
- // struct TALER_MasterSignatureP master_sig;
+  unsigned int year;
 
-  /**
-   * Validity start time
-   */
-  struct GNUNET_TIME_Timestamp valid_from;
-
-  /**
-   * Validity expiration time (how long the donau may use it).
-   */
-  struct GNUNET_TIME_Timestamp valid_until;
-
-  /**
-   * Validity expiration time for legal disputes.
-   */
-  struct GNUNET_TIME_Timestamp valid_legal;
 };
 
 
 /**
- * @brief Public information about a donau's BDR key
+ * @brief Public information about a donau's donation unit signing key
  */
-struct TALER_DONAU_BDRPublicKey
+struct TALER_DONAU_DonationUnitPublicKey
 {
   /**
    * The public key
    */
-  struct TALER_BDRPublicKey key;
+  struct TALER_XXX key;
 
   /**
-   * The hash of the public key.
+   * The hash of the public key. Redundant.
    */
   struct TALER_BDRHashP h_key;
 
-  // +value (Amount)!!?
+  struct TALER_Amount donation_unit;
   
   /**
    * Year of validity
    */
-  int year;
+  unsigned int year;
 };
 
 
@@ -113,6 +99,11 @@ struct TALER_DONAU_Keys
    */
   char *version;
 
+  /**
+   * Financial domain.
+   */
+  char *domain;
+
   /**
    * Supported currency of the donau.
    */
@@ -124,16 +115,6 @@ struct TALER_DONAU_Keys
    */
   char *donau_url;
 
-  /**
-   * Timestamp indicating the /keys generation.
-   */
-  struct GNUNET_TIME_Timestamp list_issue_date; // needed?
-
-  /**
-   * When does this keys data expire?
-   */
-  struct GNUNET_TIME_Timestamp key_data_expiration; // needed?
-
   /**
    * Default number of fractional digits to render
    * amounts with.

-- 
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]