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(simulation): check whether the op fits within a valid time range #712

Merged
merged 6 commits into from
May 24, 2024

Conversation

0xfourzerofour
Copy link
Collaborator

Proposed Changes

  • Add check during simulation for a valid time range and add a 15 second buffer

Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 55.20%. Comparing base (332d241) to head (842a14f).

Additional details and impacted files

Impacted file tree graph

Files Coverage Δ
crates/builder/src/bundle_proposer.rs 89.04% <ø> (ø)
crates/types/src/pool/error.rs 0.00% <ø> (ø)
crates/types/src/user_operation/mod.rs 62.23% <ø> (ø)
crates/types/src/validation_results.rs 28.20% <100.00%> (+1.24%) ⬆️
crates/sim/src/simulation/simulator.rs 83.03% <33.33%> (-0.32%) ⬇️
crates/pool/src/server/remote/error.rs 14.49% <0.00%> (-0.31%) ⬇️
Flag Coverage Δ
unit-tests 55.20% <25.00%> (-0.04%) ⬇️

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

Components Coverage Δ
rundler binary 0.00% <ø> (ø)
builder 50.00% <ø> (ø)
dev 0.00% <ø> (ø)
pool 64.37% <0.00%> (-0.13%) ⬇️
provider 16.68% <ø> (ø)
rpc 25.67% <ø> (ø)
sim 77.94% <33.33%> (-0.05%) ⬇️
tasks ∅ <ø> (∅)
types 65.96% <100.00%> (+0.07%) ⬆️
utils 18.28% <ø> (ø)

@0xfourzerofour 0xfourzerofour force-pushed the josh/valid-time-range branch from 0618e2f to 28fc5db Compare May 23, 2024 20:46
Copy link
Collaborator

@dancoombs dancoombs left a comment

Choose a reason for hiding this comment

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

LGTM!

We should add to our docs that we require a UO to be valid at least 1 minute in the future for acceptance into the mempool. This is important as an anti-DOS mechanism, we don't want to fill our mempool with UOs that are going to expire before bundling.

@0xfourzerofour 0xfourzerofour force-pushed the josh/valid-time-range branch from 9d36ab6 to 0e210b7 Compare May 24, 2024 14:43
@0xfourzerofour 0xfourzerofour merged commit 78f15c9 into main May 24, 2024
7 checks passed
@0xfourzerofour 0xfourzerofour deleted the josh/valid-time-range branch May 24, 2024 15:06
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