This repository was archived by the owner on Nov 11, 2026. It is now read-only.
Repository navigation
Move evm2 to the revision reth v2.10.0 pins - #1
Merged
Merged
Conversation
…list (alloy-rs#835) `Precompiles::base` takes a read lock on the global `BASE_PRECOMPILES` map on every call. Taking a read lock writes its reader count, a cache line that bounces between last-level caches when threads on several of them build EVMs at once, as @gakonst found in alloy-rs#763. This replaces the `RwLock<Option<HashMap>>` with an append-only list of nodes, one per host type. The first node lives inline in the static and later nodes hang off `OnceLock<Box<_>>` links; each node owns its type-erased cache, so nothing is leaked by hand. A node is never removed or replaced and each link is set once, so a reader only loads, and a creator that loses a race uses the winner's node. The common single-host-type case allocates only the cache itself, which stays boxed because the list holds caches of different types behind one `dyn Any`. There is no `unsafe` and no new dependency, and the `no_std` path is unchanged. This is a per-EVM-construction cost. It matters for callers that build an EVM per transaction on many threads; I make no claim about block-level speedup. Measured on an AMD EPYC 9124 (4 L3s), threads pinned, `Precompiles::base(Cancun)` in a release build, ns per call from the slowest thread, median of 3 rounds: | Threads | main | this PR | |---|---|---| | 1 | 31.6 ns | 2.4 ns 🟢 | | 4, one L3 | 120.9 ns | 2.4 ns 🟢 | | 4, 4 L3s | 180.0 ns | 2.4 ns 🟢 | | 16, 4 L3s | 655.3 ns | 4.1 ns 🟢 |
Jump resolution keys each block state on the jump targets on its stack, which in practice is the call chain. A recursive call adds a return address per level, so a recursion never reaches a fixed set of contexts: the full-context fixpoint runs out of budget, and the coarser fallbacks join the frames of every level, which loses the return addresses of the code below the recursion. That one unresolved return then makes evm2 discard every other resolution in the contract. In Solar's output this is the last cause of unresolved jumps at `-Osize` (quicksorts, OZ reentrancy mocks, the `_update`/`_mint` mutual recursion in `ERC20WithAutoMinerReward`, Solady's `_execute`), and the 12 jumps left in the `solady-algorithms` runtime bench. This adds a folded context mode that keeps a recursion's contexts finite without joining its frames. A stack that holds the same jump target twice keeps only the entries above the deeper copy, and the rest moves into a segment: a stack fragment shared by every state with the same context, which can continue in other segments, including itself. A block that reads below its state's entries runs again on each segment below, with the segment's entries put back under the state, so every caller chain still sees its own frames and the returns resolve to their full set of return sites. Joins keep the union of the segments of equal-height stacks and fall back to the existing truncation otherwise. Shared return stubs (blocks that only shuffle the stack and jump) count from their third copy, since compilers push them for many nested non-recursive calls. Folding also fires on calls that share a jump target without a recursion, such as a `0x20` that happens to equal a `JUMPDEST` pc, and there it joins the frames of unrelated callers. So the analysis still runs the full-context mode first, and tries the folded mode only when Full does not converge or leaves a `Top` jump. It keeps the folded result only when it converges and resolves every jump (a host instruction in a state with segments counts as not converging, since the host may write any stack word), and otherwise falls back from Full as before. A contract that Full resolves gets exactly the same analysis as on `main`. Interpretation now stops before recording an instruction that underflows, so a state that continues in segments never records `Top` for an operand that lives in a segment. On a stack that is not truncated, the underflow halts at runtime, so this is also more precise outside folding. `recursive_return` used a constant depth and dropped each caller's frame, so its last return really underflows, and Full now resolves it exactly; the fixture now recurses to an unknown depth and keeps its frames. ## Benchmarks Counts and solady compile numbers compare against `main` with alloy-rs#791; the per-call and adversarial numbers predate that merge. The JIT bench tables at the end compare against `main` with the latest merge. Solar census of 581 runtime contracts (Solar `b58a650db`, the -Ztune corpus), dynamic jumps left in the final IR: | | main | this PR | |---|---|---| | `-Osize` | 12 contracts / 339 jumps | 0 / 0 🟢 | | `-Ogas` | 16 / 435 | 6 / 338 🟢 | The 6 contracts left at `-Ogas` are packed u16 jump tables, not recursion. No contract regresses. The 2306 contract codes in `data/mainnet-25347446-25347455.bin.zst`, `evm2 run --parse-only`: | | main | this PR | |---|---|---| | contracts with dynamic jumps | 33 | 23 🟢 | | dynamic jumps | 2763 | 1799 🟢 | | `--display` output of the 2273 contracts `main` resolves | | identical | | analysis `instructions:u`, contracts `main` resolves (before alloy-rs#791) | 248.57G | 248.39G (-0.1%) | | analysis `instructions:u`, the 10 newly resolved (before alloy-rs#791) | 3.70G | 4.55G (+22.9%) 🔴 | | analysis `instructions:u`, the 29 then still unresolved (before alloy-rs#791) | 12.30G | 15.62G (+27.0%) 🔴 | The unresolved contracts pay for a folded attempt that fails, on top of the same Full, Coarse and Insensitive attempts as on `main`. `solady-algorithms`, `instructions:u` from `perf stat`: | | main | this PR | |---|---|---| | `evm2 run <hex> 0` (parse and JIT compile, whole process) | 757.7M | 637.3M (-15.9%) 🟢 | | `evm2 run --parse-only` (whole process) | 47.0M | 49.9M (+6.2%) 🔴 | | `sort(uint256[200])` per call | 38.13K | 36.63K (-3.9%) 🟢 | | `decimal(uint256)` per call | 17.49K | 17.51K (+0.1%) | | `decode(string)` per call | 18.39K | 18.34K (-0.3%) | Adversarial inputs, `evm2 run --parse-only` instructions (whole process, about 9M of it startup): | input | main | this PR | |---|---|---| | n self-recursive functions with m sites, c callers: 16/3/4 | 57M, 32 unresolved | 42M, 0 unresolved 🟢 | | same, 32/4/8 | 137M, 64 unresolved | 95M, 0 unresolved 🟢 | | same, 8/8/8 | 56M, 16 unresolved | 82M, 16 unresolved 🔴 | | random mutual recursion, 32 functions × 8 sites | 122M | 162M 🔴 | | random mutual recursion, 64 functions × 8 sites | 219M | 288M 🔴 | | random mutual recursion, 128 functions × 4 sites | 270M | 360M 🔴 | | a chain of 1000 blocks that each push their own address | 166M | 164M | Every attempt keeps its own budget, so the worst case is one extra full-context attempt. On the JIT benches, `opt.s` changes in 0/31 and total compile instructions grow by 0.2% (snailtracer +2.3%, where Full and the folded mode both run out of budget before Coarse converges, and balancer_vault +1.0%, which Full resolves, from the segment bookkeeping in the shared fixpoint loop). The generated code is identical, so the per-execution instruction deltas in the runtime table (up to +2.1%) are measurement noise. Head `421ddd7572` vs base `origin/main` (`64167bf0f1`). ### Codegen statistics `opt.s` changed in 0/31 benchmarks. | benchmark | unopt.ll | opt.ll | opt.s | jit size | i256 loads | i256 stores | mresize | spills | reloads | |:------------|-----------:|---------:|--------:|-----------:|-------------:|--------------:|----------:|---------:|----------:| | **TOTAL** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | | **GEOMEAN** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | <details><summary>Full details</summary> | benchmark | unopt.ll | opt.ll | opt.s | jit size | i256 loads | i256 stores | mresize | spills | reloads | |:------------------------|----------------------------:|--------------------------:|--------------------------:|----------------------------:|------------------------:|------------------------:|----------------------:|----------------------:|------------------------:| | fibonacci-calldata | 335<br>335<br>= | 114<br>114<br>= | 355<br>355<br>= | 348 B<br>348 B<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | 6<br>6<br>= | 5<br>5<br>= | | factorial | 331<br>331<br>= | 116<br>116<br>= | 391<br>391<br>= | 478 B<br>478 B<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | 7<br>7<br>= | 7<br>7<br>= | | counter | 992<br>992<br>= | 341<br>341<br>= | 603<br>603<br>= | 785 B<br>785 B<br>= | 9<br>9<br>= | 9<br>9<br>= | 3<br>3<br>= | 0<br>0<br>- | 0<br>0<br>- | | snailtracer | 60156<br>60156<br>= | 26888<br>26888<br>= | 33501<br>33501<br>= | 95.2 KiB<br>95.2 KiB<br>= | 1515<br>1515<br>= | 1973<br>1973<br>= | 449<br>449<br>= | 16<br>16<br>= | 231<br>231<br>= | | weth | 11578<br>11578<br>= | 2825<br>2825<br>= | 4518<br>4518<br>= | 14.0 KiB<br>14.0 KiB<br>= | 178<br>178<br>= | 237<br>237<br>= | 25<br>25<br>= | 32<br>32<br>= | 92<br>92<br>= | | hash_10k | 991<br>991<br>= | 354<br>354<br>= | 670<br>670<br>= | 1.4 KiB<br>1.4 KiB<br>= | 17<br>17<br>= | 20<br>20<br>= | 5<br>5<br>= | 1<br>1<br>= | 1<br>1<br>= | | erc20_transfer | 12073<br>12073<br>= | 3811<br>3811<br>= | 4978<br>4978<br>= | 13.9 KiB<br>13.9 KiB<br>= | 160<br>160<br>= | 322<br>322<br>= | 53<br>53<br>= | 6<br>6<br>= | 6<br>6<br>= | | push0_proxy | 313<br>313<br>= | 125<br>125<br>= | 286<br>286<br>= | 350 B<br>350 B<br>= | 1<br>1<br>= | 15<br>15<br>= | 0<br>0<br>- | 0<br>0<br>- | 0<br>0<br>- | | usdc_proxy | 6054<br>6054<br>= | 1583<br>1583<br>= | 2274<br>2274<br>= | 5.5 KiB<br>5.5 KiB<br>= | 54<br>54<br>= | 131<br>131<br>= | 21<br>21<br>= | 5<br>5<br>= | 5<br>5<br>= | | fiat_token | 75544<br>75544<br>= | 21440<br>21440<br>= | 29239<br>29239<br>= | 92.8 KiB<br>92.8 KiB<br>= | 1320<br>1320<br>= | 1902<br>1902<br>= | 277<br>277<br>= | 66<br>66<br>= | 65<br>65<br>= | | uniswap_v2_pair | 41668<br>41668<br>= | 12039<br>12039<br>= | 16662<br>16662<br>= | 52.5 KiB<br>52.5 KiB<br>= | 680<br>680<br>= | 1079<br>1079<br>= | 147<br>147<br>= | 55<br>55<br>= | 434<br>434<br>= | | univ2_router | 80476<br>80476<br>= | 24414<br>24414<br>= | 32740<br>32740<br>= | 112.0 KiB<br>112.0 KiB<br>= | 1675<br>1675<br>= | 2262<br>2262<br>= | 320<br>320<br>= | 107<br>107<br>= | 436<br>436<br>= | | seaport | 133044<br>133044<br>= | 51832<br>51832<br>= | 68657<br>68657<br>= | 233.6 KiB<br>233.6 KiB<br>= | 3785<br>3785<br>= | 4386<br>4386<br>= | 782<br>782<br>= | 245<br>245<br>= | 3057<br>3057<br>= | | airdrop | 26607<br>26607<br>= | 8462<br>8462<br>= | 11032<br>11032<br>= | 31.6 KiB<br>31.6 KiB<br>= | 432<br>432<br>= | 666<br>666<br>= | 91<br>91<br>= | 30<br>30<br>= | 211<br>211<br>= | | bswap64 | 1757<br>1757<br>= | 361<br>361<br>= | 622<br>622<br>= | 951 B<br>951 B<br>= | 12<br>12<br>= | 19<br>19<br>= | 6<br>6<br>= | 0<br>0<br>- | 0<br>0<br>- | | bswap64_opt | 1496<br>1496<br>= | 346<br>346<br>= | 632<br>632<br>= | 1008 B<br>1008 B<br>= | 5<br>5<br>= | 25<br>25<br>= | 6<br>6<br>= | 0<br>0<br>- | 0<br>0<br>- | | eip4788 | 631<br>631<br>= | 249<br>249<br>= | 459<br>459<br>= | 670 B<br>670 B<br>= | 12<br>12<br>= | 13<br>13<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | | eip2935 | 488<br>488<br>= | 190<br>190<br>= | 420<br>420<br>= | 554 B<br>554 B<br>= | 7<br>7<br>= | 5<br>5<br>= | 2<br>2<br>= | 0<br>0<br>- | 0<br>0<br>- | | burntpix | 9179<br>9179<br>= | 3048<br>3048<br>= | 3880<br>3880<br>= | 11.9 KiB<br>11.9 KiB<br>= | 163<br>163<br>= | 284<br>284<br>= | 26<br>26<br>= | 9<br>9<br>= | 20<br>20<br>= | | curve_stableswap | 16363<br>16363<br>= | 5666<br>5666<br>= | 7170<br>7170<br>= | 20.5 KiB<br>20.5 KiB<br>= | 324<br>324<br>= | 506<br>506<br>= | 44<br>44<br>= | 18<br>18<br>= | 20<br>20<br>= | | onchain_lm_v2 | 53236<br>53236<br>= | 17441<br>17441<br>= | 25264<br>25264<br>= | 74.7 KiB<br>74.7 KiB<br>= | 1087<br>1087<br>= | 1294<br>1294<br>= | 155<br>155<br>= | 57<br>57<br>= | 1138<br>1138<br>= | | usdt | 34574<br>34574<br>= | 8007<br>8007<br>= | 10687<br>10687<br>= | 31.4 KiB<br>31.4 KiB<br>= | 473<br>473<br>= | 657<br>657<br>= | 52<br>52<br>= | 39<br>39<br>= | 47<br>47<br>= | | universal_router | 77644<br>77644<br>= | 29450<br>29450<br>= | 36915<br>36915<br>= | 121.0 KiB<br>121.0 KiB<br>= | 2195<br>2195<br>= | 2850<br>2850<br>= | 232<br>232<br>= | 197<br>197<br>= | 1221<br>1221<br>= | | aggregation_router_v6 | 125084<br>125084<br>= | 45234<br>45234<br>= | 52441<br>52441<br>= | 171.4 KiB<br>171.4 KiB<br>= | 3087<br>3087<br>= | 4672<br>4672<br>= | 313<br>313<br>= | 74<br>74<br>= | 846<br>846<br>= | | entry_point_v0_7 | 66940<br>66940<br>= | 25010<br>25010<br>= | 31306<br>31306<br>= | 103.9 KiB<br>103.9 KiB<br>= | 1771<br>1771<br>= | 2081<br>2081<br>= | 501<br>501<br>= | 47<br>47<br>= | 854<br>854<br>= | | uniswap_v3_pool | 117314<br>117314<br>= | 33907<br>33907<br>= | 44303<br>44303<br>= | 146.1 KiB<br>146.1 KiB<br>= | 2275<br>2275<br>= | 2598<br>2598<br>= | 432<br>432<br>= | 131<br>131<br>= | 1345<br>1345<br>= | | uniswap_v4_pool_manager | 93527<br>93527<br>= | 32124<br>32124<br>= | 42527<br>42527<br>= | 141.6 KiB<br>141.6 KiB<br>= | 2241<br>2241<br>= | 2625<br>2625<br>= | 358<br>358<br>= | 185<br>185<br>= | 1146<br>1146<br>= | | curve_3pool | 105047<br>105047<br>= | 30590<br>30590<br>= | 47304<br>47304<br>= | 170.2 KiB<br>170.2 KiB<br>= | 1784<br>1784<br>= | 2299<br>2299<br>= | 460<br>460<br>= | 374<br>374<br>= | 3164<br>3164<br>= | | curve_tricrypto2 | 114225<br>114225<br>= | 31974<br>31974<br>= | 49484<br>49484<br>= | 175.7 KiB<br>175.7 KiB<br>= | 2030<br>2030<br>= | 2635<br>2635<br>= | 342<br>342<br>= | 645<br>645<br>= | 1683<br>1683<br>= | | balancer_vault | 145873<br>145873<br>= | 51478<br>51478<br>= | 64838<br>64838<br>= | 219.1 KiB<br>219.1 KiB<br>= | 3384<br>3384<br>= | 4377<br>4377<br>= | 508<br>508<br>= | 83<br>83<br>= | 1493<br>1493<br>= | | succinct_staking | 85875<br>85875<br>= | 26294<br>26294<br>= | 38378<br>38378<br>= | 117.3 KiB<br>117.3 KiB<br>= | 1508<br>1508<br>= | 2340<br>2340<br>= | 214<br>214<br>= | 98<br>98<br>= | 2534<br>2534<br>= | | **TOTAL** | **1499415<br>1499415<br>=** | **495713<br>495713<br>=** | **662536<br>662536<br>=** | **2.1 MiB<br>2.1 MiB<br>=** | **32188<br>32188<br>=** | **42286<br>42286<br>=** | **5830<br>5830<br>=** | **2535<br>2535<br>=** | **20063<br>20063<br>=** | </details> ### Compile times | benchmark | instructions | cycles | time | |:---------------|---------------:|------------:|------------:| | snailtracer | +2.3% 🔴 | +2.5% 🔴 | +2.9% 🔴 | | balancer_vault | +1.0% 🔴 | +1.2% 🔴 | +1.4% 🔴 | | **TOTAL** | **+0.2% 🔴** | **+0.7% 🔴** | **+0.7% 🔴** | | **GEOMEAN** | **+0.1% 🔴** | **+0.6% 🔴** | **+0.3% 🔴** | <details><summary>Full compile times</summary> | benchmark | instructions | cycles | time | parse | translate | optimize | codegen | |:------------------------|----------------------------------:|--------------------------------:|----------------------------------:|----------------------------------:|------------------------------:|--------------------------------:|--------------------------------:| | fibonacci-calldata | 37.61M<br>37.53M<br>-0.2% 🟢 | 36.97M<br>37.28M<br>+0.9% 🔴 | 11.0ms<br>11.2ms<br>+2.0% 🔴 | 149.8µs<br>152.7µs<br>+2.0% 🔴 | 399.8µs<br>406.0µs<br>+1.5% 🔴 | 1.31ms<br>1.35ms<br>+3.0% 🔴 | 2.75ms<br>2.98ms<br>+8.4% 🔴 | | factorial | 41.81M<br>41.78M<br>-0.1% 🟢 | 39.22M<br>39.57M<br>+0.9% 🔴 | 11.3ms<br>11.2ms<br>-0.4% 🟢 | 137.7µs<br>137.7µs<br>= | 364.1µs<br>357.8µs<br>-1.7% 🟢 | 1.19ms<br>1.18ms<br>-0.7% 🟢 | 3.10ms<br>3.12ms<br>+0.8% 🔴 | | counter | 54.46M<br>54.34M<br>-0.2% 🟢 | 38.62M<br>39.26M<br>+1.7% 🔴 | 9.11ms<br>9.22ms<br>+1.2% 🔴 | 264.8µs<br>267.5µs<br>+1.0% 🔴 | 469.3µs<br>474.4µs<br>+1.1% 🔴 | 1.34ms<br>1.34ms<br>+0.1% 🔴 | 3.50ms<br>4.00ms<br>+14.3% 🔴 | | snailtracer | 5.16G<br>5.29G<br>+2.3% 🔴 | 1.94G<br>1.99G<br>+2.5% 🔴 | 366.2ms<br>376.9ms<br>+2.9% 🔴 | 23.5ms<br>31.2ms<br>+33.0% 🔴 | 7.42ms<br>7.21ms<br>-2.8% 🟢 | 65.8ms<br>66.4ms<br>+1.0% 🔴 | 300.2ms<br>305.0ms<br>+1.6% 🔴 | | weth | 540.22M<br>540.19M<br>= | 241.01M<br>242.66M<br>+0.7% 🔴 | 47.5ms<br>47.8ms<br>+0.7% 🔴 | 1.85ms<br>1.87ms<br>+0.7% 🔴 | 2.15ms<br>2.03ms<br>-5.4% 🟢 | 11.0ms<br>11.0ms<br>+0.2% 🔴 | 32.3ms<br>32.8ms<br>+1.5% 🔴 | | hash_10k | 80.58M<br>80.57M<br>= | 51.61M<br>52.48M<br>+1.7% 🔴 | 11.9ms<br>11.9ms<br>-0.5% 🟢 | 244.8µs<br>258.8µs<br>+5.7% 🔴 | 481.2µs<br>488.1µs<br>+1.4% 🔴 | 1.84ms<br>1.99ms<br>+8.4% 🔴 | 5.06ms<br>5.24ms<br>+3.6% 🔴 | | erc20_transfer | 578.45M<br>578.78M<br>+0.1% 🔴 | 251.91M<br>252.25M<br>+0.1% 🔴 | 49.7ms<br>49.5ms<br>-0.3% 🟢 | 1.98ms<br>1.95ms<br>-1.2% 🟢 | 2.06ms<br>2.04ms<br>-1.4% 🟢 | 11.7ms<br>11.7ms<br>+0.5% 🔴 | 33.0ms<br>33.5ms<br>+1.3% 🔴 | | push0_proxy | 34.82M<br>34.78M<br>-0.1% 🟢 | 32.70M<br>32.49M<br>-0.6% 🟢 | 10.3ms<br>10.6ms<br>+2.8% 🔴 | 120.3µs<br>126.7µs<br>+5.3% 🔴 | 345.9µs<br>361.9µs<br>+4.6% 🔴 | 830.7µs<br>912.9µs<br>+9.9% 🔴 | 2.10ms<br>2.22ms<br>+5.4% 🔴 | | usdc_proxy | 244.74M<br>244.79M<br>= | 122.28M<br>123.07M<br>+0.6% 🔴 | 25.0ms<br>24.8ms<br>-0.8% 🟢 | 1.12ms<br>1.15ms<br>+2.7% 🔴 | 1.20ms<br>1.21ms<br>+1.3% 🔴 | 5.72ms<br>5.81ms<br>+1.5% 🔴 | 14.3ms<br>14.6ms<br>+2.5% 🔴 | | fiat_token | 3.99G<br>3.99G<br>= | 1.60G<br>1.59G<br>-0.3% 🟢 | 302.5ms<br>302.1ms<br>-0.1% 🟢 | 11.7ms<br>11.8ms<br>+0.7% 🔴 | 10.8ms<br>10.7ms<br>-0.4% 🟢 | 67.6ms<br>68.3ms<br>+1.1% 🔴 | 239.0ms<br>240.5ms<br>+0.6% 🔴 | | uniswap_v2_pair | 2.06G<br>2.06G<br>= | 853.00M<br>853.95M<br>+0.1% 🔴 | 163.9ms<br>162.9ms<br>-0.6% 🟢 | 6.48ms<br>6.65ms<br>+2.7% 🔴 | 6.32ms<br>6.74ms<br>+6.7% 🔴 | 33.5ms<br>33.9ms<br>+1.2% 🔴 | 127.7ms<br>128.7ms<br>+0.7% 🔴 | | univ2_router | 4.39G<br>4.39G<br>= | 1.79G<br>1.80G<br>+0.4% 🔴 | 339.5ms<br>340.2ms<br>+0.2% 🔴 | 14.0ms<br>13.3ms<br>-4.9% 🟢 | 11.0ms<br>11.1ms<br>+0.3% 🔴 | 68.6ms<br>68.8ms<br>+0.3% 🔴 | 278.8ms<br>281.5ms<br>+1.0% 🔴 | | seaport | 9.75G<br>9.74G<br>= | 4.24G<br>4.24G<br>= | 798.1ms<br>796.9ms<br>-0.2% 🟢 | 23.4ms<br>23.4ms<br>+0.4% 🔴 | 18.9ms<br>18.5ms<br>-2.1% 🟢 | 172.0ms<br>173.1ms<br>+0.7% 🔴 | 678.6ms<br>685.0ms<br>+0.9% 🔴 | | airdrop | 1.42G<br>1.42G<br>= | 588.99M<br>590.57M<br>+0.3% 🔴 | 113.7ms<br>113.5ms<br>-0.2% 🟢 | 4.23ms<br>4.15ms<br>-1.9% 🟢 | 4.25ms<br>4.18ms<br>-1.7% 🟢 | 29.1ms<br>29.1ms<br>-0.1% 🟢 | 81.9ms<br>82.7ms<br>+1.0% 🔴 | | bswap64 | 67.31M<br>67.32M<br>= | 43.85M<br>44.30M<br>+1.0% 🔴 | 10.5ms<br>10.3ms<br>-1.5% 🟢 | 410.5µs<br>421.4µs<br>+2.7% 🔴 | 603.0µs<br>601.3µs<br>-0.3% 🟢 | 1.67ms<br>1.66ms<br>-0.9% 🟢 | 3.92ms<br>3.85ms<br>-1.7% 🟢 | | bswap64_opt | 73.98M<br>73.93M<br>-0.1% 🟢 | 45.50M<br>45.34M<br>-0.4% 🟢 | 10.5ms<br>10.4ms<br>-0.8% 🟢 | 351.8µs<br>364.3µs<br>+3.6% 🔴 | 527.3µs<br>520.2µs<br>-1.4% 🟢 | 1.62ms<br>1.61ms<br>-0.9% 🟢 | 4.12ms<br>4.13ms<br>+0.3% 🔴 | | eip4788 | 48.72M<br>48.73M<br>= | 36.51M<br>36.43M<br>-0.2% 🟢 | 8.76ms<br>8.68ms<br>-0.9% 🟢 | 173.5µs<br>168.0µs<br>-3.2% 🟢 | 404.0µs<br>384.9µs<br>-4.7% 🟢 | 1.04ms<br>991.7µs<br>-4.9% 🟢 | 3.48ms<br>3.37ms<br>-3.0% 🟢 | | eip2935 | 42.48M<br>42.51M<br>+0.1% 🔴 | 37.85M<br>37.55M<br>-0.8% 🟢 | 11.1ms<br>10.9ms<br>-2.0% 🟢 | 144.2µs<br>145.9µs<br>+1.2% 🔴 | 368.6µs<br>359.7µs<br>-2.4% 🟢 | 932.0µs<br>903.3µs<br>-3.1% 🟢 | 2.88ms<br>2.90ms<br>+0.9% 🔴 | | burntpix | 6.71G<br>6.71G<br>= | 2.65G<br>2.67G<br>+0.7% 🔴 | 498.0ms<br>501.0ms<br>+0.6% 🔴 | 11.2ms<br>11.1ms<br>-1.0% 🟢 | 1.66ms<br>1.70ms<br>+2.5% 🔴 | 9.87ms<br>10.1ms<br>+2.6% 🔴 | 27.7ms<br>28.2ms<br>+1.5% 🔴 | | curve_stableswap | 1.14G<br>1.14G<br>= | 481.79M<br>485.37M<br>+0.7% 🔴 | 92.7ms<br>93.1ms<br>+0.5% 🔴 | 2.81ms<br>2.89ms<br>+2.7% 🔴 | 2.73ms<br>2.69ms<br>-1.4% 🟢 | 21.2ms<br>21.0ms<br>-0.9% 🟢 | 46.7ms<br>47.2ms<br>+1.1% 🔴 | | onchain_lm_v2 | 3.67G<br>3.67G<br>= | 1.41G<br>1.42G<br>+0.5% 🔴 | 268.3ms<br>270.0ms<br>+0.6% 🔴 | 9.29ms<br>9.08ms<br>-2.3% 🟢 | 7.58ms<br>7.40ms<br>-2.4% 🟢 | 46.4ms<br>46.6ms<br>+0.4% 🔴 | 185.7ms<br>188.5ms<br>+1.5% 🔴 | | usdt | 1.34G<br>1.34G<br>= | 550.52M<br>556.02M<br>+1.0% 🔴 | 106.4ms<br>106.7ms<br>+0.3% 🔴 | 5.61ms<br>5.59ms<br>-0.4% 🟢 | 5.62ms<br>5.41ms<br>-3.6% 🟢 | 24.8ms<br>25.0ms<br>+0.4% 🔴 | 76.3ms<br>77.7ms<br>+1.9% 🔴 | | universal_router | 11.59G<br>11.59G<br>= | 4.78G<br>4.80G<br>+0.5% 🔴 | 892.8ms<br>895.8ms<br>+0.3% 🔴 | 12.0ms<br>12.1ms<br>+0.9% 🔴 | 11.4ms<br>11.4ms<br>-0.2% 🟢 | 80.7ms<br>80.9ms<br>+0.3% 🔴 | 314.3ms<br>314.7ms<br>+0.1% 🔴 | | aggregation_router_v6 | 35.21G<br>35.20G<br>= | 14.33G<br>14.45G<br>+0.9% 🔴 | 2.659s<br>2.683s<br>+0.9% 🔴 | 19.3ms<br>19.3ms<br>= | 18.4ms<br>17.9ms<br>-2.5% 🟢 | 136.0ms<br>137.4ms<br>+1.0% 🔴 | 511.0ms<br>520.4ms<br>+1.8% 🔴 | | entry_point_v0_7 | 17.92G<br>17.92G<br>= | 7.35G<br>7.40G<br>+0.8% 🔴 | 1.371s<br>1.381s<br>+0.7% 🔴 | 9.29ms<br>9.27ms<br>-0.2% 🟢 | 10.0ms<br>10.2ms<br>+1.6% 🔴 | 62.8ms<br>62.7ms<br>-0.2% 🟢 | 267.0ms<br>267.0ms<br>= | | uniswap_v3_pool | 6.21G<br>6.21G<br>= | 2.56G<br>2.57G<br>+0.6% 🔴 | 483.2ms<br>487.0ms<br>+0.8% 🔴 | 19.4ms<br>19.0ms<br>-2.5% 🟢 | 16.9ms<br>16.6ms<br>-1.2% 🟢 | 110.4ms<br>109.8ms<br>-0.5% 🟢 | 398.5ms<br>400.1ms<br>+0.4% 🔴 | | uniswap_v4_pool_manager | 6.72G<br>6.72G<br>= | 2.73G<br>2.74G<br>+0.2% 🔴 | 515.2ms<br>517.1ms<br>+0.4% 🔴 | 13.5ms<br>13.8ms<br>+2.1% 🔴 | 13.8ms<br>14.1ms<br>+2.2% 🔴 | 105.5ms<br>106.4ms<br>+0.9% 🔴 | 390.3ms<br>391.5ms<br>+0.3% 🔴 | | curve_3pool | 6.61G<br>6.60G<br>= | 2.55G<br>2.57G<br>+0.6% 🔴 | 482.2ms<br>483.9ms<br>+0.4% 🔴 | 18.3ms<br>18.7ms<br>+1.7% 🔴 | 14.4ms<br>14.3ms<br>-0.9% 🟢 | 85.3ms<br>85.7ms<br>+0.4% 🔴 | 431.0ms<br>441.7ms<br>+2.5% 🔴 | | curve_tricrypto2 | 9.42G<br>9.42G<br>= | 3.62G<br>3.65G<br>+0.8% 🔴 | 683.0ms<br>687.1ms<br>+0.6% 🔴 | 17.1ms<br>17.5ms<br>+2.6% 🔴 | 16.0ms<br>16.9ms<br>+5.5% 🔴 | 94.6ms<br>95.5ms<br>+1.0% 🔴 | 418.2ms<br>420.8ms<br>+0.6% 🔴 | | balancer_vault | 18.85G<br>19.04G<br>+1.0% 🔴 | 8.05G<br>8.15G<br>+1.2% 🔴 | 1.498s<br>1.519s<br>+1.4% 🔴 | 25.9ms<br>25.5ms<br>-1.5% 🟢 | 20.1ms<br>20.3ms<br>+1.2% 🔴 | 201.3ms<br>201.8ms<br>+0.2% 🔴 | 647.1ms<br>656.9ms<br>+1.5% 🔴 | | succinct_staking | 10.87G<br>10.86G<br>= | 4.40G<br>4.43G<br>+0.5% 🔴 | 822.4ms<br>826.9ms<br>+0.6% 🔴 | 16.9ms<br>17.0ms<br>+0.8% 🔴 | 11.9ms<br>11.9ms<br>-0.1% 🟢 | 86.7ms<br>87.4ms<br>+0.8% 🔴 | 313.8ms<br>315.5ms<br>+0.5% 🔴 | | **TOTAL** | **164.88G<br>165.17G<br>+0.2% 🔴** | **67.46G<br>67.93G<br>+0.7% 🔴** | **12.673s<br>12.761s<br>+0.7% 🔴** | **270.8ms<br>278.3ms<br>+2.8% 🔴** | **218.6ms<br>218.5ms<br>=** | **1.542s<br>1.550s<br>+0.5% 🔴** | **5.844s<br>5.906s<br>+1.1% 🔴** | </details> ### Runtime | benchmark | instructions/iter | cycles/iter | |:----------------|--------------------:|--------------:| | counter | +2.1% 🔴 | -3.9% 🟢 | | fiat_token | = | -5.8% 🟢 | | uniswap_v2_pair | +0.1% 🔴 | -5.7% 🟢 | | univ2_router | +1.0% 🔴 | -3.6% 🟢 | | eip4788 | +0.1% 🔴 | -5.4% 🟢 | | **TOTAL** | **=** | **-0.9% 🟢** | | **GEOMEAN** | **+0.1% 🔴** | **-2.0% 🟢** | <details><summary>Full runtime</summary> | benchmark | instructions/iter | cycles/iter | |:------------------------|------------------------------:|----------------------------------:| | fibonacci-calldata | 44.01K<br>44.06K<br>+0.1% 🔴 | 11.36K<br>11.00K<br>-3.2% 🟢 | | factorial | 79.49K<br>80.04K<br>+0.7% 🔴 | 18.58K<br>18.46K<br>-0.7% 🟢 | | counter | 22.77K<br>23.26K<br>+2.1% 🔴 | 8.00K<br>7.69K<br>-3.9% 🟢 | | snailtracer | 192.98M<br>192.99M<br>= | 58.29M<br>58.26M<br>= | | weth | 28.15K<br>27.88K<br>-1.0% 🟢 | 9.89K<br>9.53K<br>-3.6% 🟢 | | hash_10k | 8.80M<br>8.80M<br>= | 2.77M<br>2.78M<br>+0.3% 🔴 | | erc20_transfer | 18.79M<br>18.80M<br>= | 5.26M<br>5.34M<br>+1.5% 🔴 | | push0_proxy | 23.02K<br>23.07K<br>+0.2% 🔴 | 8.58K<br>8.35K<br>-2.7% 🟢 | | usdc_proxy | 24.68K<br>24.72K<br>+0.1% 🔴 | 9.01K<br>8.77K<br>-2.7% 🟢 | | fiat_token | 22.51K<br>22.52K<br>= | 8.43K<br>7.94K<br>-5.8% 🟢 | | uniswap_v2_pair | 22.68K<br>22.71K<br>+0.1% 🔴 | 8.49K<br>8.01K<br>-5.7% 🟢 | | univ2_router | 20.57K<br>20.78K<br>+1.0% 🔴 | 7.75K<br>7.48K<br>-3.6% 🟢 | | seaport | 23.20K<br>23.05K<br>-0.6% 🟢 | 8.58K<br>8.20K<br>-4.4% 🟢 | | airdrop | 22.84K<br>22.89K<br>+0.2% 🔴 | 8.50K<br>8.12K<br>-4.5% 🟢 | | bswap64 | 19.65K<br>19.67K<br>+0.1% 🔴 | 7.31K<br>7.06K<br>-3.4% 🟢 | | bswap64_opt | 19.82K<br>19.84K<br>+0.1% 🔴 | 7.46K<br>7.11K<br>-4.7% 🟢 | | eip4788 | 24.06K<br>24.09K<br>+0.1% 🔴 | 8.82K<br>8.34K<br>-5.4% 🟢 | | eip2935 | 22.91K<br>22.96K<br>+0.2% 🔴 | 8.56K<br>8.15K<br>-4.8% 🟢 | | burntpix | 101.78M<br>101.82M<br>= | 26.94M<br>26.88M<br>-0.2% 🟢 | | curve_stableswap | 260.50K<br>260.63K<br>+0.1% 🔴 | 103.32K<br>103.41K<br>+0.1% 🔴 | | onchain_lm_v2 | 521.39M<br>521.39M<br>= | 217.26M<br>214.47M<br>-1.3% 🟢 | | usdt | 38.95K<br>38.76K<br>-0.5% 🟢 | 13.25K<br>12.75K<br>-3.8% 🟢 | | universal_router | 152.24K<br>151.23K<br>-0.7% 🟢 | 52.88K<br>52.70K<br>-0.3% 🟢 | | aggregation_router_v6 | 475.39K<br>475.17K<br>= | 170.87K<br>171.87K<br>+0.6% 🔴 | | entry_point_v0_7 | 1.28M<br>1.28M<br>= | 329.13K<br>342.12K<br>+3.9% 🔴 | | uniswap_v3_pool | 82.88K<br>82.85K<br>= | 27.74K<br>27.56K<br>-0.7% 🟢 | | uniswap_v4_pool_manager | 69.13K<br>69.33K<br>+0.3% 🔴 | 21.70K<br>21.59K<br>-0.5% 🟢 | | curve_3pool | 82.24K<br>82.22K<br>= | 28.07K<br>27.57K<br>-1.8% 🟢 | | curve_tricrypto2 | 222.82K<br>222.71K<br>= | 83.16K<br>82.55K<br>-0.7% 🟢 | | balancer_vault | 123.33K<br>123.38K<br>= | 41.69K<br>41.97K<br>+0.7% 🔴 | | succinct_staking | 64.14K<br>64.03K<br>-0.2% 🟢 | 23.90K<br>23.83K<br>-0.3% 🟢 | | **TOTAL** | **847.02M<br>847.07M<br>=** | **311.55M<br>308.78M<br>-0.9% 🟢** | </details>
Solar's `-Ogas` dispatcher picks its target from a packed table: `PUSH1 0x0f DUP2 MOD PUSH1 0x04 SHL PUSH30 <table> SWAP1 SHR PUSH2 0xffff AND JUMP`. The `MOD` gives a range of 15 values, but the shift of a constant by a range is not a range (the sets only hold jump targets), so the operand ends as `Range(0..=65535)`, too wide to resolve. That one unresolved jump also makes every other resolution in the contract suspect. When a dynamic jump's operand is `Top` or a range that is too wide, the fixpoint now looks at the narrowest range of 3 to 256 values that an earlier instruction of the block left on the stack. It rebuilds the stack after that instruction from the entry state of the block, puts each value of the range on top in turn, and runs the rest of the block up to the jump. Values whose path halts have no target, a valid jump target becomes a discovered edge like any other, any other constant marks the jump as possibly invalid, and a value that is not constant fails the enumeration. The work counts against the fixpoint budget. Only blocks that end in a dynamic jump track the range, so other blocks pay one flag test per pop. `resolve_jumps` turns an unresolved jump into the union of the targets that the fixpoint discovered for it when every state either resolved or enumerated its operand. Two or more targets give a switch that keeps the invalid jump default; a single target resolves only if no state may jump to an invalid one. On the Solar census of 581 runtime contracts compiled with `-Ogas`, 6 contracts with 338 dynamic jumps (seaport-1.6 Consideration, ReferenceConsideration, Seaport and SeaportValidatorHelper, solady-0.1.26 Timelock and WETH) now resolve every jump; `-Osize` stays at 0. The parsed `--display` output of every other census and benchmark code is identical. ## Benchmarks `opt.s` is unchanged in all 31 JIT benchmarks, and their compile `instructions` move by +0.02% (165.31G to 165.35G; the cycle and time columns are noise on a busy machine). Analysis cost, from `perf stat -e instructions:u` of `evm2 run --parse-only` over the 1162 census codes: the 6 newly resolved contracts cost +20% (2.54G to 3.05G), since they now analyse the code that their tables reach, and no other code costs more than +0.18%. Head `e825743d94` vs base `origin/main` (`bf9900abb8`). ### Codegen statistics `opt.s` changed in 0/31 benchmarks. | benchmark | unopt.ll | opt.ll | opt.s | jit size | i256 loads | i256 stores | mresize | spills | reloads | |:------------|-----------:|---------:|--------:|-----------:|-------------:|--------------:|----------:|---------:|----------:| | **TOTAL** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | | **GEOMEAN** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | <details><summary>Full details</summary> | benchmark | unopt.ll | opt.ll | opt.s | jit size | i256 loads | i256 stores | mresize | spills | reloads | |:------------------------|----------------------------:|--------------------------:|--------------------------:|----------------------------:|------------------------:|------------------------:|----------------------:|----------------------:|------------------------:| | fibonacci-calldata | 335<br>335<br>= | 114<br>114<br>= | 355<br>355<br>= | 348 B<br>348 B<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | 6<br>6<br>= | 5<br>5<br>= | | factorial | 331<br>331<br>= | 116<br>116<br>= | 391<br>391<br>= | 478 B<br>478 B<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | 7<br>7<br>= | 7<br>7<br>= | | counter | 992<br>992<br>= | 341<br>341<br>= | 603<br>603<br>= | 785 B<br>785 B<br>= | 9<br>9<br>= | 9<br>9<br>= | 3<br>3<br>= | 0<br>0<br>- | 0<br>0<br>- | | snailtracer | 60156<br>60156<br>= | 26888<br>26888<br>= | 33501<br>33501<br>= | 95.2 KiB<br>95.2 KiB<br>= | 1515<br>1515<br>= | 1973<br>1973<br>= | 449<br>449<br>= | 16<br>16<br>= | 231<br>231<br>= | | weth | 11578<br>11578<br>= | 2825<br>2825<br>= | 4518<br>4518<br>= | 14.0 KiB<br>14.0 KiB<br>= | 178<br>178<br>= | 237<br>237<br>= | 25<br>25<br>= | 32<br>32<br>= | 92<br>92<br>= | | hash_10k | 991<br>991<br>= | 354<br>354<br>= | 670<br>670<br>= | 1.4 KiB<br>1.4 KiB<br>= | 17<br>17<br>= | 20<br>20<br>= | 5<br>5<br>= | 1<br>1<br>= | 1<br>1<br>= | | erc20_transfer | 12073<br>12073<br>= | 3811<br>3811<br>= | 4978<br>4978<br>= | 13.9 KiB<br>13.9 KiB<br>= | 160<br>160<br>= | 322<br>322<br>= | 53<br>53<br>= | 6<br>6<br>= | 6<br>6<br>= | | push0_proxy | 313<br>313<br>= | 125<br>125<br>= | 286<br>286<br>= | 350 B<br>350 B<br>= | 1<br>1<br>= | 15<br>15<br>= | 0<br>0<br>- | 0<br>0<br>- | 0<br>0<br>- | | usdc_proxy | 6054<br>6054<br>= | 1583<br>1583<br>= | 2274<br>2274<br>= | 5.5 KiB<br>5.5 KiB<br>= | 54<br>54<br>= | 131<br>131<br>= | 21<br>21<br>= | 5<br>5<br>= | 5<br>5<br>= | | fiat_token | 75544<br>75544<br>= | 21440<br>21440<br>= | 29239<br>29239<br>= | 92.8 KiB<br>92.8 KiB<br>= | 1320<br>1320<br>= | 1902<br>1902<br>= | 277<br>277<br>= | 66<br>66<br>= | 65<br>65<br>= | | uniswap_v2_pair | 41668<br>41668<br>= | 12039<br>12039<br>= | 16662<br>16662<br>= | 52.5 KiB<br>52.5 KiB<br>= | 680<br>680<br>= | 1079<br>1079<br>= | 147<br>147<br>= | 55<br>55<br>= | 434<br>434<br>= | | univ2_router | 80476<br>80476<br>= | 24414<br>24414<br>= | 32740<br>32740<br>= | 112.0 KiB<br>112.0 KiB<br>= | 1675<br>1675<br>= | 2262<br>2262<br>= | 320<br>320<br>= | 107<br>107<br>= | 436<br>436<br>= | | seaport | 133044<br>133044<br>= | 51832<br>51832<br>= | 68657<br>68657<br>= | 233.6 KiB<br>233.6 KiB<br>= | 3785<br>3785<br>= | 4386<br>4386<br>= | 782<br>782<br>= | 245<br>245<br>= | 3057<br>3057<br>= | | airdrop | 26607<br>26607<br>= | 8462<br>8462<br>= | 11032<br>11032<br>= | 31.6 KiB<br>31.6 KiB<br>= | 432<br>432<br>= | 666<br>666<br>= | 91<br>91<br>= | 30<br>30<br>= | 211<br>211<br>= | | bswap64 | 1757<br>1757<br>= | 361<br>361<br>= | 622<br>622<br>= | 951 B<br>951 B<br>= | 12<br>12<br>= | 19<br>19<br>= | 6<br>6<br>= | 0<br>0<br>- | 0<br>0<br>- | | bswap64_opt | 1496<br>1496<br>= | 346<br>346<br>= | 632<br>632<br>= | 1008 B<br>1008 B<br>= | 5<br>5<br>= | 25<br>25<br>= | 6<br>6<br>= | 0<br>0<br>- | 0<br>0<br>- | | eip4788 | 631<br>631<br>= | 249<br>249<br>= | 459<br>459<br>= | 670 B<br>670 B<br>= | 12<br>12<br>= | 13<br>13<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | | eip2935 | 488<br>488<br>= | 190<br>190<br>= | 420<br>420<br>= | 554 B<br>554 B<br>= | 7<br>7<br>= | 5<br>5<br>= | 2<br>2<br>= | 0<br>0<br>- | 0<br>0<br>- | | burntpix | 9179<br>9179<br>= | 3048<br>3048<br>= | 3880<br>3880<br>= | 11.9 KiB<br>11.9 KiB<br>= | 163<br>163<br>= | 284<br>284<br>= | 26<br>26<br>= | 9<br>9<br>= | 20<br>20<br>= | | curve_stableswap | 16363<br>16363<br>= | 5666<br>5666<br>= | 7170<br>7170<br>= | 20.5 KiB<br>20.5 KiB<br>= | 324<br>324<br>= | 506<br>506<br>= | 44<br>44<br>= | 18<br>18<br>= | 20<br>20<br>= | | onchain_lm_v2 | 53236<br>53236<br>= | 17441<br>17441<br>= | 25264<br>25264<br>= | 74.7 KiB<br>74.7 KiB<br>= | 1087<br>1087<br>= | 1294<br>1294<br>= | 155<br>155<br>= | 57<br>57<br>= | 1138<br>1138<br>= | | usdt | 34574<br>34574<br>= | 8007<br>8007<br>= | 10687<br>10687<br>= | 31.4 KiB<br>31.4 KiB<br>= | 473<br>473<br>= | 657<br>657<br>= | 52<br>52<br>= | 39<br>39<br>= | 47<br>47<br>= | | universal_router | 77644<br>77644<br>= | 29450<br>29450<br>= | 36915<br>36915<br>= | 121.0 KiB<br>121.0 KiB<br>= | 2195<br>2195<br>= | 2850<br>2850<br>= | 232<br>232<br>= | 197<br>197<br>= | 1221<br>1221<br>= | | aggregation_router_v6 | 125084<br>125084<br>= | 45234<br>45234<br>= | 52441<br>52441<br>= | 171.4 KiB<br>171.4 KiB<br>= | 3087<br>3087<br>= | 4672<br>4672<br>= | 313<br>313<br>= | 74<br>74<br>= | 846<br>846<br>= | | entry_point_v0_7 | 66940<br>66940<br>= | 25010<br>25010<br>= | 31306<br>31306<br>= | 103.9 KiB<br>103.9 KiB<br>= | 1771<br>1771<br>= | 2081<br>2081<br>= | 501<br>501<br>= | 47<br>47<br>= | 854<br>854<br>= | | uniswap_v3_pool | 117314<br>117314<br>= | 33907<br>33907<br>= | 44303<br>44303<br>= | 146.1 KiB<br>146.1 KiB<br>= | 2275<br>2275<br>= | 2598<br>2598<br>= | 432<br>432<br>= | 131<br>131<br>= | 1345<br>1345<br>= | | uniswap_v4_pool_manager | 93527<br>93527<br>= | 32124<br>32124<br>= | 42527<br>42527<br>= | 141.6 KiB<br>141.6 KiB<br>= | 2241<br>2241<br>= | 2625<br>2625<br>= | 358<br>358<br>= | 185<br>185<br>= | 1146<br>1146<br>= | | curve_3pool | 105047<br>105047<br>= | 30590<br>30590<br>= | 47304<br>47304<br>= | 170.2 KiB<br>170.2 KiB<br>= | 1784<br>1784<br>= | 2299<br>2299<br>= | 460<br>460<br>= | 374<br>374<br>= | 3164<br>3164<br>= | | curve_tricrypto2 | 114225<br>114225<br>= | 31974<br>31974<br>= | 49484<br>49484<br>= | 175.7 KiB<br>175.7 KiB<br>= | 2030<br>2030<br>= | 2635<br>2635<br>= | 342<br>342<br>= | 645<br>645<br>= | 1683<br>1683<br>= | | balancer_vault | 145873<br>145873<br>= | 51478<br>51478<br>= | 64838<br>64838<br>= | 219.1 KiB<br>219.1 KiB<br>= | 3384<br>3384<br>= | 4377<br>4377<br>= | 508<br>508<br>= | 83<br>83<br>= | 1493<br>1493<br>= | | succinct_staking | 85875<br>85875<br>= | 26294<br>26294<br>= | 38378<br>38378<br>= | 117.3 KiB<br>117.3 KiB<br>= | 1508<br>1508<br>= | 2340<br>2340<br>= | 214<br>214<br>= | 98<br>98<br>= | 2534<br>2534<br>= | | **TOTAL** | **1499415<br>1499415<br>=** | **495713<br>495713<br>=** | **662536<br>662536<br>=** | **2.1 MiB<br>2.1 MiB<br>=** | **32188<br>32188<br>=** | **42286<br>42286<br>=** | **5830<br>5830<br>=** | **2535<br>2535<br>=** | **20063<br>20063<br>=** | </details> ### Compile times | benchmark | instructions | cycles | time | |:------------|---------------:|------------:|------------:| | **TOTAL** | **=** | **-5.9% 🟢** | **-6.6% 🟢** | | **GEOMEAN** | **=** | **-0.8% 🟢** | **-0.8% 🟢** | <details><summary>Full compile times</summary> | benchmark | instructions | cycles | time | parse | translate | optimize | codegen | |:------------------------|------------------------------:|--------------------------------:|----------------------------------:|-----------------------------------:|-----------------------------------:|---------------------------------:|----------------------------------:| | fibonacci-calldata | 37.66M<br>37.64M<br>-0.1% 🟢 | 39.10M<br>35.56M<br>-9.0% 🟢 | 12.2ms<br>11.9ms<br>-2.5% 🟢 | 502.6µs<br>318.2µs<br>-36.7% 🟢 | 821.9µs<br>419.9µs<br>-48.9% 🟢 | 2.31ms<br>1.57ms<br>-31.7% 🟢 | 13.7ms<br>2.89ms<br>-78.9% 🟢 | | factorial | 41.86M<br>41.81M<br>-0.1% 🟢 | 44.82M<br>41.25M<br>-8.0% 🟢 | 13.7ms<br>12.9ms<br>-6.0% 🟢 | 2.96ms<br>260.5µs<br>-91.2% 🟢 | 866.8µs<br>394.8µs<br>-54.5% 🟢 | 4.68ms<br>1.22ms<br>-74.0% 🟢 | 9.02ms<br>4.14ms<br>-54.1% 🟢 | | counter | 54.43M<br>54.43M<br>= | 45.60M<br>42.15M<br>-7.6% 🟢 | 11.3ms<br>10.8ms<br>-4.8% 🟢 | 1.03ms<br>455.3µs<br>-55.6% 🟢 | 928.1µs<br>492.1µs<br>-47.0% 🟢 | 9.18ms<br>1.47ms<br>-84.0% 🟢 | 19.7ms<br>3.76ms<br>-80.9% 🟢 | | snailtracer | 5.30G<br>5.31G<br>+0.1% 🔴 | 2.29G<br>2.35G<br>+2.6% 🔴 | 444.3ms<br>463.8ms<br>+4.4% 🔴 | 96.2ms<br>37.2ms<br>-61.4% 🟢 | 19.3ms<br>8.28ms<br>-57.0% 🟢 | 234.1ms<br>72.1ms<br>-69.2% 🟢 | 685.1ms<br>353.6ms<br>-48.4% 🟢 | | weth | 540.53M<br>540.84M<br>+0.1% 🔴 | 259.26M<br>252.44M<br>-2.6% 🟢 | 52.9ms<br>51.6ms<br>-2.4% 🟢 | 16.6ms<br>2.79ms<br>-83.1% 🟢 | 5.09ms<br>2.20ms<br>-56.8% 🟢 | 30.3ms<br>11.6ms<br>-61.9% 🟢 | 63.8ms<br>34.9ms<br>-45.4% 🟢 | | hash_10k | 80.65M<br>80.57M<br>-0.1% 🟢 | 51.77M<br>56.50M<br>+9.1% 🔴 | 12.4ms<br>13.4ms<br>+8.1% 🔴 | 1.06ms<br>448.7µs<br>-57.7% 🟢 | 896.9µs<br>560.3µs<br>-37.5% 🟢 | 3.60ms<br>2.17ms<br>-39.8% 🟢 | 10.5ms<br>5.54ms<br>-47.1% 🟢 | | erc20_transfer | 578.78M<br>578.82M<br>= | 261.96M<br>264.22M<br>+0.9% 🔴 | 53.3ms<br>54.3ms<br>+1.7% 🔴 | 7.92ms<br>2.90ms<br>-63.4% 🟢 | 4.51ms<br>2.39ms<br>-47.0% 🟢 | 76.6ms<br>14.2ms<br>-81.5% 🟢 | 75.6ms<br>39.8ms<br>-47.4% 🟢 | | push0_proxy | 34.83M<br>34.82M<br>= | 37.24M<br>31.17M<br>-16.3% 🟢 | 12.1ms<br>10.8ms<br>-11.4% 🟢 | 4.35ms<br>266.6µs<br>-93.9% 🟢 | 866.1µs<br>405.9µs<br>-53.1% 🟢 | 1.89ms<br>1.01ms<br>-46.7% 🟢 | 9.54ms<br>2.58ms<br>-73.0% 🟢 | | usdc_proxy | 244.91M<br>244.99M<br>= | 129.48M<br>139.98M<br>+8.1% 🔴 | 27.4ms<br>30.3ms<br>+10.3% 🔴 | 5.10ms<br>1.66ms<br>-67.5% 🟢 | 3.03ms<br>1.28ms<br>-57.8% 🟢 | 11.3ms<br>5.97ms<br>-47.2% 🟢 | 35.0ms<br>15.7ms<br>-55.2% 🟢 | | fiat_token | 3.99G<br>3.99G<br>= | 1.93G<br>1.85G<br>-4.1% 🟢 | 380.5ms<br>361.6ms<br>-5.0% 🟢 | 43.9ms<br>16.9ms<br>-61.4% 🟢 | 36.0ms<br>12.8ms<br>-64.5% 🟢 | 216.9ms<br>76.5ms<br>-64.7% 🟢 | 616.0ms<br>258.4ms<br>-58.1% 🟢 | | uniswap_v2_pair | 2.06G<br>2.06G<br>= | 883.35M<br>918.89M<br>+4.0% 🔴 | 178.4ms<br>179.9ms<br>+0.8% 🔴 | 204.9ms<br>9.27ms<br>-95.5% 🟢 | 26.8ms<br>6.39ms<br>-76.2% 🟢 | 89.3ms<br>42.4ms<br>-52.6% 🟢 | 372.2ms<br>140.7ms<br>-62.2% 🟢 | | univ2_router | 4.40G<br>4.40G<br>= | 1.88G<br>2.00G<br>+6.5% 🔴 | 365.9ms<br>388.4ms<br>+6.2% 🔴 | 87.3ms<br>18.4ms<br>-78.9% 🟢 | 71.6ms<br>11.7ms<br>-83.7% 🟢 | 341.0ms<br>80.0ms<br>-76.6% 🟢 | 956.2ms<br>300.5ms<br>-68.6% 🟢 | | seaport | 9.75G<br>9.76G<br>= | 4.62G<br>4.83G<br>+4.5% 🔴 | 895.6ms<br>933.2ms<br>+4.2% 🔴 | 137.8ms<br>31.9ms<br>-76.9% 🟢 | 152.6ms<br>19.6ms<br>-87.1% 🟢 | 1.062s<br>183.3ms<br>-82.7% 🟢 | 1.630s<br>763.0ms<br>-53.2% 🟢 | | airdrop | 1.42G<br>1.42G<br>= | 606.94M<br>614.94M<br>+1.3% 🔴 | 121.4ms<br>122.9ms<br>+1.3% 🔴 | 12.7ms<br>5.69ms<br>-55.1% 🟢 | 8.21ms<br>4.37ms<br>-46.7% 🟢 | 52.9ms<br>30.1ms<br>-43.1% 🟢 | 143.0ms<br>90.8ms<br>-36.5% 🟢 | | bswap64 | 67.39M<br>67.33M<br>-0.1% 🟢 | 44.11M<br>43.52M<br>-1.3% 🟢 | 11.4ms<br>10.8ms<br>-5.5% 🟢 | 851.2µs<br>703.2µs<br>-17.4% 🟢 | 877.8µs<br>682.3µs<br>-22.3% 🟢 | 2.62ms<br>1.97ms<br>-24.7% 🟢 | 6.69ms<br>4.23ms<br>-36.8% 🟢 | | bswap64_opt | 74.00M<br>74.01M<br>= | 43.28M<br>47.60M<br>+10.0% 🔴 | 10.9ms<br>11.4ms<br>+4.7% 🔴 | 906.2µs<br>661.3µs<br>-27.0% 🟢 | 1.70ms<br>708.7µs<br>-58.2% 🟢 | 3.17ms<br>1.88ms<br>-40.6% 🟢 | 6.28ms<br>4.65ms<br>-26.0% 🟢 | | eip4788 | 48.76M<br>48.73M<br>-0.1% 🟢 | 33.41M<br>35.79M<br>+7.1% 🔴 | 9.34ms<br>8.41ms<br>-10.0% 🟢 | 452.7µs<br>410.2µs<br>-9.4% 🟢 | 566.2µs<br>478.0µs<br>-15.6% 🟢 | 1.57ms<br>1.20ms<br>-23.8% 🟢 | 5.44ms<br>3.65ms<br>-32.8% 🟢 | | eip2935 | 42.51M<br>42.57M<br>+0.1% 🔴 | 36.23M<br>33.61M<br>-7.2% 🟢 | 10.5ms<br>11.0ms<br>+4.4% 🔴 | 500.6µs<br>297.0µs<br>-40.7% 🟢 | 696.3µs<br>438.8µs<br>-37.0% 🟢 | 1.94ms<br>1.15ms<br>-40.7% 🟢 | 6.16ms<br>3.30ms<br>-46.3% 🟢 | | burntpix | 6.72G<br>6.72G<br>= | 2.79G<br>2.71G<br>-3.1% 🟢 | 538.3ms<br>518.1ms<br>-3.8% 🟢 | 30.7ms<br>16.1ms<br>-47.8% 🟢 | 3.48ms<br>1.77ms<br>-49.2% 🟢 | 15.1ms<br>11.3ms<br>-24.9% 🟢 | 44.1ms<br>30.1ms<br>-31.7% 🟢 | | curve_stableswap | 1.14G<br>1.14G<br>= | 496.64M<br>487.49M<br>-1.8% 🟢 | 96.9ms<br>95.5ms<br>-1.5% 🟢 | 6.77ms<br>4.03ms<br>-40.5% 🟢 | 3.48ms<br>2.83ms<br>-18.7% 🟢 | 35.6ms<br>23.6ms<br>-33.6% 🟢 | 77.3ms<br>49.8ms<br>-35.6% 🟢 | | onchain_lm_v2 | 3.68G<br>3.68G<br>+0.1% 🔴 | 1.57G<br>1.45G<br>-7.5% 🟢 | 308.9ms<br>278.6ms<br>-9.8% 🟢 | 27.1ms<br>12.0ms<br>-55.5% 🟢 | 11.5ms<br>8.74ms<br>-24.2% 🟢 | 80.8ms<br>55.3ms<br>-31.6% 🟢 | 410.8ms<br>271.1ms<br>-34.0% 🟢 | | usdt | 1.34G<br>1.35G<br>+0.1% 🔴 | 602.75M<br>634.36M<br>+5.2% 🔴 | 120.2ms<br>127.7ms<br>+6.3% 🔴 | 13.5ms<br>8.19ms<br>-39.6% 🟢 | 11.3ms<br>6.16ms<br>-45.6% 🟢 | 60.5ms<br>26.1ms<br>-56.7% 🟢 | 110.8ms<br>82.7ms<br>-25.4% 🟢 | | universal_router | 11.60G<br>11.60G<br>= | 6.04G<br>6.99G<br>+15.7% 🔴 | 1.441s<br>1.726s<br>+19.8% 🔴 | 29.6ms<br>17.6ms<br>-40.6% 🟢 | 16.7ms<br>12.9ms<br>-22.5% 🟢 | 133.7ms<br>88.2ms<br>-34.1% 🟢 | 850.9ms<br>355.3ms<br>-58.2% 🟢 | | aggregation_router_v6 | 35.22G<br>35.22G<br>= | 30.13G<br>23.02G<br>-23.6% 🟢 | 6.127s<br>4.494s<br>-26.7% 🟢 | 27.9ms<br>26.4ms<br>-5.4% 🟢 | 21.2ms<br>19.8ms<br>-6.8% 🟢 | 184.4ms<br>154.9ms<br>-16.0% 🟢 | 792.4ms<br>558.0ms<br>-29.6% 🟢 | | entry_point_v0_7 | 17.93G<br>17.94G<br>= | 10.08G<br>9.49G<br>-5.9% 🟢 | 1.970s<br>1.845s<br>-6.4% 🟢 | 13.2ms<br>12.8ms<br>-2.6% 🟢 | 11.3ms<br>10.2ms<br>-9.8% 🟢 | 84.8ms<br>68.5ms<br>-19.2% 🟢 | 322.3ms<br>301.8ms<br>-6.4% 🟢 | | uniswap_v3_pool | 6.22G<br>6.22G<br>= | 3.15G<br>2.89G<br>-8.5% 🟢 | 613.4ms<br>557.6ms<br>-9.1% 🟢 | 27.3ms<br>26.6ms<br>-2.4% 🟢 | 23.1ms<br>19.5ms<br>-15.3% 🟢 | 164.2ms<br>132.0ms<br>-19.6% 🟢 | 454.2ms<br>462.6ms<br>+1.9% 🔴 | | uniswap_v4_pool_manager | 6.72G<br>6.72G<br>= | 3.47G<br>3.10G<br>-10.8% 🟢 | 669.8ms<br>605.9ms<br>-9.5% 🟢 | 19.0ms<br>18.7ms<br>-1.6% 🟢 | 16.0ms<br>15.9ms<br>-0.9% 🟢 | 118.5ms<br>150.4ms<br>+26.9% 🔴 | 428.1ms<br>568.1ms<br>+32.7% 🔴 | | curve_3pool | 6.61G<br>6.61G<br>= | 3.12G<br>3.62G<br>+16.1% 🔴 | 614.9ms<br>717.7ms<br>+16.7% 🔴 | 27.5ms<br>38.9ms<br>+41.4% 🔴 | 15.8ms<br>23.7ms<br>+50.3% 🔴 | 89.9ms<br>159.2ms<br>+77.2% 🔴 | 502.3ms<br>728.1ms<br>+44.9% 🔴 | | curve_tricrypto2 | 9.43G<br>9.43G<br>= | 4.66G<br>4.61G<br>-1.1% 🟢 | 927.8ms<br>908.1ms<br>-2.1% 🟢 | 26.7ms<br>29.2ms<br>+9.2% 🔴 | 20.1ms<br>22.3ms<br>+11.3% 🔴 | 120.9ms<br>147.7ms<br>+22.2% 🔴 | 659.1ms<br>615.5ms<br>-6.6% 🟢 | | balancer_vault | 19.07G<br>19.08G<br>+0.1% 🔴 | 10.54G<br>11.42G<br>+8.3% 🔴 | 2.051s<br>2.234s<br>+9.0% 🔴 | 43.2ms<br>56.0ms<br>+29.7% 🔴 | 32.4ms<br>27.5ms<br>-15.3% 🟢 | 621.5ms<br>429.0ms<br>-31.0% 🟢 | 941.7ms<br>849.0ms<br>-9.9% 🟢 | | succinct_staking | 10.87G<br>10.87G<br>= | 5.04G<br>5.30G<br>+5.1% 🔴 | 981.2ms<br>1.035s<br>+5.5% 🔴 | 24.2ms<br>29.1ms<br>+19.9% 🔴 | 13.4ms<br>19.7ms<br>+47.1% 🔴 | 129.8ms<br>144.0ms<br>+11.0% 🔴 | 398.3ms<br>1.044s<br>+162.1% 🔴 | | **TOTAL** | **165.31G<br>165.35G<br>=** | **94.93G<br>89.29G<br>-5.9% 🟢** | **19.083s<br>17.830s<br>-6.6% 🟢** | **941.7ms<br>426.1ms<br>-54.8% 🟢** | **535.3ms<br>264.7ms<br>-50.5% 🟢** | **3.985s<br>2.120s<br>-46.8% 🟢** | **10.656s<br>7.948s<br>-25.4% 🟢** | </details> ### Jump resolution | benchmark | local | nonadj | fixpt | unres | total | |:------------------------|--------:|---------:|--------:|--------:|--------:| | fibonacci-calldata | 2 | 0 | 0 | 0 | 2 | | factorial | 2 | 0 | 0 | 0 | 2 | | counter | 11 | 0 | 0 | 0 | 11 | | snailtracer | 502 | 17 | 0 | 62 | 564 | | weth | 55 | 0 | 11 | 0 | 66 | | hash_10k | 6 | 0 | 1 | 0 | 7 | | erc20_transfer | 114 | 0 | 18 | 0 | 132 | | push0_proxy | 1 | 0 | 0 | 0 | 1 | | usdc_proxy | 54 | 0 | 14 | 0 | 68 | | fiat_token | 452 | 6 | 68 | 0 | 520 | | uniswap_v2_pair | 257 | 30 | 37 | 0 | 294 | | univ2_router | 474 | 27 | 26 | 0 | 500 | | seaport | 1026 | 39 | 153 | 0 | 1179 | | airdrop | 217 | 7 | 35 | 0 | 252 | | bswap64 | 14 | 0 | 0 | 0 | 14 | | bswap64_opt | 8 | 0 | 2 | 0 | 10 | | eip4788 | 4 | 0 | 0 | 0 | 4 | | eip2935 | 3 | 0 | 1 | 0 | 4 | | burntpix | 365 | 2 | 31 | 0 | 396 | | curve_stableswap | 42 | 5 | 9 | 0 | 51 | | onchain_lm_v2 | 0 | 0 | 2 | 0 | 2 | | usdt | 197 | 14 | 41 | 0 | 238 | | universal_router | 133 | 14 | 9 | 0 | 142 | | aggregation_router_v6 | 374 | 118 | 36 | 0 | 410 | | entry_point_v0_7 | 356 | 55 | 46 | 0 | 402 | | uniswap_v3_pool | 661 | 4 | 67 | 0 | 728 | | uniswap_v4_pool_manager | 152 | 10 | 17 | 0 | 169 | | curve_3pool | 718 | 0 | 11 | 0 | 729 | | curve_tricrypto2 | 264 | 0 | 2 | 0 | 266 | | balancer_vault | 960 | 18 | 0 | 132 | 1092 | | succinct_staking | 332 | 49 | 45 | 0 | 377 |
…oy-rs#752) A step that runs out of gas consumes the rest of the frame's gas, so its cost is that remainder. This is what reth's previous tracer reported, in both the parity vmTrace and the geth struct logs: the gas remaining before the step minus the gas remaining after it, for every step including out-of-gas ones. evm2 diverged in two ways. A skipped cold load halts after charging only the warm base cost, so the vmTrace showed 100 instead of the 642 gas that was left. And alloy-rs#564 made struct logs report the attempted charge on a failed deduction, which differs from reth (a cold SSTORE with 5000 gas left reported 22100, reth reports 5000). `CallTraceStep::gas_cost` is now always the gas delta, and `Interpreter::failed_charge` and the per-step bookkeeping behind it are removed, since only alloy-rs#564 used them. The interpreter still zeroes the remaining gas on `OutOfGas` before `step_end`, so the delta equals the remainder. The reentrancy sentry still costs 0, since it halts before charging. This fixes seven EXTCODESIZE vmTrace costs (100 → 642) for mainnet transaction `0x5f108da9a84d82e0357361df1d4d8aa3fa52ebcefdbc848234c914200853b9d8`, found while comparing paradigmxyz/reth#25002 against main. The new test checks both formats against values taken from reth's previous tracer: cold BALANCE, EXTCODE*, SLOAD and CALL with 642 gas left report 642, a cold SSTORE with 5000 left reports 5000, PUSH1 with 2 left reports 2, a value CALL with 5000 left reports 5000, and a 32-byte LOG0 with 385 left reports 385. --------- Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
…loy-rs#839) Vyper's dense selector table computes `selector % n << 1 + base`, copies two bytes of the table out of the code into the end of the first memory word with `CODECOPY(0x1e, src, 2)`, and jumps to that word with `PUSH0 MLOAD JUMP`. The word is the table entry over zeros, but the analysis forgot every word that a `CODECOPY` wrote, so the jump stayed dynamic even with the jump-table enumeration from alloy-rs#836. `MemWords` now tracks the word that a constant `CODECOPY` of 1 to 32 bytes leaves at the end of its destination (when that ends at or after byte 32), if the rest of the word is known: either a tracked word at that offset, or zeros when memory is pristine. A new `pristine` flag records that no instruction has written memory yet. It is set only in the entry block and only when the caller passes no stack, every memory-writing opcode and the host path clear it, and joins keep it only when it holds on every path. On the mainnet corpus (2306 codes, `evm2 run --parse-only`), dynamic jumps go from 1798 to 1792 and the contracts that have any from 23 to 21: `0xD37A6aa3d8460Bd2b6536d608103D880695A23CD` goes from 5 to 0 and `0x45312ea0eFf7E09C83CBE249fa1d7598c4C8cd4e` from 1 to 0. No code gets more dynamic jumps. JIT compile of `0xD37A…` with `evm2 run --jit-only` takes 1.702G instructions on `main` and 1.460G here (-14%). ## Benchmarks The assembly of all 31 benches is unchanged (`opt.s changed in 0/31`), so the compile-time and runtime deltas below come from machine noise (the runner's load average was above 100 during the run) and not from this change. The instruction columns are within 0.6% everywhere; snailtracer, the largest, is +0.6%. Head `da5e6ace24` with uncommitted changes vs base `origin/main` (`da5e6ace24`). ### Codegen statistics `opt.s` changed in 0/31 benchmarks. | benchmark | unopt.ll | opt.ll | opt.s | jit size | i256 loads | i256 stores | mresize | spills | reloads | |:------------|-----------:|---------:|--------:|-----------:|-------------:|--------------:|----------:|---------:|----------:| | **TOTAL** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | | **GEOMEAN** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | **=** | <details><summary>Full details</summary> | benchmark | unopt.ll | opt.ll | opt.s | jit size | i256 loads | i256 stores | mresize | spills | reloads | |:------------------------|----------------------------:|--------------------------:|--------------------------:|----------------------------:|------------------------:|------------------------:|----------------------:|----------------------:|------------------------:| | fibonacci-calldata | 335<br>335<br>= | 114<br>114<br>= | 355<br>355<br>= | 348 B<br>348 B<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | 6<br>6<br>= | 5<br>5<br>= | | factorial | 331<br>331<br>= | 116<br>116<br>= | 391<br>391<br>= | 478 B<br>478 B<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | 7<br>7<br>= | 7<br>7<br>= | | counter | 992<br>992<br>= | 341<br>341<br>= | 603<br>603<br>= | 785 B<br>785 B<br>= | 9<br>9<br>= | 9<br>9<br>= | 3<br>3<br>= | 0<br>0<br>- | 0<br>0<br>- | | snailtracer | 60156<br>60156<br>= | 26888<br>26888<br>= | 33501<br>33501<br>= | 95.2 KiB<br>95.2 KiB<br>= | 1515<br>1515<br>= | 1973<br>1973<br>= | 449<br>449<br>= | 16<br>16<br>= | 231<br>231<br>= | | weth | 11578<br>11578<br>= | 2825<br>2825<br>= | 4518<br>4518<br>= | 14.0 KiB<br>14.0 KiB<br>= | 178<br>178<br>= | 237<br>237<br>= | 25<br>25<br>= | 32<br>32<br>= | 92<br>92<br>= | | hash_10k | 991<br>991<br>= | 354<br>354<br>= | 670<br>670<br>= | 1.4 KiB<br>1.4 KiB<br>= | 17<br>17<br>= | 20<br>20<br>= | 5<br>5<br>= | 1<br>1<br>= | 1<br>1<br>= | | erc20_transfer | 12073<br>12073<br>= | 3811<br>3811<br>= | 4978<br>4978<br>= | 13.9 KiB<br>13.9 KiB<br>= | 160<br>160<br>= | 322<br>322<br>= | 53<br>53<br>= | 6<br>6<br>= | 6<br>6<br>= | | push0_proxy | 313<br>313<br>= | 125<br>125<br>= | 286<br>286<br>= | 350 B<br>350 B<br>= | 1<br>1<br>= | 15<br>15<br>= | 0<br>0<br>- | 0<br>0<br>- | 0<br>0<br>- | | usdc_proxy | 6054<br>6054<br>= | 1583<br>1583<br>= | 2274<br>2274<br>= | 5.5 KiB<br>5.5 KiB<br>= | 54<br>54<br>= | 131<br>131<br>= | 21<br>21<br>= | 5<br>5<br>= | 5<br>5<br>= | | fiat_token | 75544<br>75544<br>= | 21440<br>21440<br>= | 29239<br>29239<br>= | 92.8 KiB<br>92.8 KiB<br>= | 1320<br>1320<br>= | 1902<br>1902<br>= | 277<br>277<br>= | 66<br>66<br>= | 65<br>65<br>= | | uniswap_v2_pair | 41668<br>41668<br>= | 12039<br>12039<br>= | 16662<br>16662<br>= | 52.5 KiB<br>52.5 KiB<br>= | 680<br>680<br>= | 1079<br>1079<br>= | 147<br>147<br>= | 55<br>55<br>= | 434<br>434<br>= | | univ2_router | 80476<br>80476<br>= | 24414<br>24414<br>= | 32740<br>32740<br>= | 112.0 KiB<br>112.0 KiB<br>= | 1675<br>1675<br>= | 2262<br>2262<br>= | 320<br>320<br>= | 107<br>107<br>= | 436<br>436<br>= | | seaport | 133044<br>133044<br>= | 51832<br>51832<br>= | 68657<br>68657<br>= | 233.6 KiB<br>233.6 KiB<br>= | 3785<br>3785<br>= | 4386<br>4386<br>= | 782<br>782<br>= | 245<br>245<br>= | 3057<br>3057<br>= | | airdrop | 26607<br>26607<br>= | 8462<br>8462<br>= | 11032<br>11032<br>= | 31.6 KiB<br>31.6 KiB<br>= | 432<br>432<br>= | 666<br>666<br>= | 91<br>91<br>= | 30<br>30<br>= | 211<br>211<br>= | | bswap64 | 1757<br>1757<br>= | 361<br>361<br>= | 622<br>622<br>= | 951 B<br>951 B<br>= | 12<br>12<br>= | 19<br>19<br>= | 6<br>6<br>= | 0<br>0<br>- | 0<br>0<br>- | | bswap64_opt | 1496<br>1496<br>= | 346<br>346<br>= | 632<br>632<br>= | 1008 B<br>1008 B<br>= | 5<br>5<br>= | 25<br>25<br>= | 6<br>6<br>= | 0<br>0<br>- | 0<br>0<br>- | | eip4788 | 631<br>631<br>= | 249<br>249<br>= | 459<br>459<br>= | 670 B<br>670 B<br>= | 12<br>12<br>= | 13<br>13<br>= | 2<br>2<br>= | 2<br>2<br>= | 2<br>2<br>= | | eip2935 | 488<br>488<br>= | 190<br>190<br>= | 420<br>420<br>= | 554 B<br>554 B<br>= | 7<br>7<br>= | 5<br>5<br>= | 2<br>2<br>= | 0<br>0<br>- | 0<br>0<br>- | | burntpix | 9179<br>9179<br>= | 3048<br>3048<br>= | 3880<br>3880<br>= | 11.9 KiB<br>11.9 KiB<br>= | 163<br>163<br>= | 284<br>284<br>= | 26<br>26<br>= | 9<br>9<br>= | 20<br>20<br>= | | curve_stableswap | 16363<br>16363<br>= | 5666<br>5666<br>= | 7170<br>7170<br>= | 20.5 KiB<br>20.5 KiB<br>= | 324<br>324<br>= | 506<br>506<br>= | 44<br>44<br>= | 18<br>18<br>= | 20<br>20<br>= | | onchain_lm_v2 | 53236<br>53236<br>= | 17441<br>17441<br>= | 25264<br>25264<br>= | 74.7 KiB<br>74.7 KiB<br>= | 1087<br>1087<br>= | 1294<br>1294<br>= | 155<br>155<br>= | 57<br>57<br>= | 1138<br>1138<br>= | | usdt | 34574<br>34574<br>= | 8007<br>8007<br>= | 10687<br>10687<br>= | 31.4 KiB<br>31.4 KiB<br>= | 473<br>473<br>= | 657<br>657<br>= | 52<br>52<br>= | 39<br>39<br>= | 47<br>47<br>= | | universal_router | 77644<br>77644<br>= | 29450<br>29450<br>= | 36915<br>36915<br>= | 121.0 KiB<br>121.0 KiB<br>= | 2195<br>2195<br>= | 2850<br>2850<br>= | 232<br>232<br>= | 197<br>197<br>= | 1221<br>1221<br>= | | aggregation_router_v6 | 125084<br>125084<br>= | 45234<br>45234<br>= | 52441<br>52441<br>= | 171.4 KiB<br>171.4 KiB<br>= | 3087<br>3087<br>= | 4672<br>4672<br>= | 313<br>313<br>= | 74<br>74<br>= | 846<br>846<br>= | | entry_point_v0_7 | 66940<br>66940<br>= | 25010<br>25010<br>= | 31306<br>31306<br>= | 103.9 KiB<br>103.9 KiB<br>= | 1771<br>1771<br>= | 2081<br>2081<br>= | 501<br>501<br>= | 47<br>47<br>= | 854<br>854<br>= | | uniswap_v3_pool | 117314<br>117314<br>= | 33907<br>33907<br>= | 44303<br>44303<br>= | 146.1 KiB<br>146.1 KiB<br>= | 2275<br>2275<br>= | 2598<br>2598<br>= | 432<br>432<br>= | 131<br>131<br>= | 1345<br>1345<br>= | | uniswap_v4_pool_manager | 93527<br>93527<br>= | 32124<br>32124<br>= | 42527<br>42527<br>= | 141.6 KiB<br>141.6 KiB<br>= | 2241<br>2241<br>= | 2625<br>2625<br>= | 358<br>358<br>= | 185<br>185<br>= | 1146<br>1146<br>= | | curve_3pool | 105047<br>105047<br>= | 30590<br>30590<br>= | 47304<br>47304<br>= | 170.2 KiB<br>170.2 KiB<br>= | 1784<br>1784<br>= | 2299<br>2299<br>= | 460<br>460<br>= | 374<br>374<br>= | 3164<br>3164<br>= | | curve_tricrypto2 | 114225<br>114225<br>= | 31974<br>31974<br>= | 49484<br>49484<br>= | 175.7 KiB<br>175.7 KiB<br>= | 2030<br>2030<br>= | 2635<br>2635<br>= | 342<br>342<br>= | 645<br>645<br>= | 1683<br>1683<br>= | | balancer_vault | 145873<br>145873<br>= | 51478<br>51478<br>= | 64838<br>64838<br>= | 219.1 KiB<br>219.1 KiB<br>= | 3384<br>3384<br>= | 4377<br>4377<br>= | 508<br>508<br>= | 83<br>83<br>= | 1493<br>1493<br>= | | succinct_staking | 85875<br>85875<br>= | 26294<br>26294<br>= | 38378<br>38378<br>= | 117.3 KiB<br>117.3 KiB<br>= | 1508<br>1508<br>= | 2340<br>2340<br>= | 214<br>214<br>= | 98<br>98<br>= | 2534<br>2534<br>= | | **TOTAL** | **1499415<br>1499415<br>=** | **495713<br>495713<br>=** | **662536<br>662536<br>=** | **2.1 MiB<br>2.1 MiB<br>=** | **32188<br>32188<br>=** | **42286<br>42286<br>=** | **5830<br>5830<br>=** | **2535<br>2535<br>=** | **20063<br>20063<br>=** | </details> ### Compile times | benchmark | instructions | cycles | time | |:------------|---------------:|------------:|------------:| | **TOTAL** | **=** | **+1.3% 🔴** | **+1.7% 🔴** | | **GEOMEAN** | **=** | **-0.9% 🟢** | **-0.3% 🟢** | <details><summary>Full compile times</summary> | benchmark | instructions | cycles | time | parse | translate | optimize | codegen | |:------------------------|------------------------------:|--------------------------------:|----------------------------------:|----------------------------------:|----------------------------------:|---------------------------------:|---------------------------------:| | fibonacci-calldata | 37.64M<br>37.61M<br>-0.1% 🟢 | 35.97M<br>35.62M<br>-1.0% 🟢 | 10.8ms<br>10.6ms<br>-2.0% 🟢 | 189.5µs<br>209.1µs<br>+10.3% 🔴 | 404.5µs<br>556.7µs<br>+37.6% 🔴 | 1.29ms<br>1.55ms<br>+20.0% 🔴 | 2.83ms<br>3.31ms<br>+16.7% 🔴 | | factorial | 41.84M<br>41.80M<br>-0.1% 🟢 | 34.50M<br>35.22M<br>+2.1% 🔴 | 10.4ms<br>9.87ms<br>-5.3% 🟢 | 185.7µs<br>228.0µs<br>+22.8% 🔴 | 380.7µs<br>425.5µs<br>+11.8% 🔴 | 1.24ms<br>1.40ms<br>+13.1% 🔴 | 3.02ms<br>3.53ms<br>+16.8% 🔴 | | counter | 54.45M<br>54.43M<br>= | 34.04M<br>35.33M<br>+3.8% 🔴 | 8.26ms<br>8.78ms<br>+6.3% 🔴 | 333.4µs<br>455.0µs<br>+36.5% 🔴 | 462.9µs<br>614.5µs<br>+32.7% 🔴 | 1.27ms<br>1.65ms<br>+30.5% 🔴 | 3.58ms<br>4.29ms<br>+19.6% 🔴 | | snailtracer | 5.30G<br>5.33G<br>+0.6% 🔴 | 1.99G<br>2.04G<br>+2.6% 🔴 | 381.3ms<br>390.7ms<br>+2.4% 🔴 | 31.9ms<br>39.2ms<br>+22.8% 🔴 | 7.49ms<br>8.29ms<br>+10.6% 🔴 | 71.8ms<br>83.3ms<br>+16.1% 🔴 | 308.3ms<br>349.5ms<br>+13.4% 🔴 | | weth | 540.93M<br>540.86M<br>= | 244.52M<br>247.78M<br>+1.3% 🔴 | 49.5ms<br>49.0ms<br>-0.8% 🟢 | 2.47ms<br>2.28ms<br>-7.9% 🟢 | 2.03ms<br>2.17ms<br>+6.8% 🔴 | 10.9ms<br>13.7ms<br>+25.3% 🔴 | 32.4ms<br>36.1ms<br>+11.5% 🔴 | | hash_10k | 80.72M<br>80.61M<br>-0.1% 🟢 | 45.75M<br>48.66M<br>+6.4% 🔴 | 11.1ms<br>11.2ms<br>+0.9% 🔴 | 274.9µs<br>355.9µs<br>+29.5% 🔴 | 751.2µs<br>553.3µs<br>-26.3% 🟢 | 1.93ms<br>2.35ms<br>+22.1% 🔴 | 5.14ms<br>5.80ms<br>+12.9% 🔴 | | erc20_transfer | 578.86M<br>579.16M<br>+0.1% 🔴 | 251.92M<br>251.58M<br>-0.1% 🟢 | 49.9ms<br>49.9ms<br>= | 2.35ms<br>2.93ms<br>+24.8% 🔴 | 3.07ms<br>2.23ms<br>-27.5% 🟢 | 11.8ms<br>13.0ms<br>+9.9% 🔴 | 33.3ms<br>38.4ms<br>+15.5% 🔴 | | push0_proxy | 34.87M<br>34.81M<br>-0.2% 🟢 | 28.51M<br>26.05M<br>-8.6% 🟢 | 9.74ms<br>9.45ms<br>-3.0% 🟢 | 133.4µs<br>180.2µs<br>+35.1% 🔴 | 328.5µs<br>510.9µs<br>+55.5% 🔴 | 812.7µs<br>1.09ms<br>+34.7% 🔴 | 2.13ms<br>2.59ms<br>+21.2% 🔴 | | usdc_proxy | 245.10M<br>245.11M<br>= | 120.02M<br>115.32M<br>-3.9% 🟢 | 24.8ms<br>24.5ms<br>-1.3% 🟢 | 1.39ms<br>1.42ms<br>+2.3% 🔴 | 1.25ms<br>1.47ms<br>+17.7% 🔴 | 5.93ms<br>7.16ms<br>+20.6% 🔴 | 14.6ms<br>16.2ms<br>+10.9% 🔴 | | fiat_token | 3.99G<br>3.99G<br>= | 1.63G<br>1.60G<br>-2.4% 🟢 | 312.6ms<br>304.9ms<br>-2.5% 🟢 | 14.4ms<br>14.5ms<br>+0.6% 🔴 | 10.9ms<br>12.1ms<br>+11.3% 🔴 | 71.0ms<br>81.8ms<br>+15.2% 🔴 | 240.1ms<br>278.7ms<br>+16.1% 🔴 | | uniswap_v2_pair | 2.06G<br>2.06G<br>= | 861.79M<br>858.61M<br>-0.4% 🟢 | 167.7ms<br>166.1ms<br>-1.0% 🟢 | 7.78ms<br>7.91ms<br>+1.7% 🔴 | 6.33ms<br>6.78ms<br>+7.2% 🔴 | 35.6ms<br>38.2ms<br>+7.3% 🔴 | 128.2ms<br>144.6ms<br>+12.8% 🔴 | | univ2_router | 4.40G<br>4.40G<br>= | 1.81G<br>1.82G<br>+0.4% 🔴 | 347.8ms<br>349.4ms<br>+0.5% 🔴 | 15.8ms<br>17.0ms<br>+7.2% 🔴 | 11.1ms<br>12.0ms<br>+8.4% 🔴 | 68.8ms<br>81.1ms<br>+17.8% 🔴 | 281.7ms<br>331.3ms<br>+17.6% 🔴 | | seaport | 9.75G<br>9.76G<br>= | 4.25G<br>4.30G<br>+1.3% 🔴 | 803.7ms<br>814.2ms<br>+1.3% 🔴 | 26.4ms<br>29.3ms<br>+11.0% 🔴 | 18.8ms<br>22.2ms<br>+18.0% 🔴 | 176.0ms<br>232.2ms<br>+31.9% 🔴 | 683.7ms<br>887.7ms<br>+29.8% 🔴 | | airdrop | 1.42G<br>1.42G<br>= | 586.86M<br>589.11M<br>+0.4% 🔴 | 113.6ms<br>114.3ms<br>+0.7% 🔴 | 4.79ms<br>5.17ms<br>+8.0% 🔴 | 4.21ms<br>4.37ms<br>+3.8% 🔴 | 31.0ms<br>32.5ms<br>+5.0% 🔴 | 83.2ms<br>93.0ms<br>+11.7% 🔴 | | bswap64 | 67.38M<br>67.41M<br>= | 38.64M<br>38.06M<br>-1.5% 🟢 | 9.56ms<br>9.50ms<br>-0.6% 🟢 | 512.1µs<br>516.1µs<br>+0.8% 🔴 | 580.8µs<br>657.1µs<br>+13.1% 🔴 | 1.58ms<br>1.87ms<br>+18.3% 🔴 | 3.78ms<br>4.71ms<br>+24.5% 🔴 | | bswap64_opt | 74.02M<br>74.01M<br>= | 42.63M<br>38.90M<br>-8.8% 🟢 | 10.2ms<br>9.44ms<br>-7.0% 🟢 | 415.5µs<br>642.7µs<br>+54.7% 🔴 | 496.1µs<br>613.3µs<br>+23.6% 🔴 | 1.58ms<br>1.93ms<br>+21.9% 🔴 | 5.85ms<br>5.96ms<br>+1.9% 🔴 | | eip4788 | 48.76M<br>48.73M<br>= | 33.08M<br>29.33M<br>-11.3% 🟢 | 8.16ms<br>7.33ms<br>-10.2% 🟢 | 199.8µs<br>247.5µs<br>+23.8% 🔴 | 440.0µs<br>449.7µs<br>+2.2% 🔴 | 1.01ms<br>1.22ms<br>+20.1% 🔴 | 4.54ms<br>6.31ms<br>+39.0% 🔴 | | eip2935 | 42.53M<br>42.54M<br>= | 38.52M<br>31.20M<br>-19.0% 🟢 | 11.3ms<br>11.2ms<br>-1.0% 🟢 | 200.2µs<br>196.0µs<br>-2.1% 🟢 | 408.4µs<br>565.0µs<br>+38.4% 🔴 | 1.00ms<br>1.21ms<br>+20.0% 🔴 | 2.89ms<br>3.52ms<br>+21.5% 🔴 | | burntpix | 6.72G<br>6.72G<br>= | 2.70G<br>2.66G<br>-1.6% 🟢 | 514.4ms<br>503.9ms<br>-2.0% 🟢 | 14.9ms<br>14.5ms<br>-2.6% 🟢 | 1.67ms<br>1.88ms<br>+12.2% 🔴 | 10.7ms<br>10.8ms<br>+0.6% 🔴 | 28.3ms<br>31.2ms<br>+10.5% 🔴 | | curve_stableswap | 1.14G<br>1.14G<br>= | 488.27M<br>486.24M<br>-0.4% 🟢 | 96.2ms<br>94.5ms<br>-1.8% 🟢 | 3.21ms<br>3.45ms<br>+7.5% 🔴 | 2.60ms<br>2.89ms<br>+11.1% 🔴 | 23.7ms<br>26.5ms<br>+12.0% 🔴 | 47.4ms<br>55.1ms<br>+16.2% 🔴 | | onchain_lm_v2 | 3.68G<br>3.68G<br>= | 1.44G<br>1.43G<br>-0.7% 🟢 | 277.9ms<br>273.7ms<br>-1.5% 🟢 | 10.4ms<br>11.3ms<br>+8.2% 🔴 | 7.39ms<br>8.04ms<br>+8.7% 🔴 | 46.7ms<br>55.0ms<br>+17.8% 🔴 | 186.7ms<br>220.9ms<br>+18.3% 🔴 | | usdt | 1.35G<br>1.35G<br>= | 551.22M<br>554.58M<br>+0.6% 🔴 | 106.5ms<br>108.1ms<br>+1.4% 🔴 | 6.65ms<br>6.88ms<br>+3.4% 🔴 | 5.24ms<br>5.78ms<br>+10.5% 🔴 | 25.1ms<br>27.6ms<br>+10.2% 🔴 | 77.4ms<br>86.3ms<br>+11.5% 🔴 | | universal_router | 11.60G<br>11.60G<br>= | 4.89G<br>4.89G<br>= | 922.6ms<br>922.3ms<br>= | 13.9ms<br>15.1ms<br>+8.6% 🔴 | 11.3ms<br>12.6ms<br>+11.4% 🔴 | 81.0ms<br>105.5ms<br>+30.2% 🔴 | 316.1ms<br>376.3ms<br>+19.1% 🔴 | | aggregation_router_v6 | 35.22G<br>35.22G<br>= | 14.83G<br>14.56G<br>-1.8% 🟢 | 2.781s<br>2.731s<br>-1.8% 🟢 | 22.6ms<br>23.2ms<br>+2.3% 🔴 | 18.4ms<br>21.0ms<br>+14.3% 🔴 | 140.6ms<br>192.6ms<br>+37.0% 🔴 | 515.0ms<br>632.6ms<br>+22.8% 🔴 | | entry_point_v0_7 | 17.94G<br>17.94G<br>= | 8.04G<br>8.83G<br>+9.8% 🔴 | 1.503s<br>1.719s<br>+14.4% 🔴 | 10.8ms<br>11.0ms<br>+1.2% 🔴 | 10.3ms<br>10.6ms<br>+3.0% 🔴 | 66.5ms<br>79.1ms<br>+19.0% 🔴 | 267.0ms<br>321.4ms<br>+20.4% 🔴 | | uniswap_v3_pool | 6.22G<br>6.22G<br>= | 3.22G<br>2.95G<br>-8.3% 🟢 | 640.1ms<br>580.2ms<br>-9.4% 🟢 | 22.2ms<br>22.7ms<br>+2.2% 🔴 | 16.9ms<br>18.7ms<br>+10.8% 🔴 | 110.3ms<br>132.4ms<br>+20.0% 🔴 | 401.0ms<br>502.9ms<br>+25.4% 🔴 | | uniswap_v4_pool_manager | 6.72G<br>6.72G<br>= | 3.10G<br>3.40G<br>+9.9% 🔴 | 604.0ms<br>662.6ms<br>+9.7% 🔴 | 16.1ms<br>17.6ms<br>+9.3% 🔴 | 14.5ms<br>15.7ms<br>+8.1% 🔴 | 105.9ms<br>131.8ms<br>+24.5% 🔴 | 392.4ms<br>476.1ms<br>+21.3% 🔴 | | curve_3pool | 6.61G<br>6.61G<br>= | 2.99G<br>3.00G<br>+0.1% 🔴 | 585.1ms<br>577.8ms<br>-1.3% 🟢 | 22.1ms<br>23.9ms<br>+8.0% 🔴 | 15.8ms<br>16.2ms<br>+2.4% 🔴 | 85.1ms<br>101.5ms<br>+19.3% 🔴 | 431.4ms<br>456.6ms<br>+5.8% 🔴 | | curve_tricrypto2 | 9.42G<br>9.43G<br>= | 3.62G<br>3.90G<br>+7.7% 🔴 | 696.1ms<br>754.5ms<br>+8.4% 🔴 | 19.7ms<br>21.3ms<br>+8.2% 🔴 | 15.8ms<br>17.0ms<br>+7.9% 🔴 | 94.5ms<br>102.5ms<br>+8.4% 🔴 | 423.6ms<br>452.2ms<br>+6.8% 🔴 | | balancer_vault | 19.07G<br>19.08G<br>= | 8.22G<br>8.26G<br>+0.5% 🔴 | 1.550s<br>1.565s<br>+1.0% 🔴 | 28.7ms<br>29.0ms<br>+1.0% 🔴 | 19.7ms<br>20.6ms<br>+4.2% 🔴 | 202.1ms<br>242.3ms<br>+19.9% 🔴 | 642.3ms<br>832.6ms<br>+29.6% 🔴 | | succinct_staking | 10.87G<br>10.87G<br>= | 4.44G<br>4.46G<br>+0.3% 🔴 | 841.4ms<br>843.5ms<br>+0.3% 🔴 | 21.3ms<br>21.2ms<br>-0.5% 🟢 | 12.5ms<br>12.3ms<br>-1.2% 🟢 | 100.5ms<br>101.0ms<br>+0.6% 🔴 | 425.0ms<br>321.3ms<br>-24.4% 🟢 | | **TOTAL** | **165.33G<br>165.37G<br>=** | **70.61G<br>71.52G<br>+1.3% 🔴** | **13.459s<br>13.686s<br>+1.7% 🔴** | **322.4ms<br>343.7ms<br>+6.6% 🔴** | **221.5ms<br>239.9ms<br>+8.3% 🔴** | **1.587s<br>1.906s<br>+20.1% 🔴** | **5.993s<br>6.981s<br>+16.5% 🔴** | </details> ### Runtime | benchmark | instructions/iter | cycles/iter | |:------------|--------------------:|--------------:| | counter | +1.1% 🔴 | +1.7% 🔴 | | push0_proxy | -1.0% 🟢 | -1.7% 🟢 | | usdc_proxy | -2.1% 🟢 | -0.5% 🟢 | | **TOTAL** | **=** | **+0.1% 🔴** | | **GEOMEAN** | **-0.1% 🟢** | **+0.1% 🔴** | <details><summary>Full runtime</summary> | benchmark | instructions/iter | cycles/iter | |:------------------------|------------------------------:|----------------------------------:| | fibonacci-calldata | 44.09K<br>44.25K<br>+0.4% 🔴 | 10.55K<br>10.58K<br>+0.3% 🔴 | | factorial | 79.89K<br>80.08K<br>+0.2% 🔴 | 18.01K<br>17.98K<br>-0.1% 🟢 | | counter | 23.13K<br>23.39K<br>+1.1% 🔴 | 7.22K<br>7.34K<br>+1.7% 🔴 | | snailtracer | 196.51M<br>196.51M<br>= | 58.37M<br>58.61M<br>+0.4% 🔴 | | weth | 28.57K<br>28.34K<br>-0.8% 🟢 | 9.29K<br>9.37K<br>+0.9% 🔴 | | hash_10k | 8.99M<br>8.99M<br>= | 2.82M<br>2.85M<br>+1.1% 🔴 | | erc20_transfer | 19.18M<br>19.19M<br>= | 5.36M<br>5.39M<br>+0.6% 🔴 | | push0_proxy | 23.49K<br>23.24K<br>-1.0% 🟢 | 8.01K<br>7.87K<br>-1.7% 🟢 | | usdc_proxy | 25.19K<br>24.65K<br>-2.1% 🟢 | 8.40K<br>8.36K<br>-0.5% 🟢 | | fiat_token | 22.84K<br>22.85K<br>= | 7.71K<br>7.64K<br>-0.9% 🟢 | | uniswap_v2_pair | 23.03K<br>23.20K<br>+0.7% 🔴 | 7.83K<br>7.81K<br>-0.3% 🟢 | | univ2_router | 20.85K<br>21.01K<br>+0.8% 🔴 | 7.11K<br>7.11K<br>-0.1% 🟢 | | seaport | 23.54K<br>23.40K<br>-0.6% 🟢 | 7.89K<br>7.88K<br>-0.1% 🟢 | | airdrop | 23.19K<br>23.05K<br>-0.6% 🟢 | 7.81K<br>7.79K<br>-0.3% 🟢 | | bswap64 | 20.10K<br>19.93K<br>-0.9% 🟢 | 6.80K<br>6.75K<br>-0.7% 🟢 | | bswap64_opt | 20.10K<br>20.09K<br>= | 6.75K<br>6.73K<br>-0.3% 🟢 | | eip4788 | 24.24K<br>24.47K<br>+0.9% 🔴 | 7.94K<br>8.07K<br>+1.7% 🔴 | | eip2935 | 23.07K<br>22.96K<br>-0.5% 🟢 | 7.58K<br>7.75K<br>+2.2% 🔴 | | burntpix | 103.29M<br>103.35M<br>+0.1% 🔴 | 27.62M<br>27.02M<br>-2.2% 🟢 | | curve_stableswap | 263.14K<br>262.99K<br>-0.1% 🟢 | 109.08K<br>109.85K<br>+0.7% 🔴 | | onchain_lm_v2 | 521.51M<br>521.51M<br>= | 216.36M<br>217.11M<br>+0.3% 🔴 | | usdt | 39.39K<br>39.48K<br>+0.2% 🔴 | 12.40K<br>12.33K<br>-0.5% 🟢 | | universal_router | 154.06K<br>154.23K<br>+0.1% 🔴 | 52.01K<br>52.85K<br>+1.6% 🔴 | | aggregation_router_v6 | 486.03K<br>486.52K<br>+0.1% 🔴 | 169.55K<br>171.47K<br>+1.1% 🔴 | | entry_point_v0_7 | 1.30M<br>1.30M<br>= | 325.19K<br>326.39K<br>+0.4% 🔴 | | uniswap_v3_pool | 84.96K<br>84.70K<br>-0.3% 🟢 | 26.51K<br>26.54K<br>+0.1% 🔴 | | uniswap_v4_pool_manager | 70.40K<br>70.39K<br>= | 21.10K<br>21.07K<br>-0.1% 🟢 | | curve_3pool | 83.17K<br>83.30K<br>+0.1% 🔴 | 27.75K<br>27.27K<br>-1.7% 🟢 | | curve_tricrypto2 | 226.89K<br>226.73K<br>-0.1% 🟢 | 83.43K<br>83.42K<br>= | | balancer_vault | 125.68K<br>125.28K<br>-0.3% 🟢 | 41.24K<br>41.59K<br>+0.8% 🔴 | | succinct_staking | 67.29K<br>66.64K<br>-1.0% 🟢 | 23.68K<br>23.73K<br>+0.2% 🔴 | | **TOTAL** | **852.81M<br>852.87M<br>=** | **311.56M<br>312.02M<br>+0.1% 🔴** | </details>
…lloy-rs#840) Adds `TxStateChanges`, a borrowed view of one transaction's state changes, returned by `ExecutedTx::changes()` (in place, without detaching) and `PendingState::changes()`. It implements `StateChangeSource`, and `ExecutedTx` now does too. Lets callers such as reth's commit-condition path read what a transaction wrote (balances, storage slots) before choosing to commit or discard it, without paying for `detach` and reattach.
sduchesneau
approved these changes
Nov 6, 2026
sduchesneau
left a comment
There was a problem hiding this comment.
LGTM, target branch is not perfect but I will change it after and create a new sf/reth branch for it.
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Moves the StreamingFast evm2 fork to
592bf18c, the evm2 revision upstream reth v2.10.0 pins. This keeps the system-call inspection commit (Add opt-in inspection of system calls) that Firehose tracing instreamingfast/rethneeds.The merge was clean. The diff against
592bf18cis that one commit and nothing else (git diff 592bf18c HEAD --stat:crates/evm2/src/evm/mod.rs,crates/evm2/src/evm/system.rs).Upstream changes in the range (6 commits):
TxStateChangesexposed onExecutedTx(alloy-rs#840, used by reth's new commit-condition callback), the out-of-gas step cost reported as the gas delta (alloy-rs#752, removesInterpreter::failed_charge, which Firehose does not use), a lock-free precompile list (alloy-rs#835) and JIT performance work.Release: once merged, tag the merge commit
reth-v2.10.0-sf. streamingfast/reth#87 pins that tag (itsCargo.lockcurrently resolves to this PR's head commite1f625f1).Tests
cargo test -p evm2 --lib: PASSED (722 tests)streamingfast/rethbump/reth-2.10.0(Firehose unit tests, prestate goldens, Battlefield), see that PR.Open questions
sf/reth-v2.9.0, the branchreth-v2.9.0-sfwas cut from. If you would rather keep one branch per reth version, createsf/reth-v2.10.0from this PR's head and tag it there instead.streamingfast/reth'sCargo.lockrecords this PR's head commit (e1f625f1). If the tag lands on a different commit (a merge commit), runcargo update -p evm2 -p evm2-inspectors -p evm2-jiton the reth PR after tagging.Test report (streamingfast/reth#87)
Test Execution Summary
Branch
bump/reth-2.10.0(merge of upstreamv2.10.0intorelease/reth-2.x). Local builds point the evm2 patch at thestreamingfast/evm2branchbump/reth-2.10.0(heade1f625f1), the commit thereth-v2.10.0-sftag is meant for. The committedCargo.tomlpins the tag.Build Status
cargo check -p reth -p reth-firehose -p reth-firehose-tests -p reth-engine-tree -p reth-evm -p reth-rpc --all-targets: PASSEDcargo check --workspace --all-targets: PASSEDcargo +nightly-2026-10-31 fmt --all -- --check: PASSEDcargo build --release --locked -p reth --bin reth: PASSED (binary used for Battlefield)Build, push and release (if tag)(Dockerfile.sfimage build) on the PR head: PASSEDUnit Tests
cargo test -p reth-firehose -p reth-firehose-tests(mandatory)reth-firehose80,batch_executor1,prestate7 (golden files unchanged),staged_sync_bal1cargo test -p reth-engine-tree --lib --test firehose_live_tracing --test firehose_live_tracing_amsterdam --test firehose_live_tracing_prewarm_reusecargo test -p reth-evm -p reth-evm-ethereumcargo test -p evm2 --lib(instreamingfast/evm2bump/reth-2.10.0)Integration Tests
Battlefield Tests
streamingfast/battlefield-ethereumat879ea9a,fireethv2.24.1,rethbuilt from this branch../scripts/run_firehose_reth_dev.shthenpnpm test:fh3.0:reth-devreth-dev)../scripts/run_firehose_reth_dev.sh praguethenpnpm test:fh3.0:reth-devreth-devsnapshots are recorded on Amsterdam (EIP-8037 gas, EIP-7708 logs), so a Prague chain differs from them. Expected diff, not caused by this merge:reth-v2.9.0-fh3.1-1built from source gives the same 64 failures on the same setup, and the traces of both binaries are identical once identity fields (addresses, hashes, nonces, signatures and the logs bloom built from them), which vary with deployment order between runs, are masked. The one remaining difference is a transaction the baseline dev node packed second in its block (cumulativeGasUsed, samegasUsed)../scripts/ethereum_devnet/run_playground_devnet.sh,./scripts/run_firehose_reth_devnet.sh, thenpnpm test:fh3.0:reth-devnetreth-devnet).prague/setcode_set_delegationsordinal shift the Battlefield README describes, and the precompile-without-balance guard). Both pass on the fresh chain above.scripts/compare-blocks.sh, which the chain-update skill asks for after each run, does not exist in Battlefield anymore, so it was not run.Fork coverage: Amsterdam (Glamsterdam on the execution layer) is covered by Reth Dev's default genesis, the
amsterdam_*prestate goldens andfirehose_live_tracing_amsterdam. The pre-Amsterdam forks mainnet and Hoodi run are covered by the devnet and the Prague dev run.Firehose review
v2.9.0..v2.10.0. Conflicts only inCargo.toml(version, evm2 patch),Cargo.lockanddocs/vocs/vocs.config.ts(version).592bf18and now patches evm2 itself through[patch."https://github.com/alloy-rs/evm2"]. That table now points atstreamingfast/evm2tagreth-v2.10.0-sf(592bf18plus the system-call inspection commit), and our separate patch table is gone, since Cargo rejects the same table twice.execute_transaction_with_commit_conditionpassesevm2::TxStateChangesto the callback.FirehoseBlockExecutoroverrides it and now passes the pending state changes, like upstream's default implementation. No other Firehose code calls it.payload_processor(bal/execute.rstest imports,prewarm.rstest imports, a refactor inCacheTaskHandle);db repair-trieverification is the only new parallelism, and it does not execute transactions.payload_validator.rsare span parents only; no new post-execution check. Blocks are still printed byFirehoseBlockTracer::mark_verified()after validation.alloy-hardforksstays at 0.4.11 and the chain specs are unchanged: Amsterdam is active on Sepolia (block 11856337), unscheduled on Hoodi (u64::MAX) and mainnet; BPO3-5 unscheduled. This release neither schedules nor changes Glamsterdam.ACTIVATIONS.mdrefreshed.Interpreter::failed_charge, which the inspector does not use.