-
Notifications
You must be signed in to change notification settings - Fork 177
SIMD-0290: Relax Fee Payer Constraint #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4d3c860
to
8753f0f
Compare
Invalid fee payer transactions will count their requested, | ||
or default, compute units (CUs) towards block limits. | ||
This is intended to make it strictly cheaper to process invalid fee payer | ||
transactions compared to valid fee payer transactions of the same construction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it strictly cheaper to process invalid fee payer transactions compared to valid fee payer transactions of the same construction.
Can you say more about why "cheaper to process" invalid transaction that uses request (or default) CUs? Does it refer to request_cu usually greater than actual_cu, therefore fee/requested_cu will be smaller than fee/actual_cu (which is the case for valid transaction), therefore invalid fee payer transactions will have lower priority?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using assumption that checking fee payer is a constant cost regardless of whether it can pay fees or not (not really true, but for the cost-model it is what we assume).
Then we 3 paths, and the things we do:
- Account exists and has enough funds:
- check if fee payer account exists
- check fee payer account balance
- execution
- Account exists and doesn't have enough funds:
- check if fee payer account exists
- check fee payer account balance
- (stop early)
- Account does not exist:
- check if fee payer account exists
- (stop early)
^ we do less work, i.e. don't need to do any execution checks if the fee payer cannot pay.
The transaction will have no effect on the state. | ||
|
||
Invalid fee payer transactions will count their requested, | ||
or default, compute units (CUs) towards block limits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrt "default", if SIMD-0172 is approved, default will be zero, or a small number (chances are smaller than its would-be actual CUs).
Maybe I'm missing something, but doesn’t this open up an attack surface where I can spam the network with transactions from invalid fee payers? If SIMD-0172 is active, I can also artificially inflate CU requests per tx, consuming a large portion of the block’s CU budget with zero cost. Since these transactions are still stored in the block, even if they aren't executed, I could embed arbitrary data into the instruction buffers and use the chain as a rent-free storage or broadcast layer. Anyone could then retrieve that data later over RPC, effectively turning Solana into a no-cost messaging layer. |
You can send them sure, but why would a (non-malicious) leader include them if they do not provide income? They wouldn't. In fact, any transactions that cannot pay fees is a sign of a bad leader not doing what they should. |
Have we considered how a leader would know this, without knowing anything about the account's state? |
Nothing states the leader doesn't know the account state - the leader can have scheduling of only what it knows the state of (or at least a minimum bound on balance). This also isn't the same as being fully synced up on execution. Let's consider 2 scenarios:
In case 1, lets start at slot N with a balance of 100_000 lamports. In case 2, lets say we have a starting balance of 100_000 lamports as of slot N. |
But doesn't this imply that you're keeping track of at least the state transition function for the I'm also under the assumption that block execution will lag behind block production by |
Yes, if leaders do not want to waste their blockspace (they don't) AND want to be able to fall behind in execution they will have some way to estimate fee payer balance - in many cases this will not require full execution and can be done much much faster than execution. How they do this is an implementation detail so doesn't belong in a SIMD. It does not have to be what I described above, leaders could include only fee-payers with state they are fully synced up on. Leaders are highly incentivized to be as close to the tip as possible since that is how they will have the best fee-payer balance estimates, and thus likely leads to more fees collected. |
@apfitzge okay thanks for the discussion! The leader incentive-based approach to avoiding chain spam makes sense to me. If you have a crappy "fee payer funded probability graph", you aren't making money!
Fair, but it doesn't hurt to be forward-thinking about protocol features that can make this easier to estimate, if need be. |
@Benhawkins18 think this is ready to merge. |
No description provided.