dusk-network / rusk

The reference Dusk platform implementation and tools
Mozilla Public License 2.0
161 stars 60 forks source link

Seedphrase not accepted ("not valid") during node setup when using custom seedphrase #2327

Closed fe71ks closed 1 month ago

fe71ks commented 1 month ago

Summary

Certain(?) valid seedphrases are not accepted ("not valid") during node setup.

Detailed Description (optional)

During ITN, I generated my own seed phrase rather than using the address/phrase generated by the web wallet. I can imagine that more users will (want to) do this as a precaution.

The phrase was generated using only BIP39(?) words, all lower case. The phrase was accepted by the web wallet without an issue, but it was not accepted during node setup with a node installed through ITN-installer: an error was displayed ("seed not valid" or something similar) when confirming the input of the phrase in the prompt. I retyped it many times.

Possible solution

I don't know the mechanism of the seed phrase validation but it either needs some finetuning or documentation is needed that offers guidance on how to use a custom seed phrase and what the requirements are to pass the validation.

HDauven commented 1 month ago

@fe71ks can you expand upon this please? Because it's not clear to me what happened.

Did you try the recovery on the CLI wallet with the same mnemonic? Because both the web wallet and CLI wallet use BIP39 libraries and should accept the same mnemonic, unless there's a bug in the underlying BIP39 library.

Are you sure the seed phrase you generated adheres to BIP39?

fe71ks commented 1 month ago

@HDauven apologies for the delay! Double checked the phrase against BIP39 requirements and it seems I did not use a valid menomonic. Will need to double check what exactly went wrong but this would mean the web wallet and CLI use different kinds of validations for the mnemonic. Please close this issue for now, I will open a new one if required.