Closed gumb0 closed 9 months ago
https://github.com/ethereum/evmone/pull/768, you should be able to use a validate_eof
option on the --vm
argument
Oh thanks, I forgot about this feature, I think it is good enough.
Perhaps I would prefer it to be on by default and option to disable it, but fine for now, I'll close the issue.
Perhaps I would prefer it to be on by default and option to disable it, but fine for now, I'll close the issue.
This makes it a bit hard, because the "production" default is disabled, so you'd need to enable it by default on evmc
level, and that in turn requires some magic in evmc
to figure out whether or not an EVM supports such option.
A clean option would be to expand evmc
API by validate_eof
, but back then we decided it's not worth it.
Currently invalid code can be executed, for example this one contains
CREATE
(executed witheof-create4
branch of evmone):Perhaps it makes sense to add EOF validation before execution.