Update EIP-8141: statically disallow approval scope on atomic-batch frames - #12109
Update EIP-8141: statically disallow approval scope on atomic-batch frames#12109Marchhill wants to merge 4 commits into
Conversation
File
|
94fe894 to
b847843
Compare
756cd75 to
a8d0ead
Compare
|
The spec already closes the neighbouring cases statically, with If the rollback stays, invalidity is only decidable after executing much of the transaction, so whoever builds from private order flow pays for that execution and learns the outcome at the end. Rolling back The refund is described as going to the |
…rames Replace the atomic-batch approval-context rollback with a static constraint: approval scope flags must be zero on every frame of an atomic batch, including its terminating frame. Since APPROVE requires its scope in frame.flags, the approval context cannot change inside a batch, so unrolling never involves the nonce increment or max_cost collection, and validity does not depend on the batch outcome. The frame-revert rule is kept: an inner call from the resolved target can APPROVE and the enclosing frame can still revert, so the approval context must be discarded with that frame's state changes. Tie the payer refund to the final value of payer, since a discarded approval means more than one resolved_target may have called APPROVE.
|
Agreed — the static rule is the better fix. I couldn't find a real use case for approving inside a batch: the validation-prefix rules already exclude such transactions from the public mempool, and for private flow the rollback gives "pay from proceeds" nothing — a failed batch unsets |
Statically disallows approval scope on any frame of an atomic batch (including its terminating frame), closing the in-batch
APPROVE_PAYMENTdivergence before execution — no nonce/max_costrollback and nosender_approved-rollback escalation. SinceAPPROVErequires the scope inframe.flags, the check is static. Keeps the frame-revert clause (the inner-call-APPROVE-then-enclosing-revert case, independent of batches) and ties the refund to the finalpayer. Supersedes the earlier batch-unroll rollback approach per review.Also: fixed linting.