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

Tx Unindexer cannot proceed if block does not exist in DB #405

Closed
ceyonur opened this issue Nov 29, 2023 · 0 comments · Fixed by ava-labs/subnet-evm#1131
Closed

Tx Unindexer cannot proceed if block does not exist in DB #405

ceyonur opened this issue Nov 29, 2023 · 0 comments · Fixed by ava-labs/subnet-evm#1131
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ceyonur
Copy link
Collaborator

ceyonur commented Nov 29, 2023

I’ve seen this on a state-synced node:
WARN [11-28|12:45:31.391] <C Chain> [github.com/ava-labs/coreth/core/rawdb/chain_iterator.go:104](http://github.com/ava-labs/coreth/core/rawdb/chain_iterator.go:104): Failed to decode block body block=1 error=EOF

This puts the unindex iterator process into a stucked state where it tries to unindex first few blocks when a new block accepted: 1- Say block no: 100 got accepted
2- It checks the tail (which is nil or 0), it tries to unindex the first block (block no 1) and then returns since it cannot be found and skips updating the tail.
3- When block no: 101 got accepted it checks the tail (which is again nil or 0) and repeats the process.

I think we should gracefully handle the nil case here and update the tail. Otherwise tail gets stuck at 0 here (since nextNum is not updated)

@ceyonur ceyonur added the bug Something isn't working label Nov 29, 2023
@nytzuga nytzuga self-assigned this Nov 29, 2023
@ceyonur ceyonur added this to the v0.12.11 milestone Jan 8, 2024
@ceyonur ceyonur assigned ceyonur and unassigned nytzuga Mar 18, 2024
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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants