@ethereumjs/vm v5.9.0
EIP-3651: Warm COINBASE (Shanghai CFI EIP)
Small EIP - see EIP-3651 considered for inclusion (CFI) in Shanghai to address an initially overpriced COINBASE
access, PR #1814.
EIP can be activated manually with:
const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London, eips: [3651] })
EIP-1153: Transient Storage Opcodes
Experimental implementation of EIP-1153, see PR #1768, thanks to Mark Tyneway from Optimism for the implementation! ❤️
The EIP adds opcodes for manipulating state that behaves identically to storage but is discarded after every transaction. This makes communication via storage (SLOAD
/SSTORE
) more efficient and would allow for significant gas cost reductions for various use cases.
Hardfork inclusion of the EIP was extensively discussed during ACD 135, April 1 2022.
EIP can be activated manually with:
const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London, eips: [1153] })
Custom Precompiles (L2 Support)
It is now possible to add, override or delete precompiles in the VM with a new customPrecompiles
option, see PR #1813. This allows for further customization of VM behavior in addition to the recently added customOpcodes
option, which can be useful for L2 solutions, EVM-based side chains, and other L1s.
An EVM initialization with a custom precompile looks roughly like this where you can provide the intended precompile address
and some precompile function
which needs to adhere to some specific format to be internally readable and executable:
const vm = await VM.create({
customPrecompiles: [
{
address: shaAddress,
function: customPrecompile,
},
],
})