-
Notifications
You must be signed in to change notification settings - Fork 314
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
Support CREATE2 opcode in Constantinople #45
Conversation
Still need to add it to instructions lib. |
include/evmc/evmc.h
Outdated
@@ -70,7 +70,8 @@ enum evmc_call_kind | |||
EVMC_CALL = 0, /**< Request CALL. */ | |||
EVMC_DELEGATECALL = 1, /**< Request DELEGATECALL. The value param ignored. */ | |||
EVMC_CALLCODE = 2, /**< Request CALLCODE. */ | |||
EVMC_CREATE = 3 /**< Request CREATE. Semantic of some params changes. */ | |||
EVMC_CREATE = 3, /**< Request CREATE. Semantic of some params changes. */ |
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.
You can remove the "Semantic of some params changes" part in both cases.
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.
I think these should state which evmc_revision
they are valid in (frontier, homestead, byzantium, constantinople).
include/evmc/evmc.h
Outdated
* | ||
* Ignored unless kind == EVMC_CREATE2. | ||
*/ | ||
struct evmc_uint256be salt; |
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.
How about we name it create_salt
?
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.
create2_salt
for explicitlness?
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.
Otherwise creation_salt
?
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.
create2_salt
👍
Similarly to create_address
.
include/evmc/evmc.h
Outdated
/** | ||
* The optional value used in new contract address construction. | ||
* | ||
* Ignored unless kind == EVMC_CREATE2. |
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.
unless kind is EVMC_CREATE2
.
@@ -12,7 +12,6 @@ static_assert(sizeof(evmc_uint256be) == 32, "evmc_uint256be is too big"); | |||
static_assert(sizeof(evmc_address) == 20, "evmc_address is too big"); | |||
static_assert(sizeof(evmc_result) <= 64, "evmc_result does not fit cache line"); | |||
static_assert(sizeof(evmc_instance) <= 64, "evmc_instance does not fit cache line"); | |||
static_assert(sizeof(evmc_message) <= 18 * 8, "evmc_message not optimally packed"); |
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.
Should this be kept with an updated size?
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.
It does not anything useful. I was just checking obvious struct fields alignment.
Renamed to |
This also needs an ABI version bump. |
Bumped ABI version to 2 |
No description provided.