@@ -53,7 +53,7 @@ trades and ensure a more secure and efficient network environment.
53
53
compute-units applied to a given resource.
54
54
- * cost rate* : denominated in ` lamport/cu ` , it represents the cost per
55
55
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
57
57
* compute-unit utilization* , applies a # algorithm to provide current
58
58
* cost rate* .
59
59
- * 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
77
77
` alpha = 2 / (N+1) ` .
78
78
- # Algorithm:
79
79
- 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 ` .
81
81
- For each block, if an account's EMA * compute-unit utilization* is more than
82
82
half of its max limit, its write-lock * cost rate* increases by 1%. If it's
83
83
below half, the * cost rate* decreases by 1%.
@@ -97,15 +97,15 @@ lock an account, calculated as `compute-unit-pricer.cost-rate() * transaction.re
97
97
priority fee, constitutes the total fee for the transaction.
98
98
- Leader checks fee payer's balance before scheduling the transaction.
99
99
- 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
101
101
as-is;
102
102
- Ensuring cost tracking is enabled at the replay stage.
103
103
- End of Block Processing:
104
104
- Identify write-locked accounts with * compute-unit utilization* > half of
105
105
account max CU limit. Add/update bank's account_write_lock_fee_cache.
106
106
- 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 .
109
109
- Fee Handling:
110
110
- Collected write-lock fees are 100% burnt.
111
111
- Collected priority fees are 100% rewarded.
0 commit comments