zcash / zcash

Zcash - Internet Money

Home Page:https://z.cash/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error after migration: Assertion `pindexWalk->pprev' failed

zine999 opened this issue · comments

Describe the issue

Migrating zcash-data from MACHINE1 to MACHINE2 using rsync did not work. zcashd runs on MACHINE1 without problems, but not on MACHINE2.

Can you reliably reproduce the issue?

Yes.

If so, please list the steps to reproduce below:

I wanted to move the zcash blockchain data from one machine to another, so I used rsync with these options:

rsync -aAXPhuv --delete /zcash/ root@MACHINE2:/home/blockchains/zcash/

I made sure to do this after the zcash node on MACHINE1 had fully shut down.

After verifying the permissions were correct and all files had been transferred, Zcash fails to start on MACHINE2:

2024-02-01T18:55:33.173398Z  INFO Init: main: Cache configuration:
2024-02-01T18:55:33.173413Z  INFO Init: main: * Using 2.0MiB for block index database
2024-02-01T18:55:33.173422Z  INFO Init: main: * Using 120.0MiB for chain state database
2024-02-01T18:55:33.173429Z  INFO Init: main: * Using 328.0MiB for in-memory UTXO set
2024-02-01T18:55:33.173438Z  INFO Init: main: init message: Loading block index...
2024-02-01T18:55:33.173567Z  INFO Init: main: Opening LevelDB in /srv/zcashd/.zcash/blocks/index
2024-02-01T18:55:33.330153Z  INFO Init: main: Opened LevelDB successfully
2024-02-01T18:55:33.330312Z  INFO Init: main: Opening LevelDB in /srv/zcashd/.zcash/chainstate
2024-02-01T18:55:33.344295Z  INFO Init: main: Opened LevelDB successfully
zcashd: chain.cpp:142: CBlockIndex *CBlockIndex::GetAncestor(int): Assertion `pindexWalk->pprev' failed.
ERROR: 139

The only error during the rsync transfer was the following, which I think is irrelevant to this error:

rsync: [receiver] rsync_xal_set: lremovexattr("/home/blockchains/zcash/.","security.selinux") failed: Permission denied (13)

And attempting to remove that attribute with setfattr -x security.selinux manually on MACHINE2 also fails with the same error. Setting setenforce 0 and running the command still fails. I think this is an irrelevant error though, as it should not affect the actual contents of the data that were transferred.

The version of Zcash you were using:

v5.7.0

Machine specs:

Machine 2 specs:

  • OS name + version: Fedora 39 Server Edition
  • CPU: 4
  • RAM: 8GB
  • Disk size: 2TB
  • Disk Type (HD/SDD): HD
  • Linux kernel version (uname -a): Linux MACHINE2 6.6.13-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 20 18:03:28 UTC 2024 x86_64 GNU/Linux

Am using the official docker image.

What can I do to try to get it running?