diff options
author | Cedric Zwahlen <cedric.zwahlen@students.bfh.ch> | 2024-04-09 10:01:44 +0200 |
---|---|---|
committer | Cedric Zwahlen <cedric.zwahlen@students.bfh.ch> | 2024-04-19 20:47:32 +0200 |
commit | 7b07b544581a0854882058efbaa0b120e69ec836 (patch) | |
tree | 78d196dae4c71036429eb14dfc97b486a40c2def | |
parent | 6749bd0aa6ac33991e271298454382425a865646 (diff) | |
download | exchange-7b07b544581a0854882058efbaa0b120e69ec836.tar.gz exchange-7b07b544581a0854882058efbaa0b120e69ec836.tar.bz2 exchange-7b07b544581a0854882058efbaa0b120e69ec836.zip |
Update tables
include suppressed field
27 files changed, 54 insertions, 26 deletions
diff --git a/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql b/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql index 86a52336c..8dc189061 100644 --- a/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql +++ b/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql @@ -22,7 +22,8 @@ CREATE TABLE auditor_amount_arithmetic_inconsistency operation BYTEA NOT NULL CHECK (LENGTH(operation)=64),
exchange_amount taler_amount,
auditor_amount taler_amount,
- profitable BOOLEAN
+ profitable BOOLEAN,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_amount_arithmetic_inconsistency
IS 'Report a (serious) inconsistency in the exchange''s database with respect to calculations involving amounts';
diff --git a/src/auditordb/0002-auditor_balances.sql b/src/auditordb/0002-auditor_balances.sql index 8014b9c41..7692bf50b 100644 --- a/src/auditordb/0002-auditor_balances.sql +++ b/src/auditordb/0002-auditor_balances.sql @@ -17,7 +17,8 @@ CREATE TABLE IF NOT EXISTS auditor_balances ( balance_key TEXT PRIMARY KEY NOT NULL - ,balance_value taler_amount + ,balance_value taler_amount, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_balances diff --git a/src/auditordb/0002-auditor_closure_lags.sql b/src/auditordb/0002-auditor_closure_lags.sql index 8473b25f9..4a932bb2b 100644 --- a/src/auditordb/0002-auditor_closure_lags.sql +++ b/src/auditordb/0002-auditor_closure_lags.sql @@ -21,7 +21,8 @@ CREATE TABLE IF NOT EXISTS auditor_closure_lags amount taler_amount,
deadline BIGINT,
wtid integer,
- account BYTEA
+ account BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_closure_lags
IS 'Report closure lags.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_coin_inconsistency.sql b/src/auditordb/0002-auditor_coin_inconsistency.sql index 90d8c54e7..eee058e45 100644 --- a/src/auditordb/0002-auditor_coin_inconsistency.sql +++ b/src/auditordb/0002-auditor_coin_inconsistency.sql @@ -22,7 +22,8 @@ CREATE TABLE IF NOT EXISTS auditor_coin_inconsistency exchange_amount taler_amount,
auditor_amount taler_amount,
coin_pub BYTEA NOT NULL CHECK (LENGTH(coin_pub)=32),
- profitable BOOLEAN
+ profitable BOOLEAN,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_coin_inconsistency
IS 'Report a (serious) inconsistency in the exchange''s database with respect to calculations involving amounts';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_denomination_key_validity_withdraw_inconsistency.sql b/src/auditordb/0002-auditor_denomination_key_validity_withdraw_inconsistency.sql index fd18f35fb..7bf4539ab 100644 --- a/src/auditordb/0002-auditor_denomination_key_validity_withdraw_inconsistency.sql +++ b/src/auditordb/0002-auditor_denomination_key_validity_withdraw_inconsistency.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_denomination_key_validity_withdraw_inconsiste row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
execution_date BIGINT,
reserve_pub BYTEA,
- denompub_h BYTEA
+ denompub_h BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_denomination_key_validity_withdraw_inconsistency
IS 'Report a (serious) denomination key validity withdraw inconsistency in the exchange''s database';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_denomination_pending.sql b/src/auditordb/0002-auditor_denomination_pending.sql index f9ba535b4..c52e8c0cf 100644 --- a/src/auditordb/0002-auditor_denomination_pending.sql +++ b/src/auditordb/0002-auditor_denomination_pending.sql @@ -20,7 +20,8 @@ CREATE TABLE auditor_denomination_pending ,denom_loss taler_amount NOT NULL ,num_issued INT8 NOT NULL ,denom_risk taler_amount NOT NULL - ,recoup_loss taler_amount NOT NULL + ,recoup_loss taler_amount NOT NULL, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_denomination_pending IS 'outstanding denomination coins that the exchange is aware of and what the respective balances are (outstanding as well as issued overall which implies the maximum value at risk).'; diff --git a/src/auditordb/0002-auditor_denominations_without_sigs.sql b/src/auditordb/0002-auditor_denominations_without_sigs.sql index 86c83e94f..c51de2b9b 100644 --- a/src/auditordb/0002-auditor_denominations_without_sigs.sql +++ b/src/auditordb/0002-auditor_denominations_without_sigs.sql @@ -21,7 +21,8 @@ CREATE TABLE IF NOT EXISTS auditor_denominations_without_sigs denompub_h BYTEA,
value taler_amount,
start_time BIGINT,
- end_time BIGINT
+ end_time BIGINT,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_denominations_without_sigs
IS 'Report encountered denomination that auditor is not auditing.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_emergency.sql b/src/auditordb/0002-auditor_emergency.sql index 2bb13d7e5..4b0ca3828 100644 --- a/src/auditordb/0002-auditor_emergency.sql +++ b/src/auditordb/0002-auditor_emergency.sql @@ -1,3 +1,5 @@ +
+
--
-- This file is part of TALER
-- Copyright (C) 2014--2024 Taler Systems SA
diff --git a/src/auditordb/0002-auditor_emergency_by_count.sql b/src/auditordb/0002-auditor_emergency_by_count.sql index 4daa994a7..7e97b53c3 100644 --- a/src/auditordb/0002-auditor_emergency_by_count.sql +++ b/src/auditordb/0002-auditor_emergency_by_count.sql @@ -24,7 +24,8 @@ CREATE TABLE IF NOT EXISTS auditor_emergency_by_count risk taler_amount,
start BIGINT,
deposit_end BIGINT,
- value taler_amount
+ value taler_amount,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_emergency_by_count
IS 'Report an emergency denomination.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_exchange_signkeys.sql b/src/auditordb/0002-auditor_exchange_signkeys.sql index 64349a2ff..5fbd7d781 100644 --- a/src/auditordb/0002-auditor_exchange_signkeys.sql +++ b/src/auditordb/0002-auditor_exchange_signkeys.sql @@ -19,7 +19,8 @@ CREATE TABLE auditor_exchange_signkeys ,master_sig BYTEA NOT NULL CHECK (LENGTH(master_sig)=64) ,ep_valid_from INT8 NOT NULL ,ep_expire_sign INT8 NOT NULL - ,ep_expire_legal INT8 NOT NULL + ,ep_expire_legal INT8 NOT NULL, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_exchange_signkeys IS 'list of the online signing keys of exchanges we are auditing'; diff --git a/src/auditordb/0002-auditor_fee_time_inconsistency.sql b/src/auditordb/0002-auditor_fee_time_inconsistency.sql index b89cc59c7..317c487a6 100644 --- a/src/auditordb/0002-auditor_fee_time_inconsistency.sql +++ b/src/auditordb/0002-auditor_fee_time_inconsistency.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_fee_time_inconsistency row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
type BYTEA,
time BIGINT,
- diagnostic BYTEA
+ diagnostic BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_fee_time_inconsistency
IS 'Report a (serious) fee time inconsistency in the exchange''s database';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_historic_denomination_revenue.sql b/src/auditordb/0002-auditor_historic_denomination_revenue.sql index bf7e4c07e..f85c1bc1d 100644 --- a/src/auditordb/0002-auditor_historic_denomination_revenue.sql +++ b/src/auditordb/0002-auditor_historic_denomination_revenue.sql @@ -18,7 +18,8 @@ CREATE TABLE auditor_historic_denomination_revenue (denom_pub_hash BYTEA PRIMARY KEY CHECK (LENGTH(denom_pub_hash)=64) ,revenue_timestamp INT8 NOT NULL ,revenue_balance taler_amount NOT NULL - ,loss_balance taler_amount NOT NULL + ,loss_balance taler_amount NOT NULL, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_historic_denomination_revenue IS 'Table with historic profits; basically, when a denom_pub has expired and everything associated with it is garbage collected, the final profits end up in here; note that the denom_pub here is not a foreign key, we just keep it as a reference point.'; diff --git a/src/auditordb/0002-auditor_historic_reserve_summary.sql b/src/auditordb/0002-auditor_historic_reserve_summary.sql index 819c4e160..a81abb832 100644 --- a/src/auditordb/0002-auditor_historic_reserve_summary.sql +++ b/src/auditordb/0002-auditor_historic_reserve_summary.sql @@ -18,7 +18,8 @@ SET search_path TO auditor; CREATE TABLE IF NOT EXISTS auditor_historic_reserve_summary (start_date INT8 PRIMARY KEY ,end_date INT8 NOT NULL - ,reserve_profits taler_amount NOT NULL + ,reserve_profits taler_amount NOT NULL, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_historic_reserve_summary IS 'historic profits from reserves; we eventually GC auditor_historic_reserve_revenue, and then store the totals in here (by time intervals).'; diff --git a/src/auditordb/0002-auditor_misattribution_in_inconsistency.sql b/src/auditordb/0002-auditor_misattribution_in_inconsistency.sql index f786d0fdf..23bd90887 100644 --- a/src/auditordb/0002-auditor_misattribution_in_inconsistency.sql +++ b/src/auditordb/0002-auditor_misattribution_in_inconsistency.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_misattribution_in_inconsistency row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
amount taler_amount,
bank_row BIGINT,
- reserve_pub BYTEA
+ reserve_pub BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_misattribution_in_inconsistency
IS 'Report wire transfer that was smaller than it should have been.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_progress.sql b/src/auditordb/0002-auditor_progress.sql index 288a08ae9..855ea082d 100644 --- a/src/auditordb/0002-auditor_progress.sql +++ b/src/auditordb/0002-auditor_progress.sql @@ -16,7 +16,8 @@ CREATE TABLE IF NOT EXISTS auditor_progress (progress_key TEXT PRIMARY KEY NOT NULL - ,progress_offset INT8 NOT NULL + ,progress_offset INT8 NOT NULL, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_progress IS 'Information about to the point until which the audit has progressed. Used for SELECTing the statements to process.'; diff --git a/src/auditordb/0002-auditor_purse_not_closed_inconsistencies.sql b/src/auditordb/0002-auditor_purse_not_closed_inconsistencies.sql index 5ffb6e85a..d2381e9a1 100644 --- a/src/auditordb/0002-auditor_purse_not_closed_inconsistencies.sql +++ b/src/auditordb/0002-auditor_purse_not_closed_inconsistencies.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_purse_not_closed_inconsistencies row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
purse_pub BYTEA,
amount taler_amount,
- expiration_date BIGINT
+ expiration_date BIGINT,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_purse_not_closed_inconsistencies
IS 'Report expired purses';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_purses.sql b/src/auditordb/0002-auditor_purses.sql index 86b6494d1..375535dba 100644 --- a/src/auditordb/0002-auditor_purses.sql +++ b/src/auditordb/0002-auditor_purses.sql @@ -19,7 +19,8 @@ CREATE TABLE auditor_purses ,purse_pub BYTEA PRIMARY KEY CHECK(LENGTH(purse_pub)=32) ,balance taler_amount NOT NULL DEFAULT(0,0) ,target taler_amount NOT NULL - ,expiration_date INT8 NOT NULL + ,expiration_date INT8 NOT NULL, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_purses IS 'all of the purses and their respective balances that the auditor is aware of'; diff --git a/src/auditordb/0002-auditor_refreshes_hanging.sql b/src/auditordb/0002-auditor_refreshes_hanging.sql index 5544bc0d8..3f743feb2 100644 --- a/src/auditordb/0002-auditor_refreshes_hanging.sql +++ b/src/auditordb/0002-auditor_refreshes_hanging.sql @@ -19,7 +19,8 @@ CREATE TABLE IF NOT EXISTS auditor_refreshes_hanging (
row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
amount taler_amount,
- coin_pub BYTEA
+ coin_pub BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_refreshes_hanging
IS 'Report a hanging refresh.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_reserve_balance_insufficient_inconsistency.sql b/src/auditordb/0002-auditor_reserve_balance_insufficient_inconsistency.sql index 7b9900442..e80a7bec8 100644 --- a/src/auditordb/0002-auditor_reserve_balance_insufficient_inconsistency.sql +++ b/src/auditordb/0002-auditor_reserve_balance_insufficient_inconsistency.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_reserve_balance_insufficient_inconsistency row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
reserve_pub BYTEA NOT NULL CHECK (LENGTH(reserve_pub)=32),
inconsistency_gain BOOLEAN,
- inconsistency_amount taler_amount
+ inconsistency_amount taler_amount,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_reserve_balance_insufficient_inconsistency
IS 'Report a (serious) balance insufficiency in the exchange''s database';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_reserve_balance_summary_wrong_inconsistency.sql b/src/auditordb/0002-auditor_reserve_balance_summary_wrong_inconsistency.sql index 26d872132..380d80ae8 100644 --- a/src/auditordb/0002-auditor_reserve_balance_summary_wrong_inconsistency.sql +++ b/src/auditordb/0002-auditor_reserve_balance_summary_wrong_inconsistency.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_reserve_balance_summary_wrong_inconsistency row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
reserve_pub BYTEA,
exchange_amount taler_amount,
- auditor_amount taler_amount
+ auditor_amount taler_amount,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_reserve_balance_summary_wrong_inconsistency
IS 'Report a (serious) reserve balance insufficiency.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_reserve_in_inconsistency.sql b/src/auditordb/0002-auditor_reserve_in_inconsistency.sql index bb90c4018..1a9e1c7f2 100644 --- a/src/auditordb/0002-auditor_reserve_in_inconsistency.sql +++ b/src/auditordb/0002-auditor_reserve_in_inconsistency.sql @@ -23,7 +23,8 @@ CREATE TABLE IF NOT EXISTS auditor_reserve_in_inconsistency reserve_pub BYTEA,
timestamp BIGINT,
account BYTEA,
- diagnostic BYTEA
+ diagnostic BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_reserve_in_inconsistency
IS 'Report an incoming wire transfer claimed by exchange not found.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_reserve_not_closed_inconsistency.sql b/src/auditordb/0002-auditor_reserve_not_closed_inconsistency.sql index 1147b4ae8..6fee9d6ed 100644 --- a/src/auditordb/0002-auditor_reserve_not_closed_inconsistency.sql +++ b/src/auditordb/0002-auditor_reserve_not_closed_inconsistency.sql @@ -21,7 +21,8 @@ CREATE TABLE IF NOT EXISTS auditor_reserve_not_closed_inconsistency reserve_pub BYTEA,
balance taler_amount,
expiration_time BIGINT,
- diagnostic BYTEA
+ diagnostic BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_reserve_not_closed_inconsistency
IS 'Report a (serious) reserve balance insufficiency.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_reserves.sql b/src/auditordb/0002-auditor_reserves.sql index 808524b28..517627bb4 100644 --- a/src/auditordb/0002-auditor_reserves.sql +++ b/src/auditordb/0002-auditor_reserves.sql @@ -25,7 +25,8 @@ CREATE TABLE auditor_reserves ,open_fee_balance taler_amount NOT NULL ,history_fee_balance taler_amount NOT NULL ,expiration_date INT8 NOT NULL - ,origin_account TEXT + ,origin_account TEXT, + suppressed BOOLEAN NOT NULL DEFAULT FALSE ); COMMENT ON TABLE auditor_reserves IS 'all of the customer reserves and their respective balances that the auditor is aware of'; diff --git a/src/auditordb/0002-auditor_row_inconsistency.sql b/src/auditordb/0002-auditor_row_inconsistency.sql index 8915fd99a..20bf9fd7d 100644 --- a/src/auditordb/0002-auditor_row_inconsistency.sql +++ b/src/auditordb/0002-auditor_row_inconsistency.sql @@ -19,7 +19,8 @@ CREATE TABLE IF NOT EXISTS auditor_row_inconsistency (
row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
row_table VARCHAR(64),
- diagnostic VARCHAR(64)
+ diagnostic VARCHAR(64),
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_row_inconsistency
IS 'Report a (serious) row inconsistency in the exchange''s database';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_row_minor_inconsistencies.sql b/src/auditordb/0002-auditor_row_minor_inconsistencies.sql index 100043a27..5e9116e80 100644 --- a/src/auditordb/0002-auditor_row_minor_inconsistencies.sql +++ b/src/auditordb/0002-auditor_row_minor_inconsistencies.sql @@ -19,7 +19,8 @@ CREATE TABLE IF NOT EXISTS auditor_row_minor_inconsistency (
row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
row_table BYTEA,
- diagnostic BYTEA
+ diagnostic BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_row_minor_inconsistency
IS 'Report a (serious) row inconsistency in the exchange''s database.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_wire_format_inconsistency.sql b/src/auditordb/0002-auditor_wire_format_inconsistency.sql index 1bc9af89d..cbb6bcce7 100644 --- a/src/auditordb/0002-auditor_wire_format_inconsistency.sql +++ b/src/auditordb/0002-auditor_wire_format_inconsistency.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_wire_format_inconsistency row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
amount taler_amount,
wire_offset BIGINT,
- diagnostic BYTEA
+ diagnostic BYTEA,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_wire_format_inconsistency
IS 'Report a (serious) format inconsistency.';
\ No newline at end of file diff --git a/src/auditordb/0002-auditor_wire_out_inconsistency.sql b/src/auditordb/0002-auditor_wire_out_inconsistency.sql index 6a49c24a0..efd1b56d9 100644 --- a/src/auditordb/0002-auditor_wire_out_inconsistency.sql +++ b/src/auditordb/0002-auditor_wire_out_inconsistency.sql @@ -20,7 +20,8 @@ CREATE TABLE IF NOT EXISTS auditor_wire_out_inconsistency row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
destination_account BYTEA,
expected taler_amount,
- claimed taler_amount
+ claimed taler_amount,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_wire_out_inconsistency
IS 'Report a (serious) wire inconsistency in the exchange''s database';
\ No newline at end of file |