actually, the auditor only sees the hash of the public keys initially

This commit is contained in:
Christian Grothoff 2016-10-08 19:11:54 +02:00
parent 42da43c18c
commit fa1ca946c9

View File

@ -239,7 +239,7 @@ postgres_create_tables (void *cls)
/* Table with all of the denomination keys that the auditor
is aware of. */
SQLEXEC ("CREATE TABLE IF NOT EXISTS auditor_denominations"
"(denom_pub BYTEA PRIMARY KEY"
"(denom_pub_hash BYTEA PRIMARY KEY CHECK (LENGTH(denom_pub_hash)=64)"
",master_pub BYTEA NOT NULL CHECK (LENGTH(master_pub)=32)"
",valid_from INT8 NOT NULL"
",expire_withdraw INT8 NOT NULL"
@ -302,7 +302,7 @@ postgres_create_tables (void *cls)
of; "refund_serial_id" tells us the last entry in "refunds"
for this denom_pub that the auditor is aware of. */
SQLEXEC ("CREATE TABLE IF NOT EXISTS denomination_pending"
"(denom_pub BYTEA NOT NULL REFERENCES denominations (denom_pub) ON DELETE CASCADE"
"(denom_pub_hash BYTEA NOT NULL REFERENCES denominations (denom_pub_hash) ON DELETE CASCADE"
",denom_balance_val INT8 NOT NULL"
",denom_balance_frac INT4 NOT NULL"
",denom_balance_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL"
@ -368,7 +368,7 @@ postgres_create_tables (void *cls)
but never deposited prior to expiration. */
SQLEXEC ("CREATE TABLE IF NOT EXISTS historic_denomination_revenue"
"(master_pub BYTEA NOT NULL CHECK (LENGTH(master_pub)=32)"
",denom_pub BYTEA NOT NULL"
",denom_pub_hash BYTEA NOT NULL CHECK (LENGTH(denom_pub_hash)=64)"
",revenue_timestamp INT8 NOT NULL"
",revenue_balance_val INT8 NOT NULL"
",revenue_balance_frac INT4 NOT NULL"
@ -387,7 +387,7 @@ postgres_create_tables (void *cls)
implemented, so right now this table is not used.) */
SQLEXEC ("CREATE TABLE IF NOT EXISTS historic_losses"
"(master_pub BYTEA NOT NULL CHECK (LENGTH(master_pub)=32)"
",denom_pub BYTEA NOT NULL"
",denom_pub_hash BYTEA NOT NULL CHECK (LENGTH(denom_pub_hash)=64)"
",loss_timestamp INT8 NOT NULL"
",loss_balance_val INT8 NOT NULL"
",loss_balance_frac INT4 NOT NULL"