Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
stoobie authored Jan 28, 2024
1 parent 3e50f50 commit 963c507
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ where:
* stem:[$v$] is a vector that represents resource usage, where each of its entries, stem:[$v_k$], corresponds to different resource types: Cairo steps and number of applications of each builtin.
+
For more information see xref:#calculation_of_computation_costs[Calculation of computation costs].
* stem:[$n$] is xref:#storage_updates[the number of unique contracts updated]. Note that this also takes into account contract deployment, even if the storage of the newly deployed contract was untouched, i.e. stem:[$n\ge\ell$].
* stem:[$n$] is xref:#storage_updates[the number of unique contracts updated], which includes changes to, or new deployments of, classes of existing contract instances, even if the storage of the newly deployed contract is untouched. In other words, stem:[$n\ge\ell$].
* stem:[$m$] is the number of values updated, not counting multiple updates for the same key. Notice that stem:[$m\ge 1$] is always true, because the sequencer's balance is always updated, which does not incur any fee.
* stem:[$t$] is the number of L2->L1 messages sent, where the corresponding payload sizes are denoted by stem:[$q_1,...,q_t$].
* stem:[$\ell$] is the number of contracts whose class was changed, which can happen on deployment of a new version of the class, or on applying the `replace_class` syscall.
Expand Down Expand Up @@ -195,7 +195,7 @@ The following formula describes the storage update fee for a transaction:

where:

* stem:[$n$] is xref:#storage_updates[the number of unique contracts updated]. Note that this also takes into account contract deployment, even if the storage of the newly deployed contract was untouched, i.e. stem:[$n\ge\ell$].
* stem:[$n$] is xref:#storage_updates[the number of unique contracts updated], which includes changes to, or new deployments of, classes of existing contract instances, even if the storage of the newly deployed contract is untouched. In other words, stem:[$n\ge\ell$].
* stem:[$m$] is the number of values updated, not counting multiple updates for the same key. Notice that stem:[$m\ge 1$] is always true, because the sequencer's balance is always updated, which does not incur any fee.
* stem:[\text{contract_update_discount}] is 312 gas, which is discounted for every updated contract. This discount is a result of the fact that out of the stem:[$2n$] words caused by updating contracts, stem:[$n$] words are short, including at most 6 non-zero bytes:
+
Expand Down

0 comments on commit 963c507

Please sign in to comment.