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

Disable body validation for POS networks during sync #7646

Merged
merged 10 commits into from
Sep 20, 2024

Conversation

jframe
Copy link
Contributor

@jframe jframe commented Sep 19, 2024

PR description

For POS networks this disables the body validation during sync import. This is unnecessary since we trust the chain since the CL has given us the tip of the chain to use. We still validate the transactions root, ommers root, receipts root, and withdrawals root during the download of the block bodies and transactions to verify we have the correct block bodies and receipts.

For non-POS networks body validation now skips validating transaction and receipts root during the sync as this is already done when downloading the block bodies and transaction receipts.

When body validation is used outside of syncing, the default original full validation mode is being used. This PR only affects the behaviour of the body validation during syncing.

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@jframe jframe changed the title Sync pos body validation Disable body validation for POS networks during sync Sep 20, 2024
@jframe jframe marked this pull request as ready for review September 20, 2024 03:43
Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

would be nice to have a couple of tests for BodyValidationMode.NONE and BodyValidationMode.LIGHT
Otherwise good!

pinges and others added 4 commits September 20, 2024 14:36
Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

LGTM

@jframe jframe enabled auto-merge (squash) September 20, 2024 05:58
@jframe jframe merged commit e1f4489 into hyperledger:main Sep 20, 2024
41 checks passed
daniellehrner pushed a commit to daniellehrner/besu that referenced this pull request Sep 20, 2024
Wolmin pushed a commit to lukso-network/network-besu that referenced this pull request Sep 27, 2024
Signed-off-by: Jason Frame <[email protected]>
Co-authored-by: Stefan Pingel <[email protected]>
Signed-off-by: Wolmin <[email protected]>
@ahamlat ahamlat mentioned this pull request Oct 28, 2024
8 tasks
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.

2 participants