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(bin): checkpoints comparison in merkle-debug #2817

Merged
merged 2 commits into from
May 24, 2023

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented May 24, 2023

After #2701, such checkpoint comparison is no longer valid as it now includes stage-specific stuff. We should compare just block numbers instead.

@shekhirin shekhirin requested a review from rkrasiuk May 24, 2023 13:48
@shekhirin shekhirin marked this pull request as ready for review May 24, 2023 13:48
@shekhirin shekhirin requested a review from onbjerg as a code owner May 24, 2023 13:48
@shekhirin shekhirin removed the request for review from onbjerg May 24, 2023 13:48
@onbjerg onbjerg added C-bug An unexpected or incorrect behavior A-cli Related to the reth CLI labels May 24, 2023
Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

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

good catch, thanks!

Comment on lines 73 to 80
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);
Copy link
Member

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)

Copy link
Collaborator Author

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

@shekhirin shekhirin requested a review from rkrasiuk May 24, 2023 17:04
Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

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

beautiful

@shekhirin shekhirin merged commit 26dd0f5 into main May 24, 2023
@shekhirin shekhirin deleted the alexey/merkle-debug-checkpoints branch May 24, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants