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

Cumulative nonce map in archive processor #13406

Merged
merged 2 commits into from
Jun 15, 2023

Conversation

psteckler
Copy link
Member

When processing transactions in a block, the archive processor would update the initial nonce map, instead of cumulatively updating the nonce map passed through the fold accumulator. That meant if a fee payer was involved in more than one transaction in a block, the nonce would be wrong. If a transaction involved a public key not in the initial nonce map, the nonce would be missing.

In the replayer, instead of looking for slot % interval = 0, which often fails because not all slots have blocks, set a target slot. Issue a checkpoint file if the target is exceeded, and reset the target. Tested that feature by running the replayer on the mainnet db.

Also, remove warning flags from dune which hid some unused types and variables. Remove those unused items.

Closes #13401.

Reliably-issued checkpoint files in replayer
@psteckler psteckler requested a review from a team as a code owner June 14, 2023 22:27
@psteckler
Copy link
Member Author

!ci-build-me

Copy link
Member

@bkase bkase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I'm surprised we managed to go this far with this bug

@jrwashburn
Copy link

After this fix, does the replayer need to be run across the entire db to get corrected nonces?

@psteckler
Copy link
Member Author

After this fix, does the replayer need to be run across the entire db to get corrected nonces?

@jrwashburn The nonces need to be repaired starting at the point where the bug was introduced. I don't know offhand when that was. Note that the invalid nonces don't affect the data migration for the berkeley hard fork, because the migrated db stores nonces differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants