evm
evm copied to clipboard
feat: support transient storage opcodes (EIP-1153)
This PR adds 2 new opcodes (TLOAD and TSTORE) for manipulating state that behaves almost identically to storage but is discarded after every transaction.
These new instructions were introduced by EIP-1153 and included in Cancun fork.
Running the tests located at ethtests/GeneralStateTests/Cancun/stEIP1153-transientStorage will require the changes present in https://github.com/rust-ethereum/evm/pull/280
@RomarQ I think it's important that the new opcodes should only be enabled when the Cancun fork is used and not for previous forks. We should add a flag that is set to true when the Cancun fork is chosen that enable or disable the new opcodes. Something similar to what was done for CREATE2 for example:
https://github.com/rust-ethereum/evm/blob/f7a23df6c478ca6a151af5f60e62944800529a61/src/standard/gasometer/mod.rs#L413-L415
@RomarQ I think it's important that the new opcodes should only be enabled when the Cancun fork is used and not for previous forks. We should add a flag that is set to true when the Cancun fork is chosen that enable or disable the new opcodes. Something similar to what was done for
CREATE2for example:https://github.com/rust-ethereum/evm/blob/f7a23df6c478ca6a151af5f60e62944800529a61/src/standard/gasometer/mod.rs#L413-L415
Done, thanks for the remark 👍
@RomarQ Please resolve the conflicts
@RomarQ Please resolve the conflicts
Done