Compare commits

..

29 commits

Author SHA1 Message Date
Dan Robinson
3487acc950 Disclose fork divergences from upstream (FORK_NOTES.md)
Documentation-only: add FORK_NOTES.md enumerating every divergence from
NethermindEth/EVMYulLean and the shared Yul/EVM trusted surface; README
pointer; docstring on restoreSuccessfulContractCallState explaining the
isEmpty merge sentinel and the createdAccounts asymmetry. No semantic
changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:09:38 -07:00
Dan Robinson
b08573c65e keccak256: pure total Lean implementation as the logical meaning
Restore the equational Keccak-256 sponge in EvmYul/SpongeHash/Keccak256.lean
(no partial, no FFI) and change ffi.keccak256 from opaque to a def whose
body is that pure function, keeping @[extern "keccak256"] for native-speed
execution. ffi.KEC is now provable-about; downstream consumers (evm-compiler,
solidity-lean) can share one keccak definitionally.

Verified: full lake build green; keccak vectors (empty, "abc", ERC-20
transfer selector) pass via #eval of the pure body.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dy3P966aQiG3jen2yKuNeu
2026-07-09 10:53:15 -07:00
Dan Robinson
b908ec317a Fix EVM PUSH and MODEXP semantics 2026-07-09 07:21:24 -07:00
Dan Robinson
3c5c44a62f Make D_J_aux total via Nat-indexed structural recursion
Replace the partial D_J_aux with a total definition indexed by a Nat
program counter, terminating by c.size - n (each step advances by
1 + argOnNBytesOfInstr, and parseInstr is total on in-bounds bytes,
falling through to some .INVALID). D_J keeps its exact signature and
behavior is bit-identical for all bytecode of size <= 2^256 - 33:
same visit order, same PUSH skip widths, same accumulator order.

Add trivial unfolding lemmas (D_J_aux_out_of_bounds, D_J_aux_step,
D_J_def) so downstream proofs can unfold without fighting WF recursion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 01:55:01 -06:00
Dan Robinson
8b610d5248 Add CLZ and EIP-7702 delegation lookup 2026-07-01 11:47:05 -07:00
Dan Robinson
0a513d06c4 Update MODEXP for Fusaka 2026-07-01 09:46:52 -07:00
Dan Robinson
3918e920f7 Specify byte array word decoding 2026-06-12 02:07:15 -07:00
Dan Robinson
a3a86e55ef Expose byte array zeroing specifications 2026-06-12 01:59:01 -07:00
Dan Robinson
314a6457b9 Make RETURNDATACOPY bounds-aware in raw semantics 2026-06-07 22:43:54 -07:00
Dan Robinson
cd76848248 Support Yul external code inspection 2026-06-07 14:59:01 -07:00
Dan Robinson
2a2b5cc1f6 Update deprecated order classes for Lean 4.28 2026-06-05 01:36:48 +02:00
Dan Robinson
a959211f5d Migrate EVMYulLean to Lean 4.28 2026-06-03 13:44:28 +02:00
Dan Robinson
451f19fbfc Make EVMYulLean baseline buildable 2026-06-03 13:31:46 +02:00
Dan Robinson
b5661ed889 Pass selected code to child dispatchers 2026-05-26 18:06:36 -07:00
Dan Robinson
562afce8e8 Use conditional merge for Yul call restore 2026-05-26 17:25:22 -07:00
Dan Robinson
305b2816a0 Factor Theta call prelude 2026-05-26 16:59:12 -07:00
Dan Robinson
36b7cb5460 Use isEmpty for child account map merge 2026-05-26 16:10:11 -07:00
Dan Robinson
193a80b964 Preserve created accounts for precompile calls 2026-05-26 15:58:32 -07:00
Dan Robinson
15731561aa Thread chain context through EVM child frames 2026-05-26 15:06:40 -07:00
Dan Robinson
2de3f00be5 Freshen Yul external call frames 2026-05-26 14:52:54 -07:00
Dan Robinson
d14bf27237 Align external call result semantics 2026-05-26 14:33:01 -07:00
Dan Robinson
5e032ed7da Share typed precompile dispatch 2026-05-26 14:04:09 -07:00
Dan Robinson
1e4d695d15 Align Yul precompile dispatch with EVM 2026-05-26 13:23:11 -07:00
Dan Robinson
bad057db2d Align Yul call-family state effects with EVM 2026-05-26 13:07:17 -07:00
Dan Robinson
5d7511d768 Fix Yul loop post success semantics 2026-05-22 08:46:45 -07:00
Dan Robinson
2cf8181c56 Fix omitted Yul switch default notation 2026-05-15 14:25:03 -07:00
Dan Robinson
ff19985f67 Make Yul SELFDESTRUCT halt execution 2026-05-15 14:08:56 -07:00
Dan Robinson
355d10ec9f Align Yul interpreter with Solidity semantics 2026-05-14 20:51:57 -07:00
Dan Robinson
40587c9446 Fix Yul switch branch execution 2026-05-14 19:40:23 -07:00
34 changed files with 2099 additions and 777 deletions