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

Improve Conflict Detection in Parallelization by Considering Slots to Reduce False Positives #7923

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Nov 26, 2024

PR description

This update improve conflict detection during transaction parallelization by checking storage slot changes. By considering modified slots in addition to addresses, we improve the accuracy of conflict detection.

Key Changes:

  • Added storage slot consideration in conflict detection.
  • Reduced false positives by more accurately identifying conflicts between transactions and block state.

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

@ahamlat
Copy link
Contributor

ahamlat commented Nov 26, 2024

This new conflict detection improved the number of parallelized transactions from ~40% to ~60%.
The numbers in the charts below are TPS.

Before this PR (24.10.0 running with --Xbonsai-parallel-tx-processing-enabled=true)
image

With this PR (running with --Xbonsai-parallel-tx-processing-enabled=true)
image

With more transactions executed in parallel, we noticed around 20% performance improvement compared to the last parallelization implementation. The numbers below are from instances running both EL and CL and are not using high spec flag.

image

We can notice also almost twice better performance when comparing to besu 24.10.0 with Teku as a CL

image

I don't see any overhead on the resource usage level.

@matkt
Copy link
Contributor Author

matkt commented Nov 26, 2024

we need to do stability tests before merging

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