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

Add txpool metrics for TxType and FeeCurrency #199

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

karlb
Copy link

@karlb karlb commented Aug 6, 2024

These are helpful to track the usage of our fee currency feature.

Adding gauges to track the exact amount of fee currency txs in the tx pool would be possible, but cause a larger diff that is spread out across multiple functions.

I also refrained from adding tracking to the state transition, since no metrics are collected inside the state transition at the moment. I wanted to stay close to the upstream code and correctly tracking the values when changes can be reverted at any time is not straightforward.

See #74.

Example output for the new metrics after running the viem e2e tests:

"txpool/feecurrency/0x000000000000000000000000000000000000cE16.count": 4,
"txpool/feecurrency/0x000000000000000000000000000000000000cE16.fifteen-minute": 0.7567675751254122,
"txpool/feecurrency/0x000000000000000000000000000000000000cE16.five-minute": 0.6771853799124913,
"txpool/feecurrency/0x000000000000000000000000000000000000cE16.mean": 0.07459095132259183,
"txpool/feecurrency/0x000000000000000000000000000000000000cE16.one-minute": 0.3476785668056627,
"txpool/txtype/accesslist.count": 0,
"txpool/txtype/accesslist.fifteen-minute": 0,
"txpool/txtype/accesslist.five-minute": 0,
"txpool/txtype/accesslist.mean": 0,
"txpool/txtype/accesslist.one-minute": 0,
"txpool/txtype/blob.count": 0,
"txpool/txtype/blob.fifteen-minute": 0,
"txpool/txtype/blob.five-minute": 0,
"txpool/txtype/blob.mean": 0,
"txpool/txtype/blob.one-minute": 0,
"txpool/txtype/cip64.count": 4,
"txpool/txtype/cip64.fifteen-minute": 0.7567675751254122,
"txpool/txtype/cip64.five-minute": 0.6771853799124913,
"txpool/txtype/cip64.mean": 0.07272912131376315,
"txpool/txtype/cip64.one-minute": 0.3476785668056627,
"txpool/txtype/dynamicfee.count": 9,
"txpool/txtype/dynamicfee.fifteen-minute": 1.7027270440321776,
"txpool/txtype/dynamicfee.five-minute": 1.5236671048031056,
"txpool/txtype/dynamicfee.mean": 0.16364100744682356,
"txpool/txtype/dynamicfee.one-minute": 0.7822767753127412,
"txpool/txtype/legacy.count": 0,
"txpool/txtype/legacy.fifteen-minute": 0,
"txpool/txtype/legacy.five-minute": 0,
"txpool/txtype/legacy.mean": 0,
"txpool/txtype/legacy.one-minute": 0,

These are helpful to track the usage of our fee currency feature.

Adding gauges to track the exact amount of fee currency txs in the tx
pool would be possible, but cause a larger diff that is spread out
across multiple functions.

I also refrained from adding tracking to the state transition, since
no metrics are collected inside the state transition at the moment. I
wanted to stay close to the upstream code and correctly tracking the
values when changes can be reverted at any time is not straightforward.

See #74.
@karlb karlb marked this pull request as ready for review August 6, 2024 13:39
@karlb karlb merged commit 57b63f8 into celo7 Aug 7, 2024
7 checks passed
@karlb karlb deleted the karlb/metrics branch August 7, 2024 12:52
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