From 5e38ee6617bee228564e305ebbcf3e46391864aa Mon Sep 17 00:00:00 2001 From: Nic Eigel Date: Wed, 10 Jan 2024 16:50:19 +0100 Subject: added auditor reporting tables --- ...002-auditor_amount_arithmetic_inconsistency.sql | 27 +++++++++++++++++++ src/auditordb/0002-auditor_bad_sig_losses.sql | 26 +++++++++++++++++++ src/auditordb/0002-auditor_closure_lags.sql | 27 +++++++++++++++++++ src/auditordb/0002-auditor_coin_inconsistency.sql | 28 ++++++++++++++++++++ ...ination_key_validity_withdraw_inconsistency.sql | 26 +++++++++++++++++++ .../0002-auditor_denominations_without_sigs.sql | 27 +++++++++++++++++++ src/auditordb/0002-auditor_emergency.sql | 29 +++++++++++++++++++++ src/auditordb/0002-auditor_emergency_by_count.sql | 30 ++++++++++++++++++++++ src/auditordb/0002-auditor_exchange_signkeys.sql | 2 +- .../0002-auditor_fee_time_inconsistency.sql | 26 +++++++++++++++++++ ...002-auditor_misattribution_in_inconsistency.sql | 26 +++++++++++++++++++ ...02-auditor_purse_not_closed_inconsistencies.sql | 26 +++++++++++++++++++ src/auditordb/0002-auditor_refreshes_hanging.sql | 25 ++++++++++++++++++ ..._reserve_balance_insufficient_inconsistency.sql | 26 +++++++++++++++++++ ...reserve_balance_summary_wrong_inconsistency.sql | 26 +++++++++++++++++++ .../0002-auditor_reserve_in_inconsistency.sql | 29 +++++++++++++++++++++ ...02-auditor_reserve_not_closed_inconsistency.sql | 27 +++++++++++++++++++ src/auditordb/0002-auditor_row_inconsistency.sql | 25 ++++++++++++++++++ .../0002-auditor_row_minor_inconsistencies.sql | 25 ++++++++++++++++++ .../0002-auditor_wire_format_inconsistency.sql | 26 +++++++++++++++++++ .../0002-auditor_wire_out_inconsistency.sql | 26 +++++++++++++++++++ 21 files changed, 534 insertions(+), 1 deletion(-) create mode 100644 src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_bad_sig_losses.sql create mode 100644 src/auditordb/0002-auditor_closure_lags.sql create mode 100644 src/auditordb/0002-auditor_coin_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_denomination_key_validity_withdraw_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_denominations_without_sigs.sql create mode 100644 src/auditordb/0002-auditor_emergency.sql create mode 100644 src/auditordb/0002-auditor_emergency_by_count.sql create mode 100644 src/auditordb/0002-auditor_fee_time_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_misattribution_in_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_purse_not_closed_inconsistencies.sql create mode 100644 src/auditordb/0002-auditor_refreshes_hanging.sql create mode 100644 src/auditordb/0002-auditor_reserve_balance_insufficient_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_reserve_balance_summary_wrong_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_reserve_in_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_reserve_not_closed_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_row_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_row_minor_inconsistencies.sql create mode 100644 src/auditordb/0002-auditor_wire_format_inconsistency.sql create mode 100644 src/auditordb/0002-auditor_wire_out_inconsistency.sql diff --git a/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql b/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql new file mode 100644 index 000000000..712561ccc --- /dev/null +++ b/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql @@ -0,0 +1,27 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_amount_arithmetic_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + operation BYTEA, + exchange_amount taler_amount, + auditor_amount taler_amount, + profitable BOOLEAN +); +COMMENT ON TABLE auditor_amount_arithmetic_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_bad_sig_losses.sql b/src/auditordb/0002-auditor_bad_sig_losses.sql new file mode 100644 index 000000000..ac17a5120 --- /dev/null +++ b/src/auditordb/0002-auditor_bad_sig_losses.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_bad_sig_losses +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + operation BYTEA, + loss taler_amount, + operation_specific_pub BYTEA +); +COMMENT ON TABLE auditor_bad_sig_losses + IS 'Report a (serious) inconsistency with losses due to bad signatures'; \ No newline at end of file diff --git a/src/auditordb/0002-auditor_closure_lags.sql b/src/auditordb/0002-auditor_closure_lags.sql new file mode 100644 index 000000000..8473b25f9 --- /dev/null +++ b/src/auditordb/0002-auditor_closure_lags.sql @@ -0,0 +1,27 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_closure_lags +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + amount taler_amount, + deadline BIGINT, + wtid integer, + account BYTEA +); +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 new file mode 100644 index 000000000..91f954a68 --- /dev/null +++ b/src/auditordb/0002-auditor_coin_inconsistency.sql @@ -0,0 +1,28 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_coin_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + operation BYTEA, + exchange_amount taler_amount, + auditor_amount taler_amount, + coin_pub BYTEA, + profitable BOOLEAN +); +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 new file mode 100644 index 000000000..fd18f35fb --- /dev/null +++ b/src/auditordb/0002-auditor_denomination_key_validity_withdraw_inconsistency.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_denomination_key_validity_withdraw_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + execution_date BIGINT, + reserve_pub BYTEA, + denompub_h BYTEA +); +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_denominations_without_sigs.sql b/src/auditordb/0002-auditor_denominations_without_sigs.sql new file mode 100644 index 000000000..86c83e94f --- /dev/null +++ b/src/auditordb/0002-auditor_denominations_without_sigs.sql @@ -0,0 +1,27 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_denominations_without_sigs +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + denompub_h BYTEA, + value taler_amount, + start_time BIGINT, + end_time BIGINT +); +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 new file mode 100644 index 000000000..2bb13d7e5 --- /dev/null +++ b/src/auditordb/0002-auditor_emergency.sql @@ -0,0 +1,29 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_emergency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + denompub_h BYTEA, + denom_risk taler_amount, + denom_loss taler_amount, + deposit_start BIGINT, + deposit_end BIGINT, + value taler_amount +); +COMMENT ON TABLE auditor_emergency + IS 'Report an emergency denomination.'; \ No newline at end of file diff --git a/src/auditordb/0002-auditor_emergency_by_count.sql b/src/auditordb/0002-auditor_emergency_by_count.sql new file mode 100644 index 000000000..4daa994a7 --- /dev/null +++ b/src/auditordb/0002-auditor_emergency_by_count.sql @@ -0,0 +1,30 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_emergency_by_count +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + denompub_h BYTEA, + num_issued integer, + num_known integer, + risk taler_amount, + start BIGINT, + deposit_end BIGINT, + value taler_amount +); +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 127365e64..345870252 100644 --- a/src/auditordb/0002-auditor_exchange_signkeys.sql +++ b/src/auditordb/0002-auditor_exchange_signkeys.sql @@ -1,4 +1,4 @@ --- + -- -- This file is part of TALER -- Copyright (C) 2014--2022 Taler Systems SA -- diff --git a/src/auditordb/0002-auditor_fee_time_inconsistency.sql b/src/auditordb/0002-auditor_fee_time_inconsistency.sql new file mode 100644 index 000000000..b89cc59c7 --- /dev/null +++ b/src/auditordb/0002-auditor_fee_time_inconsistency.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +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 +); +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_misattribution_in_inconsistency.sql b/src/auditordb/0002-auditor_misattribution_in_inconsistency.sql new file mode 100644 index 000000000..f786d0fdf --- /dev/null +++ b/src/auditordb/0002-auditor_misattribution_in_inconsistency.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +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 +); +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_purse_not_closed_inconsistencies.sql b/src/auditordb/0002-auditor_purse_not_closed_inconsistencies.sql new file mode 100644 index 000000000..5ffb6e85a --- /dev/null +++ b/src/auditordb/0002-auditor_purse_not_closed_inconsistencies.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +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 +); +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_refreshes_hanging.sql b/src/auditordb/0002-auditor_refreshes_hanging.sql new file mode 100644 index 000000000..5544bc0d8 --- /dev/null +++ b/src/auditordb/0002-auditor_refreshes_hanging.sql @@ -0,0 +1,25 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +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 +); +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 new file mode 100644 index 000000000..bbc0c8118 --- /dev/null +++ b/src/auditordb/0002-auditor_reserve_balance_insufficient_inconsistency.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_reserve_balance_insufficient_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + reserve_pub BYTEA, + inconsistency_gain BOOLEAN, + inconsistency_amount taler_amount +); +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 new file mode 100644 index 000000000..26d872132 --- /dev/null +++ b/src/auditordb/0002-auditor_reserve_balance_summary_wrong_inconsistency.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +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 +); +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 new file mode 100644 index 000000000..bb90c4018 --- /dev/null +++ b/src/auditordb/0002-auditor_reserve_in_inconsistency.sql @@ -0,0 +1,29 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_reserve_in_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + amount_exchange_expected taler_amount, + amount_wired taler_amount, + reserve_pub BYTEA, + timestamp BIGINT, + account BYTEA, + diagnostic BYTEA +); +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 new file mode 100644 index 000000000..1147b4ae8 --- /dev/null +++ b/src/auditordb/0002-auditor_reserve_not_closed_inconsistency.sql @@ -0,0 +1,27 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_reserve_not_closed_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + reserve_pub BYTEA, + balance taler_amount, + expiration_time BIGINT, + diagnostic BYTEA +); +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_row_inconsistency.sql b/src/auditordb/0002-auditor_row_inconsistency.sql new file mode 100644 index 000000000..ece2e5661 --- /dev/null +++ b/src/auditordb/0002-auditor_row_inconsistency.sql @@ -0,0 +1,25 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_row_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + table BYTEA, + diagnostic BYTEA +); +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 new file mode 100644 index 000000000..7836037c7 --- /dev/null +++ b/src/auditordb/0002-auditor_row_minor_inconsistencies.sql @@ -0,0 +1,25 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +CREATE TABLE IF NOT EXISTS auditor_row_minor_inconsistency +( + row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, + table BYTEA, + diagnostic BYTEA +); +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 new file mode 100644 index 000000000..1bc9af89d --- /dev/null +++ b/src/auditordb/0002-auditor_wire_format_inconsistency.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +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 +); +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 new file mode 100644 index 000000000..6a49c24a0 --- /dev/null +++ b/src/auditordb/0002-auditor_wire_out_inconsistency.sql @@ -0,0 +1,26 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2024 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 +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + +SET search_path TO auditor; +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 +); +COMMENT ON TABLE auditor_wire_out_inconsistency + IS 'Report a (serious) wire inconsistency in the exchange''s database'; \ No newline at end of file -- cgit v1.2.3