Skip to content

Commit 6216fdf

Browse files
madisoncarter1234refcellhaardikk21
authored
test: add EIP-7702 delegation transaction tests for pending state (#281)
* test: add EIP-7702 delegation transaction tests for pending state Add tests for EIP-7702 authorization and delegation transactions in pending/flashblocks state per #279. Tests: - Single delegation in pending flashblock - Multiple delegations in same flashblock - Receipt retrieval for EIP-7702 transactions - Delegation followed by execution across flashblocks test_eip7702_delegation_then_execution fails with overflow at state.rs:558 - this surfaces the sporadic behavior users reported. Closes #279 * fix: prevent overflow in flashblock gas calculation Use saturating_sub instead of subtraction when calculating per-transaction gas from cumulative gas values. When multiple flashblocks belong to the same block, subsequent flashblocks may have lower cumulative gas values than earlier ones, causing an arithmetic underflow. Fixes #279 * fix(rpc): cumulative gas tracking * chore: rebase * fix: remove unnecessary saturating_sub from gas calculation test data was the issue, not the subtraction. cumulative gas values are monotonically increasing so this should never underflow --------- Co-authored-by: Andreas Bigger <[email protected]> Co-authored-by: Haardik <[email protected]>
1 parent 0262ece commit 6216fdf

File tree

5 files changed

+620
-45
lines changed

5 files changed

+620
-45
lines changed

Cargo.lock

Lines changed: 44 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)