darwinia-network / crab-docs

Crab Network
https://docs.crab.network/
10 stars 146 forks source link

Add docs for the H160 address format of block producer in Ethereum header. #124

Closed hackfisher closed 2 years ago

hackfisher commented 2 years ago

https://github.com/darwinia-network/darwinia-common/blob/main/frame/evm/src/lib.rs#L395-L399

https://github.com/darwinia-network/darwinia-common/blob/ec9d3845751b253d1dd6bbb31cf658099b33e64f/node/runtime/pangolin/src/pallets/evm.rs#L38

hackfisher commented 2 years ago

For solutions about how to get original AccountID32 for the H160, there is no way/requirement for now (storing the map, storing this map introduce extra design and unnecessary maintenance, even if we are going to support that, we may only support block.coinbase or recent blocks).

For cases, some smart contract want to transfer the block producer, he can store the assets in contract and ask the the AccountId32 to claim them using sr25519 signatures, smart contract should have ways to verify them.