Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

EVM Support Solution #247

Closed
5 tasks
hackfisher opened this issue Aug 19, 2020 · 6 comments
Closed
5 tasks

EVM Support Solution #247

hackfisher opened this issue Aug 19, 2020 · 6 comments
Assignees

Comments

@hackfisher
Copy link
Contributor

hackfisher commented Aug 19, 2020

Latest discussion and solution:

  • Replacing Account20(EVM Contract Address) to AccountID32 using hash_concat instead of directly hashing.
  • For Account32(subkey) to AccountID20 conversion, using ```cut````
  • Using eddsa for evm call instead of ecdsa, so we can sign evm related txs using polkadot{.js} exention or other polkadot.js private key provider
  • EVM and Substrate toolchains support: For web3.js, metamask, web3 rpc, remix(solidity ide) etc, we might need to to some forking to support eddsa sign.
  • User only need to care about AccountID32 address, developers might need to know AccountID20(evm address)

Question:

Can ecdsa and eddsa share same key pair(for easier wallet support)?

Refer:

Frontier: Using two separate crypto algorithm (eddsa for substrate runtime, ecdsa for evm inside?)
https://github.com/paritytech/frontier

Moonbeam:

Question: Will use ecdsa instead of eddsa(sr25519)? and H160? Could ecdsa have compatibility issues with Polkadot Parachain?

Substrate Seminar

https://www.crowdcast.io/e/substrate-seminar/9

@hackfisher
Copy link
Contributor Author

@hackfisher
Copy link
Contributor Author

Related: darwinia-network/darwinia#496

@wuminzhe
Copy link
Contributor

wuminzhe commented Aug 20, 2020

the code of hash_concat maybe like this:

hash_concat(evm_address) -> subkey {
    return evm_address + blake2256(evm_address)[0..12]
}

@freehere107
Copy link

@boundless-forest
Copy link
Member

#334

@hackfisher
Copy link
Contributor Author

This is deprecated solution, for latest update please see #334

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants