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 time to mine tracking and metrics #729

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

dancoombs
Copy link
Collaborator

Closes #319

Proposed Changes

  • Add time to mine context to user operations in the pool
  • Track the number of user operations that are currently "candidates" i.e. their fees are high enough to be included
  • Track the amount of time/blocks an operation spends in the "candidate" state
  • Add histogram for time/blocks to mine
  • Re-use the expiry loop into a maintenance loop to limit O(n) operations
  • Limitation: time to mine has a granularity of 1(s) so on fast block networks (Arbitrum) we don't have the level of granularity needed, however we do have N blocks.
  • Open question: should we switch candidate time to be based on system time and not block time?

dphilipson
dphilipson previously approved these changes Jun 17, 2024
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/pool/src/mempool/pool.rs Show resolved Hide resolved
Base automatically changed from danc/fix-paymaster-race to feat/v0.3 June 18, 2024 21:37
@dancoombs dancoombs dismissed dphilipson’s stale review June 18, 2024 21:37

The base branch was changed.

@dancoombs dancoombs merged commit d3b33ab into feat/v0.3 Jun 18, 2024
7 checks passed
@dancoombs dancoombs deleted the danc/ttm-metric branch June 18, 2024 22:03
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