Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot recover account from Gaia testnet with Seed in democoin #777

Closed
kidinamoto01 opened this issue Apr 3, 2018 · 10 comments
Closed

Cannot recover account from Gaia testnet with Seed in democoin #777

kidinamoto01 opened this issue Apr 3, 2018 · 10 comments

Comments

@kidinamoto01
Copy link
Contributor

Hello,

I was testing democoin and found out the seed phrase of previous Gaia testnet account ,
for example:struggle pencil party source enjoy episode small empower goat title design scheme doctor fine law ability
cannot be recovered.

 ./democli keys add test --recover
Enter a passphrase for your key:
Repeat the passphrase:
Enter your recovery seed phrase:
struggle pencil party source enjoy episode small empower goat title design scheme doctor fine law ability
panic: Unexpected type byte 2F

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/go-crypto/keys.byteToCryptoAlgo(0xc4204b7e2f, 0xc420956100, 0x10)
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/go-crypto/keys/keys.go:30 +0x117
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/go-crypto/keys.dbKeybase.Recover(0x1dedd00, 0xc42008c0d0, 0x1de3240, 0xc4204b7ef0, 0x7ffeefbff8a3, 0x4, 0xc42001a140, 0xa, 0xc4203da230, 0x69, ...)
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/go-crypto/keys/keybase.go:73 +0x123
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/go-crypto/keys.(*dbKeybase).Recover(0xc4201873e0, 0x7ffeefbff8a3, 0x4, 0xc42001a140, 0xa, 0xc4203da230, 0x69, 0x0, 0x0, 0x0, ...)
	<autogenerated>:1 +0x10b

Any work around?

@kidinamoto01 kidinamoto01 changed the title Cannot recover account from Gaia testnet with Seed Cannot recover account from Gaia testnet with Seed in democoin Apr 3, 2018
@ebuchman
Copy link
Member

ebuchman commented Apr 3, 2018

Where'd you get that seed phrase from ?

@kidinamoto01
Copy link
Contributor Author

@ebuchman the seed phrased is generated with gaia client keys new $NAME

@faboweb
Copy link
Contributor

faboweb commented Apr 3, 2018

I also can't recover my gaia-2 account in basecli. Also: This probably shouldn't panic but return an error, right?

@ebuchman
Copy link
Member

ebuchman commented Apr 3, 2018

Should definetely return an error rather than panic.

That said there were some seriously breaking changes to go-crypto since Gaia so I'm not sure it will be worth the effort to preserve these

@kidinamoto01
Copy link
Contributor Author

@ebuchman Cannot find reasons for this issue in the go-crypto changelog. This could make account management more difficult.

@ebuchman
Copy link
Member

ebuchman commented Apr 6, 2018

Ok, will see if I can get this fixed over the weekend

@kidinamoto01
Copy link
Contributor Author

kidinamoto01 commented Apr 8, 2018

@ebuchman it turns out we change the type byte position for no reason

the structure change from

[secret] = [secret] + [type] 

to

[secret] = [type] + [secret] 

https://github.com/tendermint/go-crypto/blob/c3e19f3ea26f5c3357e0bcbb799b0761ef923755/keys/keybase.go#L50

relevant issue is raised here.

@faboweb
Copy link
Contributor

faboweb commented Apr 11, 2018

This will not change back. Is it OK to create new accounts?

@ebuchman
Copy link
Member

ebuchman commented Apr 22, 2018

I can actually push an easy fix for this so it can recover the key but I'm not sure it will help because the address generation has changed as well, so you won't end up with the same address (tendermint/go-crypto#77).

So given the addresses change anyways I'm not sure it's useful to preserve the old seeds ...

@kidinamoto01
Copy link
Contributor Author

@ebuchman
OK, I guess it doesn't make any sense. Close it.

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

No branches or pull requests

3 participants