-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine and Stabilize EOF Support #15310
Comments
This comment was marked as spam.
This comment was marked as spam.
There are a couple of remaining issues to address I would like to discuss
|
We should consider if legacy reserved identifiers for deprecated instructions by EOF should be released. |
Support for
Depends on how many of these we have. If not too many, my suggestion would be to make a copy of the test for EOF. The test is still relevant, it's just that isoltest does not let us generalize those expectations that easily and copying the test is less work than coming up with a custom solution for this particular case.
I'll add this to the list. Disabling the test on EOF is fine, just add a TODO explaining that eventually we do want it to work, it's just not yet implemented.
I guess this is because we're not tracking immutable references. I'm not sure if reporting their positions on EOF is still necessary, but at least it's still doable so we may keep doing it to keep the interface the same. That depends on how we'll deal with So again, this is something to add to the list above. For now adding a TODO about EOF and disabling the test is fine. |
I added the things I mentioned above. I also did a bigger update of the list. I had a bunch of TODOs noted down from reviewing the PRs and now that we're nearly done with the initial implementation (only some test tweaks left), it was a good moment to dump it all here. Here's a rough summary of what I added:
It's not all equally important but I did not attempt to prioritize them at this point. Some of if may also need to be discussed first, especially those marked as "decision". |
Forum thread to gather some feedback on the |
As for some prioritization here, I'd start with (in this order - but open to discussion):
|
I'm creating this issue to keep a list of tasks that will need to be done after #15294 is merged before we can consider EOF support "non-experimental".
The list is non-exhaustive so far and not ordered by importance, please just edit in additional tasks (or comment) for anything still missing.
General/Miscellaneous
loadimmutable()
on EOF.msize()
on EOF.(e.g. using intermittent jumps, outlining or splitting out control flow using
JUMPF
)Assembly::assemble
to better split into EOF/non-EOF parts (see e.g. Implementation of EOF in Solidity [DO NOT MERGE] #15294 (comment) and Implementation of EOF in Solidity [DO NOT MERGE] #15294 (comment))Language Level Changes
Solidity:
gas
in call options (#15638).type(C).creationCode
,type(C).runtimeCode
,<address>.code
,<address>.codehash
,gasleft()
andselfdestruct()
.low level calls (disallow; reintroduce for EOF-low-level-calls - consider either another unified version that works for both targets or implementing the EOF-style version for legacy as well, if at all possible)As implemented now (#15559) low-level calls work for both targets.Builtin address calculation for salted creation (compatible with both EOF and legacy)(rejected/impossible)isEOF
)? Option to define both legacy and EOF specific assembly blocks? (Ideally we're fine without this, but will need to check demand from library authors)verbatim
for targetting EOF (since we cannot perform stack height analysis) and can/need to replace with full custom subcontainers. To retainverbatim
, it'd need to declare it's max stack effects, if used with EOF.Yul:
auxdataload()
available now).EVM assembly:
DATALOAD
,DATASIZE
,DATACOPY
,RETURNDATALOAD
,RJUMPV
,DUPN
,SWAPN
,EXCHANGE
.Noteworthy Documentation Entries
EXTCODESIZE
check.gas
no longer allowed in call options.Compiler Output (and Input) Artifacts
--no-cbor-metadata
induces code changes (in particular dataload offsets) - similar prerelease vs release due to the length of the cbor-encoded version string.EXCHANGE
: as raw values or slot numbers?{}
? see eof: new contract creation #15512 (comment))JUMPDEST
asNOP
for EOF assembly/opcode.Optimizations
RJUMPV
for dense Yul switches; investigate trying to turn sparse switches into dense switches (especially for the external dispatch)CALLF RETF
->JUMPF
peephole optimizer rule; tail-call optimization in codegenSWAPN
/DUPN
during Yul->EVM code transform and remove all stack-to-memory logicEXCHANGE
for stack shufflingRETURNDATACOPY
restrictions in the optimizer.RETURNDATALOAD
Testing
Note: Obviously any changes in all other points need proper testing. But beyond that generally:
SemanticInformation.cpp
and add more coverage viafunctionSideEffects
tests (disabled in #15654).EOFCREATE
inEVMHost
(see #15635)Breaking Changes
Note: Non-backwards-compatible changes we should do even with legacy as target in the breaking release that switches to EOF per default. (EOF-specific breaking changes for EOF as target can generally be done outside of breaking releases if restricted to only affect compilation when EOF is enabled)
datacopy
, etc., Yul builtins for legacy codegen.New Language Features
Note: we don't need these to call EOF support stable, but notably a few language features become significantly easier to support with EOF, e.g.:
calldata
arguments in constructorsThe text was updated successfully, but these errors were encountered: