Skip to content

Transient storage for contracts #260

Closed
@clearloop

Description

@clearloop

Describe the feature

Support transient storage introduced in Cancun, TSTORE (0x5D) and TLOAD (0x5D)

Solution

  1. need to introduce CANCUN opcodes in opcodes
    1.1. create a new file zink/evm/opcodes/src/cancun.rs (cp from shanghai.rs )
    1.2. add 0x5C and 0x5D to the mapping
  2. introduce transient storage in the storage macro, could be #[zink::transient_storage(...)] comparing with the previous #[zink::storage(..)], for the details of the instructions of transient storage, we just need to replace the SSTORE to TSTORE and SLOAD to TLOAD, for example, the value storage
    2.1. find a way to optimize the logic between zink::storage and zink::transient_storage since their logic are the same
  3. Provide tests for the transient storage

Metadata

Metadata

Assignees

Labels

bounty-$100Payable medium onboarding issues

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions