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

feat: txpool block building fallback #3755

Merged
merged 2 commits into from
Jul 15, 2023
Merged

feat: txpool block building fallback #3755

merged 2 commits into from
Jul 15, 2023

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Jul 13, 2023

prep for #3702

this prepares for local block building for pending block if no block from CL is available yet.

the actually impl will be in a followup because I need to refactor/reuse some stuff from the basic payload builder impl

@mattsse mattsse requested a review from Rjected as a code owner July 13, 2023 12:17
@mattsse mattsse added C-enhancement New feature or request A-rpc Related to the RPC implementation labels Jul 13, 2023
@mattsse mattsse requested a review from rkrasiuk July 13, 2023 12:20
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #3755 (0d0579a) into main (8bfc3d0) will increase coverage by 4.54%.
The diff coverage is 1.42%.

Impacted file tree graph

Impacted Files Coverage Δ
crates/rpc/rpc/src/eth/api/block.rs 51.37% <0.00%> (+51.37%) ⬆️
crates/rpc/rpc/src/eth/api/pending_block.rs 0.00% <0.00%> (ø)
crates/rpc/rpc/src/eth/api/transactions.rs 27.02% <0.00%> (+20.71%) ⬆️
crates/rpc/rpc/src/eth/api/mod.rs 65.26% <2.32%> (+17.68%) ⬆️

... and 167 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.78% <1.42%> (?)
unit-tests 64.25% <1.42%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 26.15% <ø> (-0.13%) ⬇️
blockchain tree 83.02% <ø> (-0.01%) ⬇️
pipeline 87.13% <ø> (+0.01%) ⬆️
storage (db) 74.19% <ø> (+4.52%) ⬆️
trie 94.65% <ø> (-0.01%) ⬇️
txpool 48.76% <ø> (-0.62%) ⬇️
networking 77.77% <ø> (+5.06%) ⬆️
rpc 58.20% <1.42%> (+17.72%) ⬆️
consensus 64.84% <ø> (+0.02%) ⬆️
revm 33.80% <ø> (+0.76%) ⬆️
payload builder 6.61% <ø> (+2.25%) ⬆️
primitives 88.34% <ø> (+1.41%) ⬆️

Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

supportive

Comment on lines +130 to +132
} else {
self.local_pending_block().await
}
Copy link
Member

Choose a reason for hiding this comment

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

very nice

Comment on lines +271 to +272
// TODO(mattsse): actually build the pending block
Ok(None)
Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines +253 to +254
// no pending block from the CL yet, so we need to build it ourselves via txpool
self.on_blocking_task(|this| async move {
Copy link
Member

Choose a reason for hiding this comment

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

Makes me think we should probably add docs on which ops are blocking and when we recommend spawning blocking?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point, will do!

@mattsse mattsse added this pull request to the merge queue Jul 15, 2023
Merged via the queue into main with commit e12883e Jul 15, 2023
@mattsse mattsse deleted the matt/build-pending-block branch July 15, 2023 14:57
merklefruit pushed a commit to anton-rs/op-reth that referenced this pull request Jul 18, 2023
merklefruit pushed a commit to merklefruit/op-reth-old that referenced this pull request Jul 26, 2023
merklefruit pushed a commit to anton-rs/op-reth that referenced this pull request Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants