paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

subkey inspect error #9361

Open kraymond37 opened 2 years ago

kraymond37 commented 2 years ago

I try to inspect bip44 path, but failed.

➜  subkey inspect "quick random crucial empty hurry diagram story grid afford eternal few finish idle rhythm romance explain snack ripple work soon execute glare know embrace//44//354//0/0/0" -n polkadot --scheme Ecdsa
Invalid phrase/URI given

It seems polkadot seed is not the same as bitcoin. Is there detail explaination about address generating?

bkchr commented 2 years ago

AFAIK we use bip39.

nuke-web3 commented 2 years ago

I can confirm this is from the use of the --scheme Ecdsa , without the flag a key is generated as expected. Unless I am missing why the derivation should not be available in using ECDSA.

Our reference for BIP39: https://github.com/paritytech/substrate-bip39

This is a crate for deriving secret keys for Ristretto compressed Ed25519 (should be compatible with Ed25519 at this time) from BIP39 phrases. ... Since we are breaking compatibility with both BIP32 and BIP44 anyway (which we are free to do as we are no longer using the Secp256k1 curve), there is also no reason why we should adhere to BIP39 seed generation from the mnemonic.

bkchr commented 2 years ago

@NukeManDan why is that a bug?

nuke-web3 commented 2 years ago

Unless I am missing why the derivation should not be available in using ECDSA.

I guess whatever tag is correct, please update as you see fit - this was my best guess. 😅