From 1fd3ce7922858de11c3139fa4bcc79bc8f50a675 Mon Sep 17 00:00:00 2001 From: Andrew Low Date: Tue, 13 Aug 2024 13:13:37 -0400 Subject: [PATCH 1/4] set default for fee symbol --- storage/client/queries/queries.go | 3 ++- storage/migrations/30_default_symbol.up.sql | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 storage/migrations/30_default_symbol.up.sql diff --git a/storage/client/queries/queries.go b/storage/client/queries/queries.go index d970aacc2..52d907afa 100644 --- a/storage/client/queries/queries.go +++ b/storage/client/queries/queries.go @@ -485,7 +485,8 @@ const ( ($3::text IS NULL OR txs.tx_hash = $3::text OR txs.tx_eth_hash = $3::text) AND ($4::text IS NULL OR rel.account_address = $4::text) AND ($5::timestamptz IS NULL OR txs.timestamp >= $5::timestamptz) AND - ($6::timestamptz IS NULL OR txs.timestamp < $6::timestamptz) + ($6::timestamptz IS NULL OR txs.timestamp < $6::timestamptz) AND + (signer0.signer_address IS NOT NULL) -- HACK: excludes malformed transactions that do not have the required fields ORDER BY txs.round DESC, txs.tx_index DESC LIMIT $7::bigint OFFSET $8::bigint diff --git a/storage/migrations/30_default_symbol.up.sql b/storage/migrations/30_default_symbol.up.sql new file mode 100644 index 000000000..3284882c8 --- /dev/null +++ b/storage/migrations/30_default_symbol.up.sql @@ -0,0 +1,9 @@ +BEGIN; + +UPDATE chain.runtime_transactions SET fee_symbol = '' WHERE fee_symbol IS NULL; -- Will be populated on reindex. + +ALTER TABLE chain.runtime_transactions ALTER COLUMN fee_symbol SET NOT NULL; + +ALTER TABLE chain.runtime_transactions ALTER COLUMN fee_symbol SET DEFAULT ''; + +COMMIT; From 3ade9e428b343b2a97d1ed0a7c939cdabf4fa07a Mon Sep 17 00:00:00 2001 From: Andrew Low Date: Wed, 14 Aug 2024 00:08:08 -0400 Subject: [PATCH 2/4] fix fee_symbol column creation for stg deploy --- storage/migrations/25_runtime_tx_denoms.up.sql | 2 +- storage/migrations/30_default_symbol.up.sql | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 storage/migrations/30_default_symbol.up.sql diff --git a/storage/migrations/25_runtime_tx_denoms.up.sql b/storage/migrations/25_runtime_tx_denoms.up.sql index af4d3c2dd..99c95446c 100644 --- a/storage/migrations/25_runtime_tx_denoms.up.sql +++ b/storage/migrations/25_runtime_tx_denoms.up.sql @@ -4,6 +4,6 @@ ALTER TABLE chain.runtime_transactions ADD COLUMN amount_symbol TEXT; ALTER TABLE chain.runtime_transactions - ADD COLUMN fee_symbol TEXT; + ADD COLUMN fee_symbol TEXT NOT NULL DEFAULT ''; -- Will be populated after reindex COMMIT; diff --git a/storage/migrations/30_default_symbol.up.sql b/storage/migrations/30_default_symbol.up.sql deleted file mode 100644 index 3284882c8..000000000 --- a/storage/migrations/30_default_symbol.up.sql +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN; - -UPDATE chain.runtime_transactions SET fee_symbol = '' WHERE fee_symbol IS NULL; -- Will be populated on reindex. - -ALTER TABLE chain.runtime_transactions ALTER COLUMN fee_symbol SET NOT NULL; - -ALTER TABLE chain.runtime_transactions ALTER COLUMN fee_symbol SET DEFAULT ''; - -COMMIT; From ec4ba4be648b21a4d5c903da88af7016b4da86ca Mon Sep 17 00:00:00 2001 From: Andrew Low Date: Mon, 26 Aug 2024 19:09:30 -0700 Subject: [PATCH 3/4] changelog --- .changelog/739.bugfix.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changelog/739.bugfix.md diff --git a/.changelog/739.bugfix.md b/.changelog/739.bugfix.md new file mode 100644 index 000000000..aadc952cf --- /dev/null +++ b/.changelog/739.bugfix.md @@ -0,0 +1,4 @@ +post 0.3.2 fixes + +api: filters out old rofl txs that were not parsed properly during a 2 week span in early july +db: retroactively updates the runtime tx fee denom to default to ''. From c96cbaeb96c7b786c4d94233773bed72e8ab8bfa Mon Sep 17 00:00:00 2001 From: Andrew Low Date: Mon, 26 Aug 2024 19:10:57 -0700 Subject: [PATCH 4/4] fix changelog lint --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7abf64873..25fb88a54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -121,7 +121,6 @@ The format is inspired by [Keep a Changelog]. - Vendor oasis-core v24.0 ([#716](https://github.com/oasisprotocol/nexus/issues/716)) - ## 0.3.1 (2024-05-27) ### Features