Fe port certificate

FiatTokenProxy

Port source ports/usdc-proxy, runtime code hash 0xc6d25ff2998a28e350b9e6128ec98086050d3b6a7dbc6d1617ed4bd9ddabcb85 (1334 bytes), in place of the deployed code with hash 0xd80d4b7c890cb9d6a4893e6b52bc34b56b25335cb13716e0d1d31383e6b41505 (2186 bytes). Blocks /root/v2blocks/0x192d500 to /root/v2blocks/0x192d513.

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 happenedpassed
Mainnet, mutatedpassed
Random callspassed
Mutants: the unchanged portpassed

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.

Blocks20
Transactions6310
Transactions that ran the port1390
Identical to the chain1306
Differ where other code read the gas left84
  of which part at or under that code84
Differ where other code read code hashes0
Only the deployed code ran out of gas0
Behave differently0

Gas per call in identical transactions

FunctionIn the port's sourceCallsDeployedPortChange
transfer–13052498425047+0.2%
–233421434256+0.1%
approve–1392617626218+0.1%
–7064096445+0.5%
balanceOf–78428122872+2.1%
transferFrom–3612439024432+0.1%
allowance–8133303393+1.8%
permit–184806648126+0.1%
decimals–2123542390+1.5%
–141179511831+0.3%
–184508845690%
–361890619510%
–279138791990%
–555945654+1%

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.

Transactions1390
Runs27800
Identical27048
Differ where other code read the gas left or code hashes752
  of which code hashes30
  of the rest, part at or under the code that read the gas left722
Only the deployed code ran out of gas0
Differ after an address-shaped word got upper bits0
Differ after the calldata was cut short0
Differ0

The port ran 162 of its 578 instructions (28%) in these runs.

Random calls

1,000 sessions of up to 60 random calls each, against both codes in step.

Well-formed calls48734
Well-formed calls that differ0
Calls with short calldata that differ0
Calls with dirty addresses that differ0
Invariants broken0

The port ran 535 of its 578 instructions (92.5%).

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 source12
Mutants built12
Killed by random calls9
Killed by mainnet mutations0
Survived3

75% killed. A survivor is a blind spot of the checks or a change that means the same; each deserves a look:

line 200: let words = (size + 31) * 32
line 205: value: evm.calldataload(at - (i * 32) as u256),
line 205: value: evm.calldataload(at + (i / 32) as u256),

Made by fevm-replay certify, written in Fe and running fevm, the EVM written in Fe.