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(pool): add da tracking to pool #847

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Conversation

dancoombs
Copy link
Collaborator

@dancoombs dancoombs commented Oct 15, 2024

Closes #744

Proposed Changes

  • Add da_gas_tracking_enabled CLI parameter.
  • Cache any returned DA UO data with each UO in the pool upon entry
  • If tracking is enabled, on each block, pull the block data, then sync calculate the required pvg of each UO to set eligibility
  • Only return eligible UOs to the builder when queried
  • Repeat the sync calc in the builder (can this be removed?)

TODO

  • Determine if we can remove the builder PVG check Decided the builder must keep this, as it may raise the fees compared to the initial fees used by the mempool.
  • Performance check on the do_maintenance call on the pool when under heavy load
  • Doc updates
  • More tests [provider] Add more unit test for cached DA oracles #845

Base automatically changed from danc/cached-da to feat/v0.4 October 15, 2024 14:26
@dancoombs dancoombs force-pushed the danc/pool-da-eligible branch 3 times, most recently from 0dcb089 to bafb3c3 Compare October 15, 2024 19:05
@dancoombs
Copy link
Collaborator Author

Tests to be added in this ticket #845

@dancoombs
Copy link
Collaborator Author

Filled a mempool on my laptop on op-sepolia with 1000 UOs, the pool maintenance call took < 5ms.

I'd expect it to be closer to 1-2ms on good/isolated hardware. So I don't think we have a performance problem with the pool maintenance loops. Not going to do anything there for now. If we eventually see issues we have 2 levers to pull: (1) optimize the code (2) move to rayon blocking pool.

@dancoombs dancoombs force-pushed the danc/pool-da-eligible branch 2 times, most recently from 45e6858 to e5086cd Compare October 16, 2024 01:45
@dancoombs
Copy link
Collaborator Author

Also closes #859

Copy link
Collaborator

@0xfourzerofour 0xfourzerofour left a comment

Choose a reason for hiding this comment

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

Looks good just a couple comments

crates/pool/src/mempool/uo_pool.rs Show resolved Hide resolved
crates/builder/src/bundle_proposer.rs Show resolved Hide resolved
crates/pool/src/mempool/pool.rs Show resolved Hide resolved
@dancoombs dancoombs merged commit a23bdd6 into feat/v0.4 Oct 16, 2024
10 checks passed
@dancoombs dancoombs deleted the danc/pool-da-eligible branch October 16, 2024 20:25
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