SIMD-0109: Add a tipping mechanism to send SOL to the current leader#109
SIMD-0109: Add a tipping mechanism to send SOL to the current leader#109buffalu wants to merge 6 commits into
Conversation
|
Why not any asset? I think this can be accomplished by just formalizing a public key with a known private key that all the leaders can use to sweep arbitrary tips |
at first glance this would single threads the runtime. |
it would be interesting to think if there's a way to do this with many tokens w/o single threading the runtime though... could you just do an on-chain swap + tip in SOL? |
|
yes it would either force serial execution or require on-demand accounts loading (which people think they want, but they don't). lamports are the only thing that we can unilaterally credit |
|
i don't think this actually needs any new program, just a syscall to credit the leader and a new system program instruction that wraps it for convenience (tx introspection, really). syscall accumulates lamports in the tx context. end of batch tx context accumulators are collated into an atomic in the bank. end of slot, pay out to leader collector address, same as tx fees. if we really need the ability to specify a custom collector address, imo that's a separate simd and extends the vote account |
what are you imagining the leader collector address is w/o the custom collector address? the identity/authorized voter? |
active authorized voter, just like today (which is the identity if the operator is mildly competent) |
ack on two SIMDs. that's fine with me. will look closer at your suggested method of using syscall but at first glance seems reasonable |
|
notes from discord i need to add: alternatives considered:
|
|
Thanks for the proposal good sir 🚀 Main two pain points for me are:
|
agree on all the points above. hoping with this syscall and/or credit-only account that accumulates into AtomicU64 can help remove the sequential execution piece! |
Can you elaborate on the idea of the AtomicU64? I don't even think this has to be strictly "atomic", perse. Since state is only hashed at the end of each block, I assume this is an account where a valid tx can declare an "add" or a "sub" to this account and the balances are totaled at the end of the block when state is hashed? Follow up: I don't like the name "Atomic", but I agree that each individual executor thread can just track the balances and we can add them mux-style at the end of the block before state is hashed. So from a protocol level we can give searchers/validators the ability to declare their intention to tip/withdraw SOL from the account by the end of the block in which it's included. Reads of the account could return total value from the previous block. |
| ### Tip Program | ||
|
|
||
| I suggest a tip program as a Solana Native Program with the following | ||
| instructions and state. The TipConfigurationState can either be stored in a |
There was a problem hiding this comment.
either stored in votestate: where is the other location?
|
|
||
| Without the epoch rollover constraint on the tip receiver, | ||
| validators would be able to sandwich transactions that contain large tips, | ||
| potentially stealing or misappropriating tips. |
|
Why not add a new Sysvar which any lamports are sweeped to the leader? |
|
superseded as per #109 (comment) |
Transactions prioritized out of band can't dynamically tip SOL to the leader in protocol.
This SIMD addresses that by setting some context on why this is helpful and solves it with the addition of a Native Program, the Tip Program.