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

Add a sender cache to Transaction #6375

Merged
merged 19 commits into from
Feb 8, 2024

Conversation

ahamlat
Copy link
Contributor

@ahamlat ahamlat commented Jan 9, 2024

PR description

This PR will create a new cache within the Transaction class to house all computed senders for their respective transaction hashes.
When receiving the newPayload call, it calculates asynchronously and in parallel all the transaction hashes and senders.
This PR is expected to improve block processing time, given that either the transaction sender is determined when Besu fills its transaction pool or with the asynchronous tasks.

The cache memory footprint

The cache is defined with this pair hash -> address, for 100_000 entries, it consumes currently less than 20 MiB.
image

We can find below the CPU profiling with and without this PR.

Without this PR
image

With this PR
image

We can notice also an improvement in terms of block processing time

image

Copy link

github-actions bot commented Jan 9, 2024

  • 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

Signed-off-by: Ameziane H <[email protected]>
@ahamlat ahamlat marked this pull request as ready for review January 12, 2024 11:10
Copy link
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

LGTM, just a question

ahamlat and others added 3 commits February 8, 2024 10:26
Signed-off-by: Ameziane H <[email protected]>
…sonrpc/internal/methods/engine/AbstractEngineNewPayload.java

Co-authored-by: Fabio Di Fabio <[email protected]>
Signed-off-by: ahamlat <[email protected]>
@ahamlat ahamlat merged commit 40d1e76 into hyperledger:main Feb 8, 2024
50 checks passed
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