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(builder): reject ops if condition not met after failure #723

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

dancoombs
Copy link
Collaborator

@dancoombs dancoombs commented Jun 13, 2024

Closes #678

Proposed Changes

  • Currently, if a UO fails a conditional check it says in the mempool and can cause further conditional checks to fail, catching the bundler in a failing loop.
  • This PR detects the conditional check failure, and starts a process to remove the failing UO from the pool.
  • Because the failure does not return the slot that failed, the approach here is to notify the proposer that we are in this state. In the next bundle iteration the proposer will check all of the expected slots in a bundle and reject any UOs that fail conditions.
  • Currently issues an eth_call per UO per accessed address. If this becomes an issue we can use a batched eth_call approach.

TODO

  • Unit tests

Copy link
Collaborator

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

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

Looks great!

crates/builder/src/bundle_proposer.rs Outdated Show resolved Hide resolved
crates/builder/src/bundle_proposer.rs Outdated Show resolved Hide resolved
crates/provider/src/ethers/provider.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 8.75912% with 125 lines in your changes missing coverage. Please review.

Project coverage is 54.45%. Comparing base (867b229) to head (883c454).

Additional details and impacted files

Impacted file tree graph

Files Coverage Δ
crates/builder/src/emit.rs 14.66% <ø> (ø)
crates/provider/src/traits/provider.rs 100.00% <ø> (ø)
crates/builder/src/transaction_tracker.rs 81.13% <0.00%> (-0.17%) ⬇️
crates/builder/src/sender/mod.rs 0.83% <0.00%> (-0.04%) ⬇️
crates/builder/src/bundle_sender.rs 0.00% <0.00%> (ø)
crates/provider/src/ethers/provider.rs 0.00% <0.00%> (ø)
crates/builder/src/bundle_proposer.rs 86.20% <16.00%> (-2.91%) ⬇️
Flag Coverage Δ
unit-tests 54.45% <8.75%> (-0.26%) ⬇️

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

Components Coverage Δ
rundler binary 0.00% <ø> (ø)
builder 45.55% <12.37%> (-0.73%) ⬇️
dev 0.00% <ø> (ø)
pool 65.07% <ø> (ø)
provider 16.10% <0.00%> (-0.58%) ⬇️
rpc 25.66% <ø> (ø)
sim 77.86% <ø> (ø)
tasks ∅ <ø> (∅)
types 65.45% <ø> (ø)
utils 18.28% <ø> (ø)

Base automatically changed from danc/fix-raw-sender to danc/sender-fixes June 18, 2024 22:50
@dancoombs dancoombs merged commit 17d37a7 into danc/sender-fixes Jun 18, 2024
7 checks passed
@dancoombs dancoombs deleted the danc/conditional-errors branch June 18, 2024 22:50
@dancoombs dancoombs mentioned this pull request Jun 18, 2024
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