WETH9
Port source ports/weth9, runtime code hash 0x3fe26b3d0f24d09333f61486c739457698c7725a7389ea5c3c7c238903d4a9de (1176 bytes), in place of the deployed code with hash 0xd0a06b12ac47863b5c7be4185c2deaad1c61557033f56c7d4ea74429cbb25e23 (3124 bytes). Blocks /root/v2blocks/0x192d500 to /root/v2blocks/0x192d5c7.
No behavior difference: every transaction that ran the port, every mutation of them and every random call behaved as on the deployed code.
| Mainnet, as it happened | passed |
|---|---|
| Mainnet, mutated | passed |
| Random calls | passed |
| Mutants: the unchanged port | passed |
Mainnet, as it happened
Each transaction of the blocks ran on its own mainnet pre-state, with the port in place of every account holding the deployed code, and was compared with the chain: status, logs, every balance, nonce and storage slot. Only gas may differ.
| Blocks | 200 |
|---|---|
| Transactions | 69643 |
| Transactions that ran the port | 3950 |
| Identical to the chain | 3615 |
| Differ where other code read the gas left | 335 |
| of which part at or under that code | 335 |
| Differ where other code read code hashes | 0 |
| Only the deployed code ran out of gas | 0 |
| Behave differently | 0 |
Gas per call in identical transactions
| Function | In the port's source | Calls | Deployed | Port | Change |
|---|---|---|---|---|---|
Deposit | src/lib.fe:144 | 955 | 16126 | 15998 | -0.7% |
BalanceOf | src/lib.fe:129 | 7557 | 1005 | 834 | -17% |
Withdraw | src/lib.fe:150 | 1264 | 9740 | 9448 | -2.9% |
Transfer | src/lib.fe:178 | 4279 | 13257 | 12752 | -3.8% |
TransferFrom | src/lib.fe:185 | 1363 | 13262 | 12767 | -3.7% |
Allowance | src/lib.fe:135 | 179 | 2325 | 2078 | -10.6% |
Approve | src/lib.fe:168 | 508 | 16915 | 16713 | -1.1% |
Decimals | src/lib.fe:120 | 18 | 2332 | 2143 | -8.1% |
| – | 1 | 4096 | 3980 | -2.8% |
fallback | – | 17 | 8866 | 8882 | +0.1% |
TotalSupply | src/lib.fe:125 | 4 | 343 | 248 | -27.6% |
| – | 1 | 4096 | 3980 | -2.8% |
Mainnet, mutated
Each transaction that touched the deployed code ran again with its calldata changed, or with one call into the contract changed in flight, on both codes, gas free.
| Transactions | 3950 |
|---|---|
| Runs | 79000 |
| Identical | 76569 |
| Differ where other code read the gas left or code hashes | 2396 |
| of which code hashes | 397 |
| of the rest, part at or under the code that read the gas left | 1999 |
| Only the deployed code ran out of gas | 35 |
| Differ after an address-shaped word got upper bits | 0 |
| Differ after the calldata was cut short | 0 |
| Differ | 0 |
The port ran 560 of its 714 instructions (78.4%) in these runs.
Random calls
1,000 sessions of up to 60 random calls each, against both codes in step.
| Well-formed calls | 47257 |
|---|---|
| Well-formed calls that differ | 0 |
| Calls with short calldata that differ | 0 |
| Calls with dirty addresses that differ | 0 |
| Invariants broken | 0 |
The port ran 639 of its 714 instructions (89.4%).
How sharp the checks are
Mutants of the port's source, one operator changed each, built with fe and put through random calls and then mutations of the first ten blocks. The unchanged port passed the same checks first.
| Operators in the source | 13 |
|---|---|
| Mutants built | 13 |
| Killed by random calls | 12 |
| Killed by mainnet mutations | 0 |
| Survived | 1 |
92.3% killed. A survivor is a blind spot of the checks or a change that means the same; each deserves a look:
line 82: DynString::from_word_prefix(word: word, len: ((word & 0xff) * 2).downcast_truncate())
Made by fevm-replay certify, written in Fe and running fevm, the EVM written in Fe.