You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Ordinals-api incorrectly handles re-org at block 848477.
Current Behavior:
Run ordinals-api and stream blocks from ordhook
Encounter a re-org event at block 848477:
Original block hash: 00000000000000000002ad15f6680bf74febab1020128641fab0da4bdfa5b4bd
New block hash after re-org: 000000000000000000017304ab1e44edd5f2e80802a2ab3735a9399f2beb4023
Ordinals-api logs the rollback:
{"level":"info","time":"2024-06-18T13:11:38.538Z","pid":1,"hostname":"8dfc6bf8456e","name":"api","msg":"PgStore rolling back block 848477"}
Rollback is initiated and new block is applied (I think inscription number wrong from here)
However, subsequent block (848478) encounters an error.
{"level":"error","time":"2024-06-18T13:14:54.374Z","pid":1,"hostname":"8dfc6bf8456e","name":"chainhook-client","err":{"type":"BadPayloadRequestError","message":"Block inscription gap detected: Attempting to insert #71734219 (848478) but current max is #71734220. Chain tip is at 848477.","stack":"BadPayloadRequestError: Block inscription gap detected: Attempting to insert #71734219 (848478) but current max is #71734220. Chain tip is at 848477.\n at assertNoBlockInscriptionGap (/app/dist/src/pg/helpers.js:23:19)\n at /app/dist/src/pg/pg-store.js:85:59\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async scope (/app/node_modules/postgres/cjs/src/index.js:226:18)\n at async Function.begin (/app/node_modules/postgres/cjs/src/index.js:213:14)\n at async PgStore.updateInscriptions (/app/dist/src/pg/pg-store.js:52:9)\n at async /app/dist/src/ordhook/server.js:57:9\n at async Object.<anonymous> (/app/node_modules/@hirosystems/chainhook-client/dist/server.js:177:17)","name":"BadPayloadRequestError"},"msg":"ChainhookEventObserver bad payload"}
Expected Behavior:
The latest inscription number of block 848477 should be 71734218
Describe the bug
Ordinals-api incorrectly handles re-org at block 848477.
Current Behavior:
Original block hash: 00000000000000000002ad15f6680bf74febab1020128641fab0da4bdfa5b4bd
New block hash after re-org: 000000000000000000017304ab1e44edd5f2e80802a2ab3735a9399f2beb4023
Expected Behavior:
The latest inscription number of block 848477 should be 71734218
Additional context
The text was updated successfully, but these errors were encountered: