BTCPrivate / BitcoinPrivate-legacy

Bitcoin Private is a Bitcoin and Zclassic fork which uses ZK-SNARK technology for privacy and fungibility.
Other
284 stars 132 forks source link

btcpd crash: btcpd: main.cpp:2631: bool ConnectTip(CValidationState&, CBlockIndex*, CBlock*): Assertion `pcoinsTip->GetAnchorAt(pcoinsTip->GetBestAnchor(), oldTree, chainActive.Height() >= Params().GetConsensus().zResetHeight)' failed #211

Open alexcos20 opened 5 years ago

alexcos20 commented 5 years ago

Describe the issue

Btcpd crashing with:

btcpd: main.cpp:2631: bool ConnectTip(CValidationState&, CBlockIndex, CBlock): Assertion `pcoinsTip->GetAnchorAt(pcoinsTip->GetBestAnchor(), oldTree, chainActive.Height() >= Params().GetConsensus().zResetHeight)' failed.

Can you reliably reproduce the issue?

Sometimes is ok for 2-3 days, sometimes it is crashing at startup

The version of Bitcoin Private you were using:

Bitcoin Private Daemon version v1.0.13-6c8ed84c

Machine specs:

Any extra information that might be useful in the debugging process.

running with:

/coins/btcp/BitcoinPrivate/src/btcpd -datadir=/coins/btcp/data -server -txconfirmtarget=3 -daemon -rpcuser=XXX -rpcpassword=XXX -rpcbind=127.0.0.1 -rpcallowip=127.0.0.1

debug.log: 2019-02-06 10:17:20 dnsseed thread exit 2019-02-06 10:17:20 ProcessMessages: advertizing address XXXX:7933 2019-02-06 10:17:20 receive version message: /BTCP:1.0.13/: version 180004, blocks=473785, us=XXXX:54472, peer=1 2019-02-06 10:17:20 Added time data, samples 2, offset +0 (+0 minutes) 2019-02-06 10:17:20 AdvertizeLocal: advertizing address XXX:7933 2019-02-06 10:17:31

---crashed here----

2019-02-06 10:17:31 Bitcoin Private version v1.0.13-6c8ed84c (2019-01-08 10:43:46 -0600) 2019-02-06 10:17:31 Running with fork parameters datadir=/coins/btcp/data/utxo_snapshot forkStartHeight=272991, forkHeightRange=5467 2019-02-06 10:17:31 Using OpenSSL version OpenSSL 1.1.0d 26 Jan 2017 2019-02-06 10:17:31 Using BerkeleyDB version Berkeley DB 6.2.23: (March 28, 2016) 2019-02-06 10:17:31 Default data directory /root/.btcprivate 2019-02-06 10:17:31 Using data directory /coins/btcp/data 2019-02-06 10:17:31 Using config file /coins/btcp/data/btcprivate.conf 2019-02-06 10:17:31 Using at most 125 connections (1024 file descriptors available) 2019-02-06 10:17:31 Using 0 threads for script verification 2019-02-06 10:17:31 Loading verifying key from /root/.zcash-params/sprout-verifying.key 2019-02-06 10:17:31 scheduler thread start 2019-02-06 10:17:31 Loaded verifying key in 0.002676s seconds. 2019-02-06 10:17:31 HTTP: creating work queue of depth 16 2019-02-06 10:17:31 HTTP: starting 4 worker threads 2019-02-06 10:17:31 Using wallet wallet.dat 2019-02-06 10:17:31 init message: Verifying wallet... 2019-02-06 10:17:31 CDBEnv::Open: LogDir=/coins/btcp/data/database ErrorFile=/coins/btcp/data/db.log 2019-02-06 10:17:31 Bound to [::]:7933 2019-02-06 10:17:31 Bound to 0.0.0.0:7933 2019-02-06 10:17:31 Cache configuration: 2019-02-06 10:17:31 Using 2.0MiB for block index database 2019-02-06 10:17:31 Using 32.5MiB for chain state database 2019-02-06 10:17:31 * Using 65.5MiB for in-memory UTXO set 2019-02-06 10:17:31 init message: Loading block index... 2019-02-06 10:17:31 Opening LevelDB in /coins/btcp/data/blocks/index 2019-02-06 10:17:31 Opened LevelDB successfully 2019-02-06 10:17:31 Opening LevelDB in /coins/btcp/data/chainstate 2019-02-06 10:17:31 Opened LevelDB successfully 2019-02-06 10:17:40 LoadBlockIndexDB: last block file = 59 2019-02-06 10:17:40 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=13013, size=70454440, heights=460767...473782, time=2019-01-14...2019-02-06) 2019-02-06 10:17:40 Checking all blk files are present... 2019-02-06 10:17:40 LoadBlockIndexDB: transaction index disabled 2019-02-06 10:17:40 LoadBlockIndexDB: hashBestChain=00000002737052e4e034aa54ea1d842a491465c8fad62eca158f9dd4a80cf803 height=473782 date=2019-02-06 10:09:30 progress=0.999999 2019-02-06 10:17:40 init message: Verifying blocks... 2019-02-06 10:17:40 Verifying last 288 blocks at level 3 2019-02-06 10:17:42 No coin database inconsistencies in last 289 blocks (926 transactions) 2019-02-06 10:17:42 block index 11284ms 2019-02-06 10:17:42 init message: Loading wallet... 2019-02-06 10:17:42 nFileVersion = 1001350 2019-02-06 10:17:42 Keys: 117 plaintext, 0 encrypted, 117 w/ metadata, 117 total 2019-02-06 10:17:42 ZKeys: 0 plaintext, 0 encrypted, 0 w/metadata, 0 total 2019-02-06 10:17:42 wallet 7ms 2019-02-06 10:17:42 init message: Activating best chain... 2019-02-06 10:17:42 mapBlockIndex.size() = 479518 2019-02-06 10:17:42 nBestHeight = 473782 2019-02-06 10:17:42 setKeyPool.size() = 100 2019-02-06 10:17:42 mapWallet.size() = 9 2019-02-06 10:17:42 mapAddressBook.size() = 17 2019-02-06 10:17:42 torcontrol thread start 2019-02-06 10:17:42 init message: Loading addresses... 2019-02-06 10:17:42 Loaded 885 addresses from peers.dat 5ms 2019-02-06 10:17:42 msghand thread start 2019-02-06 10:17:42 opencon thread start 2019-02-06 10:17:42 addcon thread start 2019-02-06 10:17:42 net thread start 2019-02-06 10:17:42 dnsseed thread start 2019-02-06 10:17:42 init message: Done loading 2019-02-06 10:17:43 connect() to [2a02:587:390e:3900:2d72:f770:5fce:5c61]:7933 failed: Network is unreachable (101) 2019-02-06 10:17:43 socket recv error Connection reset by peer (104) 2019-02-06 10:17:44 ProcessMessages: advertizing address XXX:7933 2019-02-06 10:17:44 receive version message: /BTCP:1.0.13/: version 180004, blocks=473785, us=XXX:52536, peer=2 2019-02-06 10:17:44 Added time data, samples 2, offset +0 (+0 minutes) 2019-02-06 10:17:44 AdvertizeLocal: advertizing address XXX:7933 2019-02-06 10:17:44 connect() to [2a02:120b:2c7c:4b30:e05b:e50e:e198:76b6]:7933 failed: Network is unreachable (101) 2019-02-06 10:18:36 ---crashed here---

2019-02-06 10:18:36 Bitcoin Private version v1.0.13-6c8ed84c (2019-01-08 10:43:46 -0600) 2019-02-06 10:18:36 Running with fork parameters datadir=/coins/btcp/data/utxo_snapshot forkStartHeight=272991, forkHeightRange=5467 2019-02-06 10:18:36 Using OpenSSL version OpenSSL 1.1.0d 26 Jan 2017 2019-02-06 10:18:36 Using BerkeleyDB version Berkeley DB 6.2.23: (March 28, 2016) 2019-02-06 10:18:36 Default data directory /root/.btcprivate 2019-02-06 10:18:36 Using data directory /coins/btcp/data

interbiznw commented 5 years ago

@alexcos20 is this node fully synced, is it a new install or one that had been running for some time?

alexcos20 commented 5 years ago

Hello, It is a new install (2 weeks ago). While syncinc (took 2 days), everything was fine.

0x6b656e commented 5 years ago

Are you still experiencing this issue?

alexcos20 commented 5 years ago

Yes, found it today crashed again :(

PS: Should I checkout the git and recompile again? Could help?

Thanks,