Commit graph

529 commits

Author SHA1 Message Date
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
Julian Sutherland
047f630703
Merge pull request #81 from NethermindEth/Coda-Coda/README-edit-2
Fix typo
2025-09-24 00:53:30 +01:00
Daniel Britten
30be522dfe Fix typo 2025-09-24 11:51:05 +12:00
Julian Sutherland
cc0a7386e6
Merge pull request #80 from NethermindEth/Coda-Coda/README-edit
Add info to README about running the Yul semantics tests
2025-09-24 00:46:30 +01:00
Daniel Britten
092fd6c1e4 Add info to README about running the Yul semantics tests 2025-09-24 11:36:45 +12:00
Daniel Britten
a1a7a42062
Merge pull request #79 from NethermindEth/Coda-Coda/Yul-semantics-4
Add Yul semantics for `CALL*` operations and machinery required for this.
2025-09-24 00:15:29 +12:00
Daniel Britten
4c5437089b Minor improvement to README 2025-09-24 00:14:24 +12:00
Daniel Britten
ab92ac7e94 Add info about other primops that are not modelled to README 2025-09-24 00:10:45 +12:00
Daniel Britten
fd1cc6f1b7 Add info about SELFDESTRUCT limitations to README 2025-09-23 23:32:49 +12:00
Daniel Britten
c27c95dedc Add Yul halting for REVERT and STOP 2025-09-23 23:29:47 +12:00
Daniel Britten
401ddf57ef Improve README 2025-09-23 23:02:59 +12:00
Daniel Britten
0c7c69b37e Update Solidity and Yul source files for Yul semantics testing 2025-09-23 23:01:28 +12:00
Daniel Britten
b94001a801 Add callcode to parser 2025-09-23 22:56:05 +12:00
Daniel Britten
c5670d16ad Add test for CALLCODE
The Yul code has been manually altered from `pop(delegatecall(_3,  4,  add(expr_mpos,  0x20),  _2, 0, 0))` to `pop(callcode(_3,  4, 0, add(expr_mpos,  0x20),  _2, 0, 0))` (adding the value argument, zero, and changing delegate to call. Solidity no longer outputs `callcode` except when using inline assembly, preferring `delegatecall`.
2025-09-23 22:55:52 +12:00
Daniel Britten
bb7dede41d FIx CALLCODE semantics
It should use the code from `address` but otherwise stay in the context of the current contract.
2025-09-23 22:34:45 +12:00
Daniel Britten
af5fa73f9d Fix implementation of DELEGATECALL
The previous implementation only used the other contract's context for the call to the dispatcher.
2025-09-23 22:27:13 +12:00
Daniel Britten
38ef221d9a Add a test of delegateCall 2025-09-23 22:26:05 +12:00
Daniel Britten
249aa21cce Add test for fun_testStaticStore 2025-09-23 19:51:43 +12:00
Daniel Britten
36ba1f3cc4 Add check for primOps that violate static mode 2025-09-23 19:51:10 +12:00
Daniel Britten
74756747bc Fix error propogation during switches
Before this fix, an error (such as `.STATICMODEVIOLATION`) in any of the branches would cause the final result to be the error (except for `.YulHalt`). The correct behaviour is for only that branch to be associated with the error, and not the whole result of the switch. This is now the behaviour.
2025-09-23 19:50:18 +12:00
Daniel Britten
c830940e14 Use state that has had perm set to false 2025-09-23 19:40:27 +12:00
Daniel Britten
bbf56a9f13 Simplify accessing executionEnv 2025-09-23 19:37:38 +12:00
Daniel Britten
81eb1aae57 Amend Caller2 test contract to pass a value to store
This should result in a `.StaticModeViolation` when run.

This commit was made with the assistance of Cursor (cursor.com).
2025-09-23 18:27:02 +12:00
Daniel Britten
9f308afb1d Remove debug logging 2025-09-23 18:22:38 +12:00
Daniel Britten
dfcd0ed2ac Add output of success or failure for existing Yul tests 2025-09-23 18:21:56 +12:00
Daniel Britten
b907934e2a Set the Storage contract to have an initial number of 21 stored 2025-09-23 18:18:40 +12:00
Daniel Britten
89a438fe81 Add test of a succesful static call 2025-09-23 18:18:07 +12:00
Daniel Britten
6f84b5bb8e Add caller2 example Yul contract 2025-09-23 18:17:13 +12:00
Daniel Britten
e08cfa0b0d Restore ExecutionEnv for STATICCALL/DELEGATECALL/'CALLCODE` 2025-09-23 18:14:58 +12:00
Daniel Britten
20633125cf Fix check for perm at start of STATICCALL 2025-09-23 18:02:49 +12:00