-
Notifications
You must be signed in to change notification settings - Fork 302
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
Use code_address member from evmc_message (EVMC 10.0.0-alpha.1) #360
Conversation
Codecov Report
@@ Coverage Diff @@
## master #360 +/- ##
==========================================
- Coverage 99.76% 99.76% -0.01%
==========================================
Files 30 30
Lines 4229 4217 -12
==========================================
- Hits 4219 4207 -12
Misses 10 10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
6437ef3
to
300901b
Compare
17b6af6
to
8e2b919
Compare
lib/evmone/instructions_calls.cpp
Outdated
@@ -36,7 +36,8 @@ evmc_status_code call(ExecutionState& state) noexcept | |||
msg.kind = Kind; | |||
msg.flags = Static ? uint32_t{EVMC_STATIC} : state.msg->flags; | |||
msg.depth = state.msg->depth + 1; | |||
msg.destination = dst; | |||
msg.destination = (Kind == EVMC_CALL) ? dst : state.msg->destination; |
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.
Wait. Shouldn't CALLCODE
also use dst
? That was one of the broken part about CALLCODE
?
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.
Message recipient in case of CALLCODE
is the same as in case of DELEGATECALL
. They differ in message sender.
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.
Ok, this is the address where VALUE goes and where storage is modified... This is still confusing after all these years.
lib/evmone/instructions_calls.cpp
Outdated
@@ -36,7 +36,8 @@ evmc_status_code call(ExecutionState& state) noexcept | |||
msg.kind = Kind; | |||
msg.flags = Static ? uint32_t{EVMC_STATIC} : state.msg->flags; | |||
msg.depth = state.msg->depth + 1; | |||
msg.destination = dst; | |||
msg.destination = (Kind == EVMC_CALL) ? dst : state.msg->destination; |
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.
Ok, this is the address where VALUE goes and where storage is modified... This is still confusing after all these years.
2aa4a87
to
873624d
Compare
@chfast Looks good to me. |
See erigontech/silkworm#286 for the original discussion.
Consensus tests pass with erigontech/silkworm#288.