-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
core/vm: Hide read only flag from Interpreter interface #17461
Conversation
core/vm/interpreter.go
Outdated
@@ -125,7 +121,7 @@ func (in *EVMInterpreter) enforceRestrictions(op OpCode, operation operation, st | |||
// It's important to note that any errors returned by the interpreter should be | |||
// considered a revert-and-consume-all-gas operation except for | |||
// errExecutionReverted which means revert-and-keep-gas-left. | |||
func (in *EVMInterpreter) Run(contract *Contract, input []byte) (ret []byte, err error) { | |||
func (in *EVMInterpreter) Run(contract *Contract, input []byte, static bool) (ret []byte, err error) { |
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 forgot to rename this to readOnly
.
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 like this change, but please fix the variable name.
69fc7af
to
9e839c9
Compare
Done. |
I can live with this, but it forces the global |
Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function. So in the EVMC PR for geth this flag is never used by the EVMC VM and is also not accurate, so querying it might give wrong results. I'm not sure this provided enough arguments for it to make you feel comfortable with the change. |
9e839c9
to
c449b5a
Compare
…) (#6) Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
* go modules added; preparing to write aura consensus * adding goerli flag * goerli flag added * adding configs * core/vm: Hide read only flag from Interpreter interface (ethereum#17461) (#6) Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function. * configuring genesis * removing duplicate imports * adding configs for aura api * configuring goerli cli flag * flag function fix * typo fix
* go modules added; preparing to write aura consensus * adding goerli flag * goerli flag added * adding configs * core/vm: Hide read only flag from Interpreter interface (ethereum#17461) (#6) Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function. * configuring genesis * removing duplicate imports * adding configs for aura api * configuring goerli cli flag * flag function fix * typo fix * goerli flag finalized * config mod
* go modules added; preparing to write aura consensus * adding goerli flag * goerli flag added * adding configs * core/vm: Hide read only flag from Interpreter interface (ethereum#17461) (#6) Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function. * configuring genesis * removing duplicate imports * adding configs for aura api * configuring goerli cli flag * flag function fix * modifying configs
Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
Not really a functional change, but makes Interface interface a bit more stateless and abstract.