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

refactor: avoid using NoopTransactionPool in OP payload builder #13547

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

klkvr
Copy link
Collaborator

@klkvr klkvr commented Dec 24, 2024

Right now OP payload builder depends on NoopTransactionPool tx type when building empty payloads or constructing witnesses. This is unconvinient because we don't know the PoolTransaction AT there

This PR changes logic to operate on a simple closure BestTransactionsAttributes -> iterator which may optionally capture and use the pool. That way for building a payload without external transactions we no longer need to mock the pool

Likely a nicer solution could be to force payload builders to hold a pool, this would also allow simplifying the BuildArguments struct although has other implications as this would leak pool generic to some rpc types which deal directly with payload builder

Copy link

codspeed-hq bot commented Dec 24, 2024

CodSpeed Performance Report

Merging #13547 will improve performances by 15.59%

Comparing klkvr/refactor-op-builder (f228404) with main (41283d3)

Summary

⚡ 1 improvements
✅ 76 untouched benchmarks

Benchmarks breakdown

Benchmark main klkvr/refactor-op-builder Change
`hash builder[init size 1000 update size 100 num updates 1]` 2.7 ms

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

yep, this is better

@mattsse mattsse added M-changelog This change should be included in the changelog A-op-reth Related to Optimism and op-reth labels Dec 25, 2024
@mattsse mattsse added this pull request to the merge queue Dec 25, 2024
Merged via the queue into main with commit 9542573 Dec 25, 2024
44 checks passed
@mattsse mattsse deleted the klkvr/refactor-op-builder branch December 25, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth M-changelog This change should be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants