Skip to content

Improve initial fee implementation #1673

@PhilippGackstatter

Description

@PhilippGackstatter

As a follow-up to the initial fee implementation (i.e. #1614), we can do the following extensions. For each of these we could create a sub-issue.

  • Add the remaining nullifier_base_fee and output_note_base_fee as mentioned in Add fee parameters to the BlockHeader #1612. This means integrating them into the compute_fee procedure and testing them in test_fee.rs.
  • Implement EIP-1559-style demand based changes. Here we have to do some research on the concrete mathematical model to use. The mechanism in EIP-1559 may be a bit too sensitive and a better approach suggested to us was a momentum-based approach where the base fee increases in a larger step only if there are 3-4 blocks in a row that are above target utilization.
    • This also requires defining min and max bounds.
  • We should enable users to set a tip on the transaction. Either an absolute value or a value relative to the fee computed in the epilogue.
    • If that value is provided via the advice provider, then we have to make sure that it is covered by the tx summary, by taking it out of the vault before invoking execute_auth_procedure. If we take it out together with the computed fee a malicious remote prover could change this value. This would only work with an absolute value then.
    • If we want to use a relative value, then we may have to commit to the value by providing it as an input on the transaction stack.
  • Another line of work is to update batches and blocks to integrate fees into their logic, i.e. validate the fee of the transaction and output notes that contain the tip for the batch and block producers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feesRelated to fees.kernelsRelated to transaction, batch, or block kernels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions