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

remove useless persist during backward sync #6570

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Feb 14, 2024

PR description

During backward sync we call validateAndProcessBlock, which will process the block, update the state, and calculate the root hash.

If the block is validated, we will persist the block again for no reason, which will lead to a new unnecessary calculation of rootHash. Removing this second call should really significantly improve performance.

Fixed Issue(s)

Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Copy link

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests
  • I thought about running CI.
  • If I did not run CI, I ran as much locally as possible before pushing.

@matkt matkt marked this pull request as ready for review March 1, 2024 13:17
Copy link
Contributor

@ahamlat ahamlat left a comment

Choose a reason for hiding this comment

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

Nice finding 👍

Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

🚢

@matkt matkt merged commit 02406ba into hyperledger:main Mar 2, 2024
84 of 85 checks passed
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
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.

3 participants