You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
Mainnet addresses generated instead of Testnet when communicating with lightwalletd where lightwalletd is communicating with zcashd where zcashd is configured to operate and communicate on testnet.
Expected Behavior
Creattion of zecwallet-light-wallet.dat and TESTNET addresses when zecwallet-cli is run for the first time.
Steps to Reproduce
zcashd part:
1. remove ~./zcash/testnet3 (start from scratch) 2. restart zcashd 3. confirm that ~./zcash/testnet3 is recreated including the files one would expect to see e.g. see wallet.dat. *.log, blocks, etc. 4. wait for synchronization to finish 5. Confirm rpc to zcashd and see the addresses created by zcashd
This looks normal as tm, ztest, and utest1 accounts are returned and in conjunction with logs at ~./zcash/testnet3/debug.log confirms zcashd is properly configured and operating on testnet.
Note: just letting lightwalletd use the default /var/lib/lightwalletd directory as lightwalletd was not started using the --data-dir switch.
lightwalletd launches without error, no errors or warnings are reported in the logs, and as expected there are many getblock and getbestblockhash entries visible in the zcashd testnet logs; tail -f ~./zcash/testnet3/debug.log.
The appended getblock and getbestblockhash entries in ~./zcash/testnet/debug.log seems to confirm that lightwalletd is communicating with testnet via zcashd.
At this step is where the errant behavior is first visible as this command returns u1/zs/t1 addresses and does NOT return tm/ztest/utest addresses as expected.
Note: New zecwallet-light-wallet.dat file was created at ~./zcash/testnet3
Creating a new wallet
{
"ua_addresses": [
"u1..." <- **This should be utest1... ???**
],
"z_addresses": [
"zs1..." <- **This should be ztest1... ??**
],
"t_addresses": [
"t1..." <- **This should be tm... ??**
]
}
7. Run zecwallet-cli in interactive mode to confirm communication on testnet
The prompt indicates “test” which is a UI indicator that zecwallet-cli is confirmed to be communicating on testnet by communicating with lightwalletd which is also confirmed to be communicating on testnet as lightwalletd is communicating with zcashd which is confirmed to be communicating on testnet as above.
There is an “Invalid address” error in Step 7 because the newly created zecwallet-light-wallet.dat is populated with mainnet addresses at Step 6 above. In Step 6 in this procedure testnet address should have been generated.
Environment
Debian Bullseye
Linux 5.10.0-21-amd64
Zcashd 5.3.2
5.4.0 had been released as of this report but was not yet in the apt repository
Current Behavior
Mainnet addresses generated instead of Testnet when communicating with lightwalletd where lightwalletd is communicating with zcashd where zcashd is configured to operate and communicate on testnet.
Expected Behavior
Creattion of zecwallet-light-wallet.dat and TESTNET addresses when zecwallet-cli is run for the first time.
Steps to Reproduce
zcashd part:
1. remove ~./zcash/testnet3 (start from scratch)
2. restart zcashd
3. confirm that ~./zcash/testnet3 is recreated including the files one would expect to see e.g. see wallet.dat. *.log, blocks, etc.
4. wait for synchronization to finish
5. Confirm rpc to zcashd and see the addresses created by zcashd
the last curl rest call (id:curltest5) returns:
This looks normal as tm, ztest, and utest1 accounts are returned and in conjunction with logs at ~./zcash/testnet3/debug.log confirms zcashd is properly configured and operating on testnet.
lightwalletd part:
6. Launch lightwalletd
./lightwalletd --no-tls-very-insecure --zcash-conf-path ~/.zcash/zcash.conf --log-file /dev/stdout --rpcuser XXX --rpcpassword YYY
Note: just letting lightwalletd use the default /var/lib/lightwalletd directory as lightwalletd was not started using the --data-dir switch.
lightwalletd launches without error, no errors or warnings are reported in the logs, and as expected there are many getblock and getbestblockhash entries visible in the zcashd testnet logs; tail -f ~./zcash/testnet3/debug.log.
The appended getblock and getbestblockhash entries in ~./zcash/testnet/debug.log seems to confirm that lightwalletd is communicating with testnet via zcashd.
zecwallet-cli part:
6. Initialize zecwallet-light-wallet.dat
./zecwallet-cli --server 127.0.0.1:9067 addresses;
At this step is where the errant behavior is first visible as this command returns u1/zs/t1 addresses and does NOT return tm/ztest/utest addresses as expected.
Note: New zecwallet-light-wallet.dat file was created at ~./zcash/testnet3
7. Run zecwallet-cli in interactive mode to confirm communication on testnet
The prompt indicates “test” which is a UI indicator that zecwallet-cli is confirmed to be communicating on testnet by communicating with lightwalletd which is also confirmed to be communicating on testnet as lightwalletd is communicating with zcashd which is confirmed to be communicating on testnet as above.
There is an “Invalid address” error in Step 7 because the newly created zecwallet-light-wallet.dat is populated with mainnet addresses at Step 6 above. In Step 6 in this procedure testnet address should have been generated.
Environment
Comments
Had some help working this issue from Autotuanfish in the Zcash Forums and it was concluded that this is errant behavior.
The text was updated successfully, but these errors were encountered: