-
Notifications
You must be signed in to change notification settings - Fork 312
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
rust: make ExecutionContext optional in EvmcVm.execute() #350
Conversation
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 feel like this would be cleaner if ExecutionContext would make its context member optional instead
504f0aa
to
6fe50b1
Compare
The problem with that is every single feature of |
Can this be merged? |
I have to checked what this PR is about. I postponed the C++ API changes for Precompiles. BTW, there will be no 6.4. The 7.0 is next. |
16abbdb
to
b2068c3
Compare
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 this is not correct.
Here the logic is: null host context implies null host interface.
But in reality we have 3 cases:
- interface not null, context not null (usual case),
- interface not null, context null (Host does not want to store anything in the context),
- interface null, context null (precompiles).
) | ||
}; | ||
container.execute(revision, code_ref, &execution_message, &mut execution_context) | ||
if context.is_null() { |
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.
Forgot to change this one line during rebasing, that's the reason it is broken @chfast.
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 looks good now, but is there an unit test what would detect the issue?
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 did run the vmtester on it with precompiles enabled but even the old one passed it.
) -> ExecutionResult { | ||
if _context.is_none() { | ||
return ExecutionResult::failure(); |
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.
Why this is a failure?
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.
Because the code needs tx_context
which is part of that?
Fixes #318.