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

Track pricing data in sequencer and batch poster. Add option to decline incoming transactions during extreme l1 pricing conditions [NIT-1240] #2180

Merged
merged 7 commits into from
Mar 25, 2024

Conversation

ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Mar 11, 2024

This PR adds following metrics to batchposter

  • l1gasprice - current L1 gas price i.e min(baseFee, blobFee/16)
  • l1gaspriceestimate - L2 estimation of L1 gas price
  • latestbatchsurplus - surplus on latest batch

Adds following metrics to sequencer

  • l1gasprice - current L1 gas price i.e min(baseFee, blobFee/16)
  • calldataunitsbacklog - total size of transactions in call data units that are not yet posted to L1
  • unusedl1gascharge - total L1 gas charged from L2 transactions not yet posted to L1
  • currentsurplus - current L1 pricing surplus
  • expectedsurplus - expected value for surplus which is currentsurplus + (total L1 gas charged from L2 transactions not yet posted to L1) - (L1 charge if we post all txs to L1 in current price)

Adds an option in Sequencer

  • to log warnings when expectedsurplus is below a given threshold value configurable by --execution.sequencer.expected-surplus-soft-threshold flag
  • to deny incoming transactions when expectedsurplus is below a given threshold value configurable by --execution.sequencer.expected-surplus-hard-threshold flag

NIT-1240

…ne incoming transactions during extreme l1 pricing conditions
@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Mar 11, 2024
@ganeshvanahalli ganeshvanahalli marked this pull request as ready for review March 11, 2024 22:28
@ganeshvanahalli ganeshvanahalli changed the title Track pricing data in sequencer and batch poster. Add option to decline incoming transactions during extreme l1 pricing conditions Track pricing data in sequencer and batch poster. Add option to decline incoming transactions during extreme l1 pricing conditions [NIT-1240] Mar 18, 2024
@joshuacolvin0 joshuacolvin0 merged commit 7e19512 into batchposter-l1price-metrics Mar 25, 2024
6 checks passed
@joshuacolvin0 joshuacolvin0 deleted the track-l1pricing-data branch March 25, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants