Skip to content

Bankless leader proposal#5

Closed
tao-stones wants to merge 7 commits into
solana-foundation:mainfrom
tao-stones:bankless-leader
Closed

Bankless leader proposal#5
tao-stones wants to merge 7 commits into
solana-foundation:mainfrom
tao-stones:bankless-leader

Conversation

@tao-stones
Copy link
Copy Markdown
Contributor

Refreshed and moved bankless leader proposal to SIMD process

Comment thread 0004-bankless-leader.md Outdated
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread 0004-bankless-leader.md Outdated
Comment thread 0004-bankless-leader.md Outdated
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might make sense to simulate some of the System program instructions over the cache, since they are relatively cheap to execute.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably

  1. System Create(account, owner=UserProgram)
  2. UserProgram Init(account)
    wouldn't make sense. since the user program will take control of the account

@jacobcreech jacobcreech added standard SIMD in the Standard category core Standard SIMD with type Core labels Dec 13, 2022
Comment thread 0004-bankless-leader.md Outdated
Comment thread 0004-bankless-leader.md Outdated
@tao-stones tao-stones changed the title move and update bankless leader proposal to SIMD process Bankless leader proposal Dec 15, 2022
Comment thread 0004-bankless-leader.md Outdated
@@ -0,0 +1,126 @@
---
simd: '0004'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SIMD number needs to be updated to 0005 as per the SIMD-0001 spec for numbering the SIMDs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the filename to 0005-bankless-leader.md?

Comment thread 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread 0005-bankless-leader.md

### Fee Account

The [fee account](../terminology.md#fee_account) pays for the transaction to be
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this file exist?

Comment thread 0005-bankless-leader.md

## Drawbacks

There will be failed transactions in block;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread 0005-bankless-leader.md

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

Suggested change
empty cache.
empty cache.

Comment thread 0005-bankless-leader.md
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clarification, finishes replay for the slot?

@jacobcreech
Copy link
Copy Markdown
Contributor

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?

@tao-stones
Copy link
Copy Markdown
Contributor Author

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.

@jacobcreech
Copy link
Copy Markdown
Contributor

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

@tao-stones
Copy link
Copy Markdown
Contributor Author

sounds good to me

godmodegalactus added a commit to blockworks-foundation/solana-improvement-documents that referenced this pull request Oct 15, 2023
…on_fees_mvines_comments

nit based on comments
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core Standard SIMD with type Core stagnant standard SIMD in the Standard category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants