ringecosystem / collaboration

The hub for discussions on RingDAO collaboration.
MIT License
6 stars 36 forks source link

Add RFP: Solution/Tool for migrate Frontier EVM storage to revm/Geth data db #53

Closed hackfisher closed 1 month ago

hackfisher commented 7 months ago

Darwinia EVM+ is currently adopting Frontier, the substrate version of EVM implementation, to support EVM, the storage complies with Substrate storage as following:

https://github.com/polkadot-evm/frontier/blob/c6a962fad3fcdfab9b0749ce1747badfa2a4493c/frame/evm/src/lib.rs#L567-L579

    #[pallet::storage]
    pub type AccountCodes<T: Config> = StorageMap<_, Blake2_128Concat, H160, Vec<u8>, ValueQuery>;

    #[pallet::storage]
    pub type AccountCodesMetadata<T: Config> =
        StorageMap<_, Blake2_128Concat, H160, CodeMetadata, OptionQuery>;

    #[pallet::storage]
    pub type AccountStorages<T: Config> =
        StorageDoubleMap<_, Blake2_128Concat, H160, Blake2_128Concat, H256, H256, ValueQuery>;

    #[pallet::storage]
    pub type Suicided<T: Config> = StorageMap<_, Blake2_128Concat, H160, (), OptionQuery>;

But current the ecosystem is lacking solution and tools for process or migrate from the Frontier/Substrate db to generate the genesis data for producing blocks as L2 Rollup. It would be great if there would be such solutions or tools for doing it.

Ref:

https://medium.com/darwinianetwork/unlocking-cross-chain-potential-darwinia-communitys-pioneering-build-op-stack-layer2-with-bf1d58a9e272

hackfisher commented 5 months ago

Keep chain state and chain history, chain id, run from new client continuing the block height.

boundless-forest commented 1 month ago

Other requirements:

hackfisher commented 1 month ago

@boundless-forest is researching on this, remove it from RFP list.