Skip to content
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

Resync from genesis after HF crashes at Epoch 505 #1852

Open
tobg opened this issue Sep 10, 2024 · 9 comments
Open

Resync from genesis after HF crashes at Epoch 505 #1852

tobg opened this issue Sep 10, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@tobg
Copy link

tobg commented Sep 10, 2024

OS
Your OS: Ubuntu 22.04

Versions
db-sync: 13.5.0.2
PostgreSQL version: 14
Cardano node: 9.1.1

Build/Install Method
official docker image

Run method
docker

Additional context
Add any other context about the problem here.

Problem Report
[db-sync-node:Info:89] [2024-09-10 12:26:14.90 UTC] Found snapshot file for slot 132796784, hash aaec72aef649abdfc93221389e9b83f8583f1b6ca2aaf1434836423023891fae
[db-sync-node:Info:89] [2024-09-10 12:26:14.90 UTC] Setting ConsistencyLevel to DBAheadOfLedger
[db-sync-node:Info:89] [2024-09-10 12:26:20.93 UTC] File /var/lib/cexplorer/132796784-aaec72aef6-504.lstate exists
[db-sync-node:Info:89] [2024-09-10 12:26:24.24 UTC] Reached EpochNo 505
[db-sync-node:Info:89] [2024-09-10 12:26:55.60 UTC] Received block which is not in the db with HeaderFields {headerFieldSlot = SlotNo 133054113, headerFieldBlockNo = BlockNo 10751243, headerFieldHash = 704f6e581c781aa617a19ddbb9062c9c7f92fee282ce7a284dbf6c780beaa16a}. Time to restore consistency.
[db-sync-node:Error:89] [2024-09-10 12:26:55.69 UTC] runDBThread: DbInsertException "Many Rewards" (SqlError {sqlState = "42703", sqlExecStatus = FatalError, sqlErrorMsg = "record "new" has no field "id"", sqlErrorDetail = "", sqlErrorHint = ""})
[db-sync-node:Error:119] [2024-09-10 12:26:55.69 UTC] recvMsgRollForward: AsyncCancelled
[db-sync-node:Error:114] [2024-09-10 12:26:55.69 UTC] ChainSyncWithBlocksPtcl: AsyncCancelled
[db-sync-node.Subscription:Error:110] [2024-09-10 12:26:55.69 UTC] Identity Application Exception: LocalAddress "/node-ipc/node.socket" SubscriberError {seType = SubscriberWorkerCancelled, seMessage = "SubscriptionWorker exiting", seStack = []}
cardano-db-sync: DbInsertException "Many Rewards" (SqlError {sqlState = "42703", sqlExecStatus = FatalError, sqlErrorMsg = "record "new" has no field "id"", sqlErrorDetail = "", sqlErrorHint = ""})

@tobg tobg added the bug Something isn't working label Sep 10, 2024
@Cmdv
Copy link
Contributor

Cmdv commented Sep 11, 2024

we are just investigating this as it seems that the db is missing an id field on the reward table. Will report back with more info. 👍

@kderme
Copy link
Contributor

kderme commented Sep 11, 2024

How did you run db-sync? Did you sync from genesis with a single release or upgraded from a different release or did you start from a snapshots?

@Fell-x27
Copy link

How did you run db-sync? Did you sync from genesis with a single release or upgraded from a different release or did you start from a snapshots?

I can confirm. I've tested it with both snapshot and genesis-sync. reward.id is missed.

@tobg
Copy link
Author

tobg commented Sep 12, 2024

How did you run db-sync? Did you sync from genesis with a single release or upgraded from a different release or did you start from a snapshots?

From genesis with single release 13.5.0.2. Fresh db.

@rdlrt
Copy link

rdlrt commented Sep 12, 2024

Tho reward.id was intentionally dropped in PR #1607 ?

@kderme
Copy link
Contributor

kderme commented Sep 13, 2024

Tho reward.id was intentionally dropped in PR #1607 ?

Yes since it's never really used

@Cmdv
Copy link
Contributor

Cmdv commented Sep 13, 2024

When I ran cabal run cardano-db-tool -- create-migration --mdir schema/ it adds:

EXECUTE 'ALTER TABLE "reward" ADD COLUMN "id" INT8 NOT NULL' ;
EXECUTE 'ALTER TABLE "reward_rest" ADD COLUMN "id" INT8 NOT NULL' ;

Is there an issue of our haskell representation of the schema, which then tries to insert an id?!?

@Cmdv
Copy link
Contributor

Cmdv commented Oct 30, 2024

Is this still an issue?

@Fell-x27
Copy link

Yes since it's never really used

I use it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants