-
Notifications
You must be signed in to change notification settings - Fork 276
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(metrics): calculate the real pending tx #983
Conversation
Another option could be calling https://github.com/scroll-tech/go-ethereum/blob/develop/core/tx_pool.go#L505 periodically in a separate thread to not block/prolong txpool reorgs. |
Yeah I agree with this approach |
Even if this is called in another thread, it will hold the txpool lock and potentially interfere with block building and/or tx pool reorgs. |
maybe we can recover go-ethereum/miner/scroll_worker.go Line 445 in 4b85bbc
|
…/go-ethereum into feat/real_pending_tx_metrcis
Counting it in the worker might not actually yield the correct number of pending transactions depending on how Let's not over complicate things. Why not just start simple with this approach and add an additional metric to see how long it blocks the txpool. If it turns out to be significant or we feel it interferes with block building and/or tx pool reorgs, we can still go the route @omerfirmak suggested and you implemented in c5df443 |
w.config.MaxAccountsNum is |
Yes, by default Also |
you are right |
So I'll follow @jonastheis 's approach, add another commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but Jonas's suggestion would be more robust.
can we add a metric on how long |
cd5ed7a
add cd5ed7a |
* calculate the real pending tx * update * move realPendingTx to miner * update * calculate the real pending tx by statsWithMinBaseFee * update * fix lint * address comments * add metrics to StatsWithMinBaseFee * change read_lock to write_lock
* calculate the real pending tx * update * move realPendingTx to miner * update * calculate the real pending tx by statsWithMinBaseFee * update * fix lint * address comments * add metrics to StatsWithMinBaseFee * change read_lock to write_lock
1. Purpose or design rationale of this PR
https://www.notion.so/scrollzkp/monitoring-Show-the-count-of-executable-transactions-on-txpool-graph-85e468811d334eed88466bddd043f3ac
because some pending tx's gasFeeCap less than the current baseFee, so add a metrics to calculate the real pending tx
2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?