debug_executionWitness sometimes under-supplies preimages in witness keys for accounts the EVM accesses during block execution.
On mainnet block 25350549, address 0x16fd7629978addaf41c426601176c37977a0faa7 is read during execution, but its preimage is absent from the witness's keys, yet a leaf node for it is present in state. A stateless verifier that takes keys as the closed set of accessed addresses cannot route to the account.
Attached script reproducing the problem by running:
python3 verify_witness_preimages.py \
./executionWitness25350549.json \
--check-addr 0x16fd7629978addaf41c426601176c37977a0faa7
Outcome:
witness: .../executionWitness25350549.json
state_root: 0xe53501b9ee5cdaf6b2aaf7401fd25bb60f0829a41a52bd0c41fd28a6eac2b889
keys[]: 1516 total (505 × 20-byte, 1011 × 32-byte)
state[]: 8700 unique trie nodes
Classification of --check-addr inputs:
0x16fd7629978addaf41c426601176c37977a0faa7 preimage_in_keys=False trie_walk=present
block25350549.json
executionWitness25350549.json
verify_witness_preimages.py
debug_executionWitnesssometimes under-supplies preimages in witnesskeysfor accounts the EVM accesses during block execution.On mainnet block 25350549, address
0x16fd7629978addaf41c426601176c37977a0faa7is read during execution, but its preimage is absent from the witness'skeys, yet a leaf node for it is present instate. A stateless verifier that takeskeysas the closed set of accessed addresses cannot route to the account.Attached script reproducing the problem by running:
Outcome:
block25350549.json
executionWitness25350549.json
verify_witness_preimages.py