Skip to content

Commit 0617e70

Browse files
committed
updates
1 parent 7151fd7 commit 0617e70

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

proposals/0110-exponential-fee-for-write-lock-accounts.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ trades and ensure a more secure and efficient network environment.
5353
compute-units applied to a given resource.
5454
- *cost rate*: denominated in `lamport/cu`, it represents the cost per
5555
compute-unit at a given condition.
56-
- *compute unit pricer*: a componenet tracks Exponential Moving Average of
56+
- *compute unit pricer*: a component tracks Exponential Moving Average of
5757
*compute-unit utilization*, applies a # algorithm to provide current
5858
*cost rate*.
5959
- *write lock fee*: denominated in `lamport`, it is fee dedicated for write
@@ -77,7 +77,7 @@ lock an account, calculated as `compute-unit-pricer.cost-rate() * transaction.re
7777
`alpha = 2 / (N+1)`.
7878
- # Algorithm:
7979
- Adjusts write-lock *cost rate* based on an account's EMA *compute-unit
80-
utilization*. Initial write-lock cost rate is `1000 lamport/CU`.
80+
utilization*. Initial write-lock cost rate is `1000 micro-lamport/CU`.
8181
- For each block, if an account's EMA *compute-unit utilization* is more than
8282
half of its max limit, its write-lock *cost rate* increases by 1%. If it's
8383
below half, the *cost rate* decreases by 1%.
@@ -97,15 +97,15 @@ lock an account, calculated as `compute-unit-pricer.cost-rate() * transaction.re
9797
priority fee, constitutes the total fee for the transaction.
9898
- Leader checks fee payer's balance before scheduling the transaction.
9999
- Cost Tracking:
100-
- Cost_tracker tracks CUs for the current block and each write-locked accounti
100+
- Cost_tracker tracks CUs for the current block and each write-locked account
101101
as-is;
102102
- Ensuring cost tracking is enabled at the replay stage.
103103
- End of Block Processing:
104104
- Identify write-locked accounts with *compute-unit utilization* > half of
105105
account max CU limit. Add/update bank's account_write_lock_fee_cache.
106106
- Adding new account into LRU cache could push out eldest account;
107-
- LRU cache has capacity of 1024, which should be large enough for hot accounts
108-
in 150 slots.
107+
- LRU cache has capacity of 2048, which is 2* worst case block, should
108+
be enough to prevent cache attack.
109109
- Fee Handling:
110110
- Collected write-lock fees are 100% burnt.
111111
- Collected priority fees are 100% rewarded.

0 commit comments

Comments
 (0)