guildxyz / guild-network

MIT License
9 stars 1 forks source link

I126 secp ext #138

Closed PopcornPaws closed 1 year ago

PopcornPaws commented 1 year ago

Description

Aims to close #126 and #134

Bit rough around the edges, but id gets the job done. What job? Well, we wanted end users to be able to interact with the network using just their metamask wallet. For this to work, we cloned the Multisignature implementation from sp-runtime and modified the ECDSA part to verify EVM-specific ECDSA instead of a generic one that used blake2 for hashing the message.

$$H{blake2{256}}(p||a)$$

PS. polkadot.js does the same

PopcornPaws commented 1 year ago

I just realized that hashing the evm address is not a good idea because it's a one-way operation. However, the oracle needs to query the evm addresses for evm token checks which it cannot do if we store the addresses as hashes. Therefore, I think we should just pad the addresses with zeros to get 32 byte account ids. Then, the oracle will be able to query addresses from the chain and just strip the padding zeros to recover the 20 byte evm addresses.

OnyxSkyscape commented 1 year ago

Runtime upgrade v104 tested and successfully rolled out into prod today 2:10 pm CEST at commit 5e03a8c, ready to merge.