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

Calculate receipt blooms in parallel #7473

Merged
merged 2 commits into from
Sep 22, 2024
Merged

Calculate receipt blooms in parallel #7473

merged 2 commits into from
Sep 22, 2024

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented Sep 21, 2024

Changes

  • Calculate the receipt blooms in parallel; saves ~1% on block validation

Before
image
After
image

Types of changes

What types of changes does your code introduce?

  • Optimization

Testing

Requires testing

  • No

@benaadams benaadams marked this pull request as ready for review September 21, 2024 23:08
@@ -78,7 +78,7 @@ protected virtual TxReceipt BuildReceipt(Address recipient, long spentGas, byte
{
Logs = logEntries,
TxType = transaction.Type,
Bloom = logEntries.Length == 0 ? Bloom.Empty : new Bloom(logEntries),
// Bloom calculated in parallel with other receipts
Copy link
Member

@LukaszRozmej LukaszRozmej Sep 22, 2024

Choose a reason for hiding this comment

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

Maybe better would be to start a task here, and then await it in BlockProcessor or TransactionsExecutor?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤔

@benaadams benaadams merged commit 33f00ca into master Sep 22, 2024
66 checks passed
@benaadams benaadams deleted the receipt-blooms branch September 22, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants