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 a new decorator for L1 data fees #268

Closed
Tracked by #204
natebeauregard opened this issue Oct 24, 2024 · 0 comments · Fixed by #270
Closed
Tracked by #204

Add a new decorator for L1 data fees #268

natebeauregard opened this issue Oct 24, 2024 · 0 comments · Fixed by #270
Assignees

Comments

@natebeauregard
Copy link
Collaborator

natebeauregard commented Oct 24, 2024

Overview
Currently, Monomer applications will contain all execution gas fees in the FeeCollector module account.

However, we need to add gas consumption for L1 data fees as well to fulfill the OP Stack Spec and compensate the sequencer for posting data on L1. To do this, we can add a new decorator to the default AnteHandler to calculate the L1 data fee. For posting batches via blobs, we can use the following formula:

(compressedTxSize) * (16*l1BaseFee*lBaseFeeScalar + l1BlobBaseFee*l1BlobBaseFeeScalar) / 1e6

Tasks

  • Update monogen to use a custom AnteHandler for regular transactions.
    • We’re currently using a custom AnteHandler to bypass signatures and fees for Deposit txs, however we’ll want to use a custom one for regular txs as well to add an additional decorator to the default x/auth AnteHandler
  • Add a new decorator (ConsumeGasForL1DataFeeDecorator) to the AnteHandler to include cosuming gas for L1 data fees.
    • Can be based on ConsumeGasForTxSizeDecorator
    • Use Ecotone calculation for blob support.
@natebeauregard natebeauregard self-assigned this Oct 24, 2024
This was referenced Oct 24, 2024
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 a pull request may close this issue.

1 participant