feat: add EIP-7702 SetCode workload for type-4 stress - #54
Open
nekomoto911 wants to merge 6 commits into
Open
Conversation
Add workload = "eip7702" that deploys a minimal delegate, cascade-funds ETH only, and issues self-sponsored type-4 SetCode txs at target TPS. Track nonce_increment (2 for self-sponsored 7702) so the address pool advances correctly after inclusion. Keep enable_swap_token as a legacy fallback when workload is omitted.
The previous solc empty-contract runtime ended in REVERT (5f80fd), so every self-sponsored type-4 call landed with status=0x0. Use a one-byte STOP runtime so the call succeeds after set-code.
Replace the no-op STOP delegate with BatchExecutor.multiSend so each type-4 tx re-delegates the sender then calls the EOA itself with a batch of ETH transfers (default 4 recipients × 1 gwei). Funds circulate among workers; gas limit raised for auth + multi-call overhead.
multiSend targets other workers that already set code to BatchExecutor.
Without receive/fallback, empty-calldata value transfers hit the selector
dispatch and revert ("send"), so most type-4 txs failed after the first
round of delegations. Trace confirmed: second CALL to a 0xef0100 EOA reverted.
Public testnet default rpc.txfeecap is 1 ETH. EIP-7702 stress used 350k gas × 5000 Gwei = 1.75 ETH and was rejected at send. Keep tip at 500 Gwei (txpool promote) but maxFee 1000 Gwei so 7702 reserve is 0.35 ETH. Lockstep faucet per-tx budget to 0.35 ETH. Stop scaling cascade to 99% of on-chain faucet balance (breaks shared multi-leg faucets). Use global bench fees for 7702 delegate deploy (0.5 ETH product under cap).
keanji-x
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workload = "eip7702"that deploys a minimal fallback-only delegate from the faucet, cascade-funds ETH only (skips ERC20 deploy/distribution), and drives self-sponsored type-4 SetCode transactions attarget_tps.nonce_increment(2 for self-sponsored 7702: tx + auth) so the address pool advances correctly after inclusion; keepenable_swap_tokenas a legacy fallback whenworkloadis omitted.bench_config.template, and extend recover snapshots witheip7702_delegate.Test plan
cargo check/cargo build --releaseon this branchworkload = "eip7702", lowtarget_tps(e.g. 10), finiteduration_secs; confirm delegate deploy, ETH faucet, and type-4 inclusion--recoverand verify snapshoteip7702_delegateis reused without redeployingworkload = "erc20"(or omit +enable_swap_token = false) still runs ERC20 pathworkload = "swap"(or legacyenable_swap_token = true) still runs Uniswap path