-
Notifications
You must be signed in to change notification settings - Fork 19
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
Update eof.md - RETURNCODE #164
base: main
Are you sure you want to change the base?
Conversation
Idea surfaced in discord
Not sure what's the benefit. |
It seemed to have support in the discord convo, so I posted here for tracking. I'm personally fine with RETURNCONTRACT, even if RETURNCODE is nicer. CODE is more to-the-point and EVM-specific, while CONTRACT is a bit vague and more on a different level of abstraction. |
I don't love RETURNCODE, because it's not a code that is being returned, but a container. How about EOFRETURN or RETURNEOF? |
Fair point. I understand RETURNCONTAINER is just too long? Advantage of RETURNCODE is that it aligns with HASCODE (which cannot be HASCONTAINER/HASEOF, because it works for legacy targets), as well as previously relevant CODECOPY etc, to which everyone is used to. Also I imagine that, when speaking about accounts, everyone will keep on saying "the account has code" not "has container". EOFRETURN would match up with EOFCREATE, but might be interpreted as the EOF replacement of RETURN, which it isn't, contrary to EOFCREATE being the EOF replacement of CREATE (:exploding_head:). Then, maybe it is the "RETURN" which is the problem? EOFDEPLOY? BTW, I realized recently that naming is weird. We're defining EVM Object format, but we are calling these containers, not objects. RETURNOBJECT? ECF? neither seems likely. Going back to the data containers - would we still be using the same opcode for these? a specialized RETURNDATA, which doesn't have the immediate arg and doesn't require a subcontainer might be more appropriate. I still think RETURNCODE is optimal, just because it lines up with the meaning "code" has from POV of accounts, is familiar with RETURN from legacy creation (but is at the same time clearly distinct), and mainly avoids "CONTRACT" word. |
The term "code" is overloaded in EOF, it could refer to "EOF code section" or to the "account code" in the state trie, which is a container. All of the opcodes with "code" in their names are removed in EOF, and HASCODE hasn't been accepted yet, so it's hard to find an analogy. EOFDEPLOY is not bad. RETURNCODE seems okay too and I prefer it to RETURNCONTRACT. I like these arguments by @pdobacz:
|
Documenting an idea surfaced in discord