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

fix: return only canonical blocks for history_by_* methods #10190

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

Rjected
Copy link
Member

@Rjected Rjected commented Aug 7, 2024

Realized that these methods are not actually supposed to go to the database, instead they should be returning only canonical blocks. This means that we may need to check in-memory. The state_by method now defers to these methods, and differs in that it may return a pending block. Whereas the history_by methods will not return a pending block.

This should fix the constant:

2024-08-07T20:50:52.027644Z DEBUG txpool: failed to load accounts err=block hash 0x0123e1576c42bb9060990bcf973a69d0a1510f70c22204404cdd8da8a53b275c does not exist in Headers table
2024-08-07T20:50:52.027699Z DEBUG txpool: failed to load accounts err=block hash 0x0123e1576c42bb9060990bcf973a69d0a1510f70c22204404cdd8da8a53b275c does not exist in Headers table
2024-08-07T20:50:52.027749Z DEBUG txpool: failed to load accounts err=block hash 0x0123e1576c42bb9060990bcf973a69d0a1510f70c22204404cdd8da8a53b275c does not exist in Headers table

logs seen now, since those use history_by methods

ref #10186

@Rjected Rjected added C-bug An unexpected or incorrect behavior A-db Related to the database A-blockchain-tree Related to sidechains, reorgs and pending blocks labels Aug 7, 2024
@mattsse mattsse added this pull request to the merge queue Aug 8, 2024
Merged via the queue into main with commit c639648 Aug 8, 2024
34 checks passed
@mattsse mattsse deleted the dan/fix-history-by-block-hash branch August 8, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks A-db Related to the database C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants