Fe port certificate

TetherToken

Port source ports/usdt, runtime code hash 0x8ec7fe746668d9be951c92be4bdcd6d154f9152b5c4ceaddd5c3f3cc750b61c7 (4342 bytes), in place of the deployed code with hash 0xb44fb4e949d0f78f87f79ee46428f23a2a5713ce6fc6e0beb3dda78c2ac1ea55 (11075 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 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.

Blocks200
Transactions69643
Transactions that ran the port16217
Identical to the chain15571
Differ where other code read the gas left643
  of which part at or under that code643
Differ where other code read code hashes0
Only the deployed code ran out of gas3
Behave differently0

Gas per call in identical transactions

FunctionIn the port's sourceCallsDeployedPortChange
Transfersrc/lib.fe:287159692812426968-4.1%
TransferFromsrc/lib.fe:32923782276821860-3.9%
BalanceOfsrc/lib.fe:247513820341555-23.5%
Allowancesrc/lib.fe:26534230812417-21.5%
Approvesrc/lib.fe:3838672090520553-1.6%
Decimalssrc/lib.fe:2294118981708-10%
Namesrc/lib.fe:221131102636-15.2%
Symbolsrc/lib.fe:225135502634-25.8%
–6773226-70.7%
Pausedsrc/lib.fe:414127142354-13.2%
IsBlackListedsrc/lib.fe:438230332436-19.6%

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.

Transactions16217
Runs324340
Identical317561
Differ where other code read the gas left or code hashes6321
  of which code hashes533
  of the rest, part at or under the code that read the gas left5788
Only the deployed code ran out of gas458
Differ after an address-shaped word got upper bits0
Differ after the calldata was cut short0
Differ0

The port ran 1152 of its 2610 instructions (44.1%) in these runs.

Random calls

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

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

The port ran 2541 of its 2610 instructions (97.3%).

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 source49
Mutants built49
Killed by random calls45
Killed by mainnet mutations0
Survived4

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

line 532: require(total_supply.wrapping_add(amount) >= total_supply)
line 534: balances.get(key: owner).wrapping_add(amount) >= balances.get(key: owner),
line 548: require(total_supply > amount)
line 602: if fee >= maximum { maximum } else { fee }

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