Skip to content

Commit

Permalink
docs: Fees update in yellow paper (#3486)
Browse files Browse the repository at this point in the history
This PR contains minor changes to the fees section of the yellow paper

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).

---------

Co-authored-by: spypsy <spypsy@outlook.com>
Co-authored-by: spypsy <spypsy@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 4, 2023
1 parent 91cb369 commit a8b2608
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yellow-paper/docs/gas-and-fees/gas-and-fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,15 @@ This would appear to introduce a circular dependency whereby an appropriate fee
- **l1FeeDistributionGas** - The amount of L1 gas the transaction is willing to pay for execution of the fee distribution function
- **l2FeeDistributionGas** - The amount of L1 gas the transaction is willing to pay for execution of the fee distribution function

Initially, the values of transaction gas limits can be set to a very high number, the base gas limits set to values corresponding to the user's chosen amortization level and the fees aet to 0. The transaction can be simulated under these conditions and simulation will provide actual gas consumption figures. Simulation can then be repeated with more realistic values of gas limits and the updated gas consumption figures will be reported. A few iterations of this process will enable the user to establish and prepare an appropriate fee.

Simulation of the transaction will provide feedback as to it's gas consumption, this can be repeated to converge on the optimum fee to be prepared. The private portion of the transaction will be proven via the private kernel circuit resulting in a number of fee related public inputs:
Simulation of the transaction will provide feedback as to it's gas consumption, this can be repeated to converge on the optimum values of fee and gas limits for the transaction. The private portion of the transaction will be proven via the private kernel circuit resulting in a number of fee related public inputs:

- **feeCommitments** - New commitments generated as part of fee preparation
- **feeNullifiers** - New nullifiers generated as part of fee preparation
- **feePreparation** - A single public function call to be made as part of fee preparation
- **feeDistribution** - A single public function call to be made as part of fee distribution
- **feeEncryptedLogsHash** - The hash of encrypted logs generated by the fee payment
- **feeUnencryptedLogsHash** - The hash of unencrypted logs generated by the fee payment
- **feePerL1Gas** - The fee provided per unit of L1 gas
- **feePerL2Gas** - The fee provided per unit of L2 gas
- **l1BaseGasLimit** - The upper bound of L1 amortized gas the transaction is willing to pay for
Expand Down

0 comments on commit a8b2608

Please sign in to comment.