Bankless leader proposal#5
Conversation
| 2. Check if the fee account is present in the cache, or load the account from accounts_db and store the lamport balance in the cache. | ||
| 3. If the balance is less than the fee, drop the transaction. | ||
| 4. Subtract the fee from the balance. | ||
| 5. If fee account is called by system program, or it is passed to a instruction with system program, then reduce its balance to 0 in the cache. |
There was a problem hiding this comment.
This should be done for all keys that satisfy 5, so if a system key is spent first then used as a fee payer that the cached balance is zero.
| Clients that transmit a large number of transactions per second should use a dedicated fee account. | ||
|
|
||
| Once an account fee is used by system program, it will fail the balance check until the balance cache is reset. | ||
|
|
There was a problem hiding this comment.
it might make sense to simulate some of the System program instructions over the cache, since they are relatively cheap to execute.
There was a problem hiding this comment.
Update cached balance with simulated results is better than just wipe it down to zero.
simulate some of the System program instructions over the cache
To simulate some, what are the System program instructions should not simulate?
There was a problem hiding this comment.
Probably
- System Create(account, owner=UserProgram)
- UserProgram Init(account)
wouldn't make sense. since the user program will take control of the account
| @@ -0,0 +1,126 @@ | |||
| --- | |||
| simd: '0004' | |||
There was a problem hiding this comment.
The SIMD number needs to be updated to 0005 as per the SIMD-0001 spec for numbering the SIMDs
There was a problem hiding this comment.
Please also update the filename to 0005-bankless-leader.md?
| ## Summary | ||
|
|
||
| A bankless leader does the minimum amount of work to produce a valid block. | ||
| The leader is tasked with ingress transactions, sorting and filtering valid |
There was a problem hiding this comment.
What is meant by sorting in this context? Priority sorting?
If that's the case, I think we can drop it from the description here - leader is currently free to not sort if they so choose, but it's in their self interest to do so.
|
|
||
| ### Fee Account | ||
|
|
||
| The [fee account](../terminology.md#fee_account) pays for the transaction to be |
|
|
||
| ## Drawbacks | ||
|
|
||
| There will be failed transactions in block; |
There was a problem hiding this comment.
I think the throttling of system programs should be added as a drawback. Can no longer have multiple transfers from the same account as close together since we'd need a cache reset between them.
|
|
||
| 1. At the start of the block, if the balance cache is uninitialized, set the | ||
| base fork for the balance cache to be the parent of the block and create an | ||
| empty cache. |
There was a problem hiding this comment.
spacing
| empty cache. | |
| empty cache. |
| the leader is likely to be producing the next block while the replay stage for | ||
| the first block is playing. | ||
|
|
||
| When the leader finishes the replay stage it can reset the balance cache by |
There was a problem hiding this comment.
clarification, finishes replay for the slot?
|
Hey @taozhu-chicago, Under SIMD-1, this proposal is now considered stagnant. I understand a lot of people are interested in this SIMD and it seems to come up in a lot of conversations. Could you champion this to getting consensus on what it means to complete it? |
|
Happy to champion it, but imho it might be better to to put it on back burner atm. When the time comes, I'll consolidate opinions and ideas in small group before re-open/refresh this SIMD. |
IMO let's close this and re-open with a reference to this old SIMD once implementing it in the near term(~6 months) becomes more realistic |
|
sounds good to me |
…on_fees_mvines_comments nit based on comments
Refreshed and moved bankless leader proposal to SIMD process