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
Transparent private keys fail to import into zcash (encoding error) #1414
Comments
It looks like the Bitcoin node is running on Mainnet, whereas Zcash is running on Testnet. Try putting Bitcoin into Testnet mode and repeating the above. Note that third party tools will probably need to be updated as transparent addresses on Zcash mainnet will have a different prefix from that used by Bitcoin mainnet. |
@bitcartel Thanks. It seems to work when both daemons are running in the same mode. Could you tell me which prefix is enforced on zcash transparent addresses on mainnet? ampy@euih42-ee:~/zcash/src$ bitcoin-cli getaddressesbyaccount ""
[
"myrEh5pmhK3wanYRJhwX7TALpy22Qg97zd"
]
ampy@euih42-ee:~/zcash/src$ bitcoin-cli dumpprivkey myrEh5pmhK3wanYRJhwX7TALpy22Qg97zd
cTQyR1JqwdmFnUTHvP5ddujtVHZjaqMUE5mHg8njj51HXXU6Uhiw
ampy@euih42-ee:~/zcash/src$ ./zcash-cli importprivkey cTQyR1JqwdmFnUTHvP5ddujtVHZjaqMUE5mHg8njj51HXXU6Uhiw
ampy@euih42-ee:~/zcash/src$ |
I don't think we've decided on that prefix yet. That's why the spec hasn't been updated. |
Not to be pushing or anything, but do you have a date for this? 👍 |
Probably beta 2. (That is, if we make a change it'll essentially have to be in beta 2.) |
See #812. |
And no problem with pushing :-) |
#812 was merged for beta 2, and the spec updated to include the new prefixes. |
According to the specs (section 5.6.2 and 5.6.1) it should be theoretically possible to import a private key from the bitcoin wallet to the zcash wallet, since the spec states that the private and public keys of Zcash have exactly the same encoding as Bitcoin. This spec would also mean that users should be able to use existing 3rd party utilities to generate transparent wallets for Zcash. However it turns out that this is not the case: we get an "invalid private key encoding" error.
Please correct me if I am wrong here, but according to the specs I think this should be possible:
Or the other way around
Don't worry, these private keys will never be used for any wallet! I put them here to proof my point.
This bug is very unfortunate, because it means that 3rd party utils cannot be used to generate transparent wallets for zcash.
The text was updated successfully, but these errors were encountered: