Simple Summary
People need to produce code for different versions of the EVM
Abstract
Provide an interface to switch the VM rulesets used to compile, validate, and produce bytecode for a given source program.
Motivation
It is important for developers to be able to produce bytecode for different versions of the EVM. This may include for future hardfork implementations (such as constantinople), or for chains that still use past rules (ETC or permissioned networks like Quorum). It might also be eventually useful to specify more granular or custom rulesets via py-evm, but that is out of scope for now.
Specification
Solidity has --evm-version VM_NAME flag:
$ solc --help
...
--evm-version version
Select desired EVM version. Either homestead,
tangerineWhistle, spuriousDragon, byzantium (default) or
constantinople.
...
I suggest we use this.
The technical details should be as such:
- The source program is compiled and/or statically analyzed for features at the AST or IR (LLL) layer
- Features that are not possible in the chosen ruleset raise an exception
- Features that have alternative implementations in the chosen ruleset generate that alternative, and note the modification (vs. the default)
Backwards Compatibility
Fully backwards compatible
Dependencies
No dependancies on other VIPs
Copyright
Copyright and related rights waived via CC0
Simple Summary
People need to produce code for different versions of the EVM
Abstract
Provide an interface to switch the VM rulesets used to compile, validate, and produce bytecode for a given source program.
Motivation
It is important for developers to be able to produce bytecode for different versions of the EVM. This may include for future hardfork implementations (such as constantinople), or for chains that still use past rules (ETC or permissioned networks like Quorum). It might also be eventually useful to specify more granular or custom rulesets via
py-evm, but that is out of scope for now.Specification
Solidity has
--evm-version VM_NAMEflag:$ solc --help ... --evm-version version Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon, byzantium (default) or constantinople. ...I suggest we use this.
The technical details should be as such:
Backwards Compatibility
Fully backwards compatible
Dependencies
No dependancies on other VIPs
Copyright
Copyright and related rights waived via CC0