Clarification needed urgently about compatibility of addresses between testnet and mainnet

Quoting some discussion from the flypool thread

From this quote, it seems that flypool miners, who are required to use a zcash address as user ID, can just keep plowing on as the network switches to mainnet. This implies that zcash addresses generated using RC2 and the beta parameters remain valid.

Now, there is a new warning on zcash.flypool.org that says exactly the contrary to what has been said in the flypool thread.

This makes me realize that there is a widespread confusion about whether addresses remain valid after go-live. In most other crypto projects, the key derivation algorithm based on ECDSA don’t use any weird parameters so addresses always remain valid regardless of the specific network, be it test net, mainnet etc. That’s the case for Bitcoin, Litecoin, Ethereum, Steem etc.

That was my assumption until I saw this warning on flypool today, less than 24h before launch! I was about to go live with RC2 beta addresses, and just realized maybe that wasn’t going to work. Zcash is a different animal, and in hindsight I can conceive that keys would have to be taylor made to work with the trusted setup. But I’m not even sure now if that is really the case.

@zooko: can we have an official clarification on that? This is a very important matter. Many people including pools and exchanges may have address verification logic that will stop working if the address scheme is tied to parameters. Many people may keep using RC2 / beta addresses assuming they are entirely unrelated to the specific network instance like it’s the case for more “classic” crypto projects.

1 Like

It is very strange yes. I am also looking around to clarify the status of the addresses…

I tried using this: GitHub - blackkeyboard/zgenerate: Offline BIP32 wallet generator for Zcash

For Mainnet:

./zgenerate -test=false -n 1
2016/10/27 17:20:41 Wallet generated!
2016/10/27 17:20:41 Passphrase: glance gay cream everywhere very raise daddy fought beaten happy pen orange
2016/10/27 17:20:41 Address				Private key
2016/10/27 17:20:41 t1S9DFHoMMum5Eq5bn8wt789yBiGAEBfwPM	cUYg5MSmhYcc6DVHAGTd1LvqY3HPVMBiEsz3tpEz3K5ACuUrsoGz

For Testnet:

./zgenerate -test=true -n 1
2016/10/27 17:21:34 Wallet generated!
2016/10/27 17:21:34 Passphrase: mountain hit milk answer chance dull drunk minute myself quiet began hide
2016/10/27 17:21:34 Address				Private key
2016/10/27 17:21:34 tmDufXWA3wX9NXaXNS3naPLZ684sY5WXKUP	cW35DGmXLviepjvCuv4D4YGVdxDgYHjyt6hhSgKmod4FsHrs1CtN

So the difference between testnet and mainnet addresses is: tm…. vs t1…

I must say, everything aroud this coin is so confusing and silly.

Why do addresses for a currency named Zcash start with a lower case t ???

I know there are additional super secret addresses starting with Z, but still, it could be lower case z for normal addresses. Or better yet, the developers could explain such a basic thing in a readme somewhere.

Can anyone verify the correctness of the git repo linked above, are these addresses ok for mainnet? (addresses starting with t1)

I just tried it with zcash-cli, this is what I get:

Import the private key from above:

./zcash-cli importprivkey cUYg5MSmhYcc6DVHAGTd1LvqY3HPVMBiEsz3tpEz3K5ACuUrsoGz
error: {"code":-5,"message":"Invalid private key encoding"}

Same error for testnet.

So I guess this zgenerator is not compatible or zcashd is still not updated for mainnet. Or something else?

This is the format of addresses directly from zcashd:

./zcash-cli getnewaddress
t1cm9qhrF2FHp8CKG9TQ9LUZTHJgRc2ctrM

./zcash-cli dumpprivkey t1cm9qhrF2FHp8CKG9TQ9LUZTHJgRc2ctrM
KyPLczAkF3oUqpPoUvk65gxNc8RHEoEjF9vFnwgyDQ6av961p2Ma

…so also starting with t1

yes it is weird there has been a lot of silence on this issue…hopefully someone will shed some light soon.

however not all transparent addresses are the same…some start with t1 and others tm
one may be for the test net and another main net

See section 5.6 Encodings of Addresses and Keys

1 Like