If you want to create an Ethereum sidechain which is two-way pegged to main (public or private) Ethereum, how can you implement sidechain?
For example,
- How can you lock ether?
- How can you verify main net ether?
If you want to create an Ethereum sidechain which is two-way pegged to main (public or private) Ethereum, how can you implement sidechain?
For example,
Locking and releasing ether is very simple. The biggest problem is that you need to verify the ethash proof of work if you want a real trustless connection. It is probably not feasible to perform this verification on the blockchain alone, but there are plans on how to do it interactively.
For interactive verification, you either have to implement ethash in Solidity/EVM in a step-wise manner where only one step will be executed in the worst case, or you take the official C implementation, compile it to a simple architecture (lanai seems to be the most promising currently) and implement this architecture in Solidity/EVM. In both cases, you have to augment the native implementation with Merkle-hashing the memory as explained in the article above.