darwinia-network / research

Research related document and topics
MIT License
3 stars 2 forks source link

How EVM+ works #24

Closed boundless-forest closed 8 months ago

boundless-forest commented 2 years ago

In contrast to moonbeam or frontier or DVM, Acala only utilized frontier pallet-evm, not pallet-ethereum. I think it's worth investigating how they store the ethereum block or transaction, and how they integrate with evm.

boundless-forest commented 2 years ago

Question 1: Where do they store the ethereum blocks and transactions?

The way they integrate EVM to their runtime is different from us or moonbeam. They only use forked frontier pallet-evm and not with pallet-ethereum. This means they do not rebuild an ethereum blockchain inside, thus, do not support web3 RPCs.

Question 2: How do they deploy smart contracts without web3 RPCs?

Due to the lack of support for web3 RPCs, they are unable to use the existing common-used tools in the ethereum ecosystem compatibly. They developed a EVM Playground App for smart contract developers. You have to fill out the contract abi and code manually in the app, then deploy and interact within this app. This way is very similar to the usage of ink! smart contract. There are some tutorials about how to get contract abi and code using remix, waffle, hardhat..

boundless-forest commented 2 years ago

Question 3: How to handle the relationship between the EVM account and the Substrate account?

Just like us, two kinds of accounts existed in their system. See this: https://wiki.acala.network/learn/basics/acala-account. However, the address mapping way they used is different from ours. They store the relationship in a separated pallet evm-account.

boundless-forest commented 2 years ago

Question 4: How do they transfer value between an evm account to a substrate account? (TBD)