-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1333 - add new AddressDetail table for TxOut #1820
base: master
Are you sure you want to change the base?
Conversation
90b25ac
to
1aae034
Compare
a0e222b
to
fd13fa4
Compare
The |
00cb15f
to
93f5e1a
Compare
Modified-by: Cmdv <vincent@cmdv.me>
93f5e1a
to
421611f
Compare
cardano-db-sync/src/Cardano/DbSync/Era/Universal/Insert/Grouped.hs
Outdated
Show resolved
Hide resolved
728a5c4
to
7fa6d96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some indexes are still required in address table
I had set "prune" level and then change it to "bootstrap: "tx_out": {
"value": "prune",
"use_address_table": true,
}, At the end of sync process on [db-sync-node:Info:81] [2024-09-23 11:15:55.57 UTC] Starting epoch 466
[db-sync-node:Info:81] [2024-09-23 11:15:55.57 UTC] Insert Conway Block: epoch 466, slot 40262417, block 1990094, hash d1e4b009dbff7b18883e09744c1f6eeaf2e7b67c1b9f12f0d45cb75b4b6deef5
[db-sync-node:Info:90] [2024-09-23 11:15:55.73 UTC] Asynchronously wrote a ledger snapshot to ledger-state/sancho/40262388-9a208b3651-465.lstate in 0.164323499s.
[db-sync-node:Info:81] [2024-09-23 11:15:56.04 UTC] Inserted 97 EpochStake for EpochNo 467
[db-sync-node:Info:81] [2024-09-23 11:15:56.75 UTC] Deleted 0 tx_out
[db-sync-node:Info:81] [2024-09-23 11:15:56.92 UTC] Voting Anchor Offchain metadata fetch: 0 results, 3 fetch errors
[db-sync-node:Info:81] [2024-09-23 11:15:56.92 UTC] Starting UTxO bootstrap migration
[db-sync-node:Warning:81] [2024-09-23 11:15:56.97 UTC] Found and deleted 61224 tx_out.
[db-sync-node:Info:81] [2024-09-23 11:15:56.97 UTC] Inserting 87766 tx_out as pages of 100000
[db-sync-node:Info:81] [2024-09-23 11:15:56.97 UTC] Bootstrap in progress 0.0%
[db-sync-node:Info:81] [2024-09-23 11:16:13.68 UTC] UTxO bootstrap migration done
[db-sync-node:Info:81] [2024-09-23 11:16:13.69 UTC] The table epoch_stake was given a new unique constraint called unique_epoch_stake
[db-sync-node:Info:81] [2024-09-23 11:16:13.69 UTC] The table reward was given a new unique constraint called unique_reward
[db-sync-node:Info:81] [2024-09-23 11:16:13.71 UTC] Running database migrations in mode Indexes
[db-sync-node:Info:81] [2024-09-23 11:16:13.71 UTC] Found maintenance_work_mem=1GB, max_parallel_maintenance_workers=6
[db-sync-node:Warning:81] [2024-09-23 11:16:13.71 UTC] Creating Indexes. This may require an extended period of time to perform. Setting a higher maintenance_work_mem from Postgres usually speeds up this process. These indexes are not used by db-sync but are meant for clients. If you want to skip some of these indexes, you can stop db-sync, delete or modify any migration-4-* files in the schema directory and restart it.
ExitFailure 3
Errors in file: /tmp/migrate-2024-09-23T11:16:13.713492769Z.log
[db-sync-node:Error:81] [2024-09-23 11:16:14.78 UTC] runDBThread: ExitFailure 1
[db-sync-node:Error:105] [2024-09-23 11:16:14.78 UTC] ChainSyncWithBlocksPtcl: AsyncCancelled
[db-sync-node.Subscription:Error:101] [2024-09-23 11:16:14.78 UTC] Identity Application Exception: LocalAddress "../sancho/node.socket" SubscriberError {seType = SubscriberWorkerCancelled, seMessage = "SubscriptionWorker exiting", seStack = []} cat /tmp/migrate-2024-09-23T11:16:13.713492769Z.log
Running : migration-1-0000-20190730.sql
WARNING: password file "config/pgpass-sancho" has group or world access; permissions should be u=rw (0600) or less
init
------
(1 row)
Running : migration-4-0002-20200810.sql
WARNING: password file "config/pgpass-sancho" has group or world access; permissions should be u=rw (0600) or less
Running : migration-4-0003-20210116.sql
WARNING: password file "config/pgpass-sancho" has group or world access; permissions should be u=rw (0600) or less
psql:schema/migration-4-0003-20210116.sql:12: NOTICE: relation "idx_block_previous_id" already exists, skipping
psql:schema/migration-4-0003-20210116.sql:20: NOTICE: relation "idx_pool_update_registered_tx_id" already exists, skipping
psql:schema/migration-4-0003-20210116.sql:37: ERROR: column "stake_address_id" does not exist
ExitFailure 3 |
aa669db
to
2f0e8a0
Compare
I think this index also needs to move to file stage 4, version 1, since it's about tx_out. |
Yeah I fixed that yesterday we were talking via dms 👍 |
2f0e8a0
to
20a32b5
Compare
cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit/Babbage/Config/MigrateConsumedPruneTxOut.hs
Outdated
Show resolved
Hide resolved
cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit/Babbage/Config/MigrateConsumedPruneTxOut.hs
Outdated
Show resolved
Hide resolved
20a32b5
to
5f1242b
Compare
5f1242b
to
1b5b4fa
Compare
Description
Adding a new
AddressDetail
table forTxOut
this functionality lives behind a config flaguse_address_table
.This fixes #1333 + #1697
Also restructured the
Db
directory as it wasn't in the best stateChecklist
fourmolu
on version 0.10.1.0 (which can be run withscripts/fourmolize.sh
)Migrations
If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.