-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(bin): checkpoints comparison in merkle-debug
#2817
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, thanks!
bin/reth/src/merkle_debug.rs
Outdated
ACCOUNT_HASHING.get_checkpoint(tx.deref())?.unwrap_or_default().block_number && | ||
execution_checkpoint_block == | ||
STORAGE_HASHING.get_checkpoint(tx.deref())?.unwrap_or_default().block_number && | ||
execution_checkpoint_block == | ||
MERKLE_EXECUTION | ||
.get_checkpoint(tx.deref())? | ||
.unwrap_or_default() | ||
.block_number); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also make sure that there's no intermediate progress (all the other fields in hashing & merkle checkpoints are None
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it wasn't checked before when we had a separate table for intermediate hashing progress, added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful
After #2701, such checkpoint comparison is no longer valid as it now includes stage-specific stuff. We should compare just block numbers instead.