-
Notifications
You must be signed in to change notification settings - Fork 79
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
Implement evm_result_outcome #81
Conversation
@@ -205,6 +216,9 @@ enum evm_call_kind { | |||
EVM_CREATE = 3 ///< Request CREATE. Semantic of some params changes. | |||
}; | |||
|
|||
/// This is used as a result code with evm_call_fn. | |||
#define EVM_EXCEPTION INT64_MIN ///< The execution ended with an exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably this would need to be renamed if it is only used by evm_call_fn
.
Is that assumption used in the generated code? |
Can you explain why this is needed? |
This is the item from the todo list:
|
Having 32/64-bit error code, would that be enough? |
@chfast: the |
When the cpp-ethereum EVM interpreter is converted to this interface, perhaps it would like to keep the majority of its exceptions:
Also probably a |
My question was if only error code is enough. My view on this is like that:
|
Why does it need to be a multiple of 32 bytes?
I think it is optional from both the VM and the VM consumer's (i.e. an ethereum client) point of view. Can be
So right now,
Do you expect any other positive outcome other than
Do you have a proposal for that structure? I would like to implement provisions for that. Though I think |
@chfast in case of Hera, there could be more exceptions:
|
Let's do something like that:
Let's reserve negative values to implementation defined errors (like LLVM internal error, etc.) I have not added additional prefixes besides |
|
Let's have |
@chfast renamed. I'm wondering whether the last commit is the way to go ( Well this only matters if you anticipate multiple successful codes. |
Superseded by #83. |
This is not meant to be merged in the current form, rather merely to start a discussion.