Coins lost after -rescan

Hi, guys.

My coins are lost after I restarted zcash daemon with -rescan (did it because
I was getting bad-txns-joinsplit-requirements-not-met error).

After -rescan, that error disappeared and I’ve successfully transfered 0.9 ZEC from my t-addr to
my z-addr. However, after I did this, the bigger part of z-addr coins are lost.

This is the log of my interactions with zcash client (Ubuntu):

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf getbalance
1.01648388
david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_gettotalbalance
{
  "transparent": "1.01648388",
  "private": "21.6898",
  "total": "22.70628388"
}
david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_listaddresses
[
  "zs1n..."
]
david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf listaddressgroupings
[
  [
    [
      "t1Q...",
      0.00000000,
      ""
    ],
    [
      "t1W...",
      1.01648388
    ]
  ]
]


david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_sendmany "zs1n..." "[{\"amount\": 0.9, \"address\": \"t1Q...\"}]"
opid-88a2f681-673d-409c-bd21-9f875e353533

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_getoperationresult
[
  {
    "id": "opid-88a2f681-673d-409c-bd21-9f875e353533",
    "status": "failed",
    "creation_time": 1558094711,
    "error": {
      "code": -26,
      "message": "tx-expiring-soon: expiryheight is 534110 but should be at least 534115 to avoid transaction expiring soon"
    },
    "method": "z_sendmany",
    "params": {
      "fromaddress": "zs1n...",
      "amounts": [
        {
          "amount": 0.9,
          "address": "t1Q..."
        }
      ],
      "minconf": 1,
      "fee": 0.0001
    }
  }
]

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_sendmany "zs1n..." "[{\"amount\": 0.9, \"address\": \"t1Q...\"}]"
opid-2d619634-8ed3-4917-a990-1995769657f5

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_getoperationresult
[
  {
    "id": "opid-2d619634-8ed3-4917-a990-1995769657f5",
    "status": "failed",
    "creation_time": 1558095034,
    "error": {
      "code": -26,
      "message": "18: bad-txns-joinsplit-requirements-not-met"
    },
    "method": "z_sendmany",
    "params": {
      "fromaddress": "zs1n...",
      "amounts": [
        {
          "amount": 0.9,
          "address": "t1Q..."
        }
      ],
      "minconf": 1,
      "fee": 0.0001
    }
  }
]

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_sendmany "zs1n..." "[{\"amount\": 0.9, \"address\": \"t1d... \"}]"
opid-36217a38-62c5-47bc-87b3-7afefdd087d7

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_getoperationresult
[
  {
    "id": "opid-36217a38-62c5-47bc-87b3-7afefdd087d7",
    "status": "failed",
    "creation_time": 1558095240,
    "error": {
      "code": -26,
      "message": "18: bad-txns-joinsplit-requirements-not-met"
    },
    "method": "z_sendmany",
    "params": {
      "fromaddress": "zs1n...",
      "amounts": [
        {
          "amount": 0.9,
          "address": "t1d... "
        }
      ],
      "minconf": 1,
      "fee": 0.0001
    }
  }
]



------------------------------------------------------------------------------------------
(restarting daemon with -rescan)
------------------------------------------------------------------------------------------


david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_sendmany "zs1n..." "[{\"amount\": 0.9, \"address\": \"t1d... \"}]"
opid-bbb76108-e6d3-4fa4-a7d7-14797a464726

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_getoperationresult
[
  {
    "id": "opid-bbb76108-e6d3-4fa4-a7d7-14797a464726",
    "status": "success",
    "creation_time": 1558097086,
    "result": {
      "txid": "082813ff5dbb8ad4a003c59b2b2758f82e6da6b8f0dbae810cb3dade9b6e7ad2"
    },
    "execution_secs": 12.524275122,
    "method": "z_sendmany",
    "params": {
      "fromaddress": "zs1n...",
      "amounts": [
        {
          "amount": 0.9,
          "address": "t1d... "
        }
      ],
      "minconf": 1,
      "fee": 0.0001
    }
  }
]
david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_gettotalbalance
{
  "transparent": "1.01648388",
  "private": "0.0099",
  "total": "1.02638388"
}



------------------------------------------------------------------------------------------
(I hour later, it's still 4.2597 private coins, where is the rest?)
------------------------------------------------------------------------------------------



david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_gettotalbalance
{
  "transparent": "1.01648388",
  "private": "4.2597",
  "total": "5.27618388"
}

david@ubuntu:~$ zcash-cli -conf=/mnt/hgfs/zcash-data-vm/zcash.conf z_gettotalbalance
{
  "transparent": "1.01648388",
  "private": "4.2597",
  "total": "5.27618388"
}

Edit: redacted addresses

When you use the -rescan it starts from block #1 and works it’s way to the current block height. You will need to let it completely catch up before it will show your funds.

Remember, depending on when you send/received funds the transactions will be recorded at different block heights. So if your node hasn’t finished the rescan completely then it will not show your whole balance.

4 Likes

Hmm… Where is the status of ‘rescanning’ is displayed? I thought it is already done as I see this:

Block height | 534229
Connections | 8
Network solution rate | 3720205218 Sol/s

Is it still rescanning ?

I did -rescan one more time, it took like a minute. Now it’s done and it’s still 4.2597 private coins, where is the restof 21.6898. I just can’t get it.

Current block height is 534,234, so it does sound like you have completed the sync

1 Like

I’ve notice there is a space character at the end of destination address. Is it ok?

"address": "t1... "

Edit: redacted address

The metrics screen should say “Rescanning…” if it’s in the process of rescanning still.

Your debug.log (in the data directory) should show you the exact height it’s at as well. I would suggest you check here.

Guys, please, help! 1k$ lost! Tried -rescan and restoring the entire data directory from two different backups. After -rescan it sees only 4 ZEC, it should be 20 !

Did you try the commands getprivkey and than importprivkey into the new wallet?

With a clean installation and your private keys there shouldn’t be a problem in my opinion, enough you have the private keys of course, which should be a MUST!

The User Support team will look at this on Monday. In the meantime, what version of Zcash are you running?

There are two more options to try:

  1. do a -reindex which takes a lot longer but might work where a -rescan doesn’t
  2. try exporting the key from this wallet into a separate wallet

Let us know how these options turn out.

1 Like

Yes, guys. I exported the keys for z-addr and wallets. Re-downloading entire blockchain. Will tell about the result.

3 Likes

Please delete my personal information (t/z -addresses)
I’m still downloading a blockchain.
Have some clues. I was running zcash on 2GB RAM. Maybe there is a bug that destroys money in not-enough-memory cases when sending transactions.

The amount of ram required to generate a shielded transaction is 2 GB as stated on the main site whereas on readthedocs the amount required to ensure zcashd operates"gracefully" is 5 GB, this should probably be clarified : )@paige

1 Like

I redacted your addresses for you (for the future, you can edit your own posts).

Regarding the RAM situation, if the memory was maxed at any point, you should have received an out of memory error. We’re pretty confident this is not a loss of funds situation but rather the wallet not properly detecting associated notes. Lets see what your balances are once everything is synced up. Thanks for remaining patient! Spinning up a new node/reindexing is certainly tedious. :grimacing:

For sanity, are you running any special config options in your conf file?

I do not recommend running zcashd nodes on 2GB, as numerous issues can arise depending on your system specs. To be fair, it can be done but not without modifications to the conf and the system itself.

We use the phrase “operate gracefully” to indicate a known reference point where a zcashd full node is pinned with data indicating it can operate per some set of requirements. It is true you can generate certain transactions with 2GB, but a full node is doing quite a bit more.

I would recommend bumping this node to 4GB or 5GB of RAM and doing a full reindex. Also, please sanity check the address itself, without the use of z_gettotalbalance.

1 Like

I downloaded the entire blockchain.
All commands work, but z_importkey doesn’t:

“couldn’t connect to server” means zcashd is not running. Looks like it crashed for some reason which is a separate issue.

Can you try restarting zcashd and trying the import again?