Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-0.12 [testnet] Corrupted block database detected #664

Closed
ihavenoface opened this issue Nov 29, 2022 · 3 comments
Closed

release-0.12 [testnet] Corrupted block database detected #664

ihavenoface opened this issue Nov 29, 2022 · 3 comments

Comments

@ihavenoface
Copy link
Contributor

ihavenoface commented Nov 29, 2022

Tried syncing testnet on 03fd2c5 around 10 times now. It always results in the above mentioned error upon closing and re-opening the client.
This is the setup I'm using:

#!/bin/bash
CHAIN="test"
DATA_DIR=/tmp/peercoin-$CHAIN
PATH="$HOME/Downloads/peercoin-03fd2c5198ea/bin/:$PATH"
mkdir -p $DATA_DIR
peercoind \
  -chain=$CHAIN \
  -datadir=$DATA_DIR

And the relevant debug:

2022-11-29T19:59:57Z Using obfuscation key for /tmp/peercoin-test/testnet3/chainstate: 7259f84625710d33
2022-11-29T19:59:57Z Loaded best chain: hashBestChain=6f0b8c33739cbfdb5d22ce1b6f35486d7eec98049cf5b5736916337d80091509 height=509126 date=2022-11-29T19:57:42Z progress=1.000000
2022-11-29T19:59:57Z init message: Verifying blocks…
2022-11-29T19:59:57Z Verifying last 6 blocks at level 3
2022-11-29T19:59:57Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...ERROR: VerifyDB(): *** coin database inconsistencies found (last 6 blocks, 0 good transactions before that)

2022-11-29T19:59:57Z : Corrupted block database detected.
Please restart with -reindex or -reindex-chainstate to recover.
2022-11-29T19:59:58Z Aborted block database rebuild. Exiting.
2022-11-29T19:59:58Z GUI: initializeResult : Initialization result:  false
2022-11-29T19:59:58Z GUI: requestShutdown : Requesting shutdown
2022-11-29T19:59:58Z GUI: Running Shutdown in thread
@belovachap
Copy link
Contributor

Yeah, I restarted my digital ocean peercoin testnet node and I'm hitting the same issue ;(

2022-11-29T21:14:54Z Peercoin version v0.12.0.0 Coccinellidae (release build)
2022-11-29T21:14:54Z Assuming ancestors of block 0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1 have valid signatures.
2022-11-29T21:14:54Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000
2022-11-29T21:14:54Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2022-11-29T21:14:54Z Using RdRand as an additional entropy source
2022-11-29T21:14:54Z Default data directory /.peercoin
2022-11-29T21:14:54Z Using data directory /root/.peercoin/testnet3
2022-11-29T21:14:54Z Config file: /root/peercoin.conf
2022-11-29T21:14:54Z Config file arg: datadir="/root/.peercoin"
2022-11-29T21:14:54Z Config file arg: debug="1"
2022-11-29T21:14:54Z Config file arg: testnet="1"
2022-11-29T21:14:54Z Command-line arg: conf="/root/peercoin.conf"
2022-11-29T21:14:54Z Using at most 125 automatic connections (1024 file descriptors available)
2022-11-29T21:14:54Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2022-11-29T21:14:54Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2022-11-29T21:14:54Z Script verification uses 0 additional threads
2022-11-29T21:14:54Z scheduler thread start
2022-11-29T21:14:54Z Allowing HTTP connections from: 127.0.0.0/8 ::1/128 
2022-11-29T21:14:54Z Binding RPC on address ::1 port 9903
2022-11-29T21:14:54Z Binding RPC on address 127.0.0.1 port 9903
2022-11-29T21:14:54Z Initialized HTTP server
2022-11-29T21:14:54Z HTTP: creating work queue of depth 16
2022-11-29T21:14:54Z Starting RPC
2022-11-29T21:14:54Z Starting HTTP RPC server
2022-11-29T21:14:54Z Using random cookie authentication.
2022-11-29T21:14:54Z Generated RPC authentication cookie /root/.peercoin/testnet3/.cookie
2022-11-29T21:14:54Z Registering HTTP handler for / (exactmatch 1)
2022-11-29T21:14:54Z Registering HTTP handler for /wallet/ (exactmatch 0)
2022-11-29T21:14:54Z Starting HTTP server
2022-11-29T21:14:54Z HTTP: starting 4 worker threads
2022-11-29T21:14:54Z Using wallet directory /root/.peercoin/testnet3/wallets
2022-11-29T21:14:54Z init message: Verifying wallet(s)…
2022-11-29T21:14:54Z Using /16 prefix for IP bucketing
2022-11-29T21:14:54Z init message: Loading P2P addresses…
2022-11-29T21:14:54Z CheckAddrman: new 130, tried 5, total 135 started
2022-11-29T21:14:54Z CheckAddrman: completed (0.55ms)
2022-11-29T21:14:54Z Loaded 135 addresses from peers.dat  2ms
2022-11-29T21:14:54Z init message: Loading banlist…
2022-11-29T21:14:54Z Loaded 0 banned node addresses/subnets  0ms
2022-11-29T21:14:54Z net: setting try another outbound peer=false
2022-11-29T21:14:54Z SetNetworkActive: true
2022-11-29T21:14:54Z Entering http event loop
2022-11-29T21:14:54Z Cache configuration:
2022-11-29T21:14:54Z * Using 2.0 MiB for block index database
2022-11-29T21:14:54Z * Using 56.0 MiB for transaction index database
2022-11-29T21:14:54Z * Using 8.0 MiB for chain state database
2022-11-29T21:14:54Z * Using 384.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2022-11-29T21:14:54Z init message: Loading block index…
2022-11-29T21:14:54Z Switching active chainstate to Chainstate [ibd] @ height -1 (null)
2022-11-29T21:14:54Z LevelDB using max_open_files=1000 (default=1000)
2022-11-29T21:14:54Z Opening LevelDB in /root/.peercoin/testnet3/blocks/index
2022-11-29T21:14:54Z leveldb: Recovering log #99
2022-11-29T21:14:54Z leveldb: Level-0 table #101: started
2022-11-29T21:14:54Z leveldb: Level-0 table #101: 193 bytes OK
2022-11-29T21:14:54Z leveldb: Delete type=3 #97
2022-11-29T21:14:54Z leveldb: Delete type=0 #99
2022-11-29T21:14:54Z Opened LevelDB successfully
2022-11-29T21:14:54Z Using obfuscation key for /root/.peercoin/testnet3/blocks/index: 0000000000000000
2022-11-29T21:14:58Z LoadBlockIndexDB: last block file = 1
2022-11-29T21:14:58Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=247585, size=127689949, heights=261551...509135, time=2017-03-03...2022-11-29)
2022-11-29T21:14:58Z Checking all blk files are present...
2022-11-29T21:14:58Z LevelDB using max_open_files=1000 (default=1000)
2022-11-29T21:14:58Z Opening LevelDB in /root/.peercoin/testnet3/chainstate
2022-11-29T21:14:58Z leveldb: Recovering log #138
2022-11-29T21:14:58Z leveldb: Level-0 table #140: started
2022-11-29T21:14:58Z leveldb: Level-0 table #140: 451 bytes OK
2022-11-29T21:14:58Z leveldb: Delete type=0 #138
2022-11-29T21:14:58Z leveldb: Delete type=3 #136
2022-11-29T21:14:58Z Opened LevelDB successfully
2022-11-29T21:14:58Z Using obfuscation key for /root/.peercoin/testnet3/chainstate: bb14fd15e7b2d97e
2022-11-29T21:14:58Z leveldb: Compacting 4@0 + 7@1 files
2022-11-29T21:14:58Z leveldb: Generated table #142@0: 540 keys, 30553 bytes
2022-11-29T21:14:58Z leveldb: Generated table #143@0: 563 keys, 32337 bytes
2022-11-29T21:14:58Z leveldb: Generated table #144@0: 37215 keys, 2165425 bytes
2022-11-29T21:14:58Z leveldb: Generated table #145@0: 37214 keys, 2169451 bytes
2022-11-29T21:14:59Z leveldb: Generated table #146@0: 36962 keys, 2166078 bytes
2022-11-29T21:14:59Z leveldb: Generated table #147@0: 37082 keys, 2169135 bytes
2022-11-29T21:14:59Z leveldb: Generated table #148@0: 332 keys, 19887 bytes
2022-11-29T21:14:59Z leveldb: Compacted 4@0 + 7@1 files => 8752866 bytes
2022-11-29T21:14:59Z leveldb: compacted to: files[ 0 7 30 0 0 0 0 ]
2022-11-29T21:14:59Z leveldb: Delete type=2 #127
2022-11-29T21:14:59Z leveldb: Delete type=2 #137
2022-11-29T21:14:59Z leveldb: Delete type=2 #140
2022-11-29T21:14:59Z leveldb: Delete type=2 #124
2022-11-29T21:14:59Z leveldb: Delete type=2 #125
2022-11-29T21:14:59Z leveldb: Delete type=2 #126
2022-11-29T21:14:59Z leveldb: Delete type=2 #129
2022-11-29T21:14:59Z leveldb: Delete type=2 #131
2022-11-29T21:14:59Z leveldb: Delete type=2 #123
2022-11-29T21:14:59Z leveldb: Delete type=2 #128
2022-11-29T21:14:59Z leveldb: Delete type=2 #134
2022-11-29T21:14:59Z Loaded best chain: hashBestChain=b0efa5786e1052f3e075de55d391b5e67dc65082d3765b0ea192fd6efec8fbc3 height=509135 date=2022-11-29T21:08:25Z progress=0.999999
2022-11-29T21:14:59Z init message: Verifying blocks…
2022-11-29T21:14:59Z Verifying last 6 blocks at level 3
2022-11-29T21:14:59Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...ERROR: VerifyDB(): *** coin database inconsistencies found (last 6 blocks, 0 good transactions before that)

2022-11-29T21:14:59Z : Corrupted block database detected.
Please restart with -reindex or -reindex-chainstate to recover.
2022-11-29T21:14:59Z Aborted block database rebuild. Exiting.
2022-11-29T21:14:59Z Interrupting HTTP server
2022-11-29T21:14:59Z Interrupting HTTP RPC server
2022-11-29T21:14:59Z Interrupting RPC
2022-11-29T21:14:59Z Shutdown: In progress...
2022-11-29T21:14:59Z Stopping HTTP RPC server
2022-11-29T21:14:59Z Unregistering HTTP handler for / (exactmatch 1)
2022-11-29T21:14:59Z Unregistering HTTP handler for /wallet/ (exactmatch 0)
2022-11-29T21:14:59Z Stopping RPC
2022-11-29T21:14:59Z RPC stopped.
2022-11-29T21:14:59Z Stopping HTTP server
2022-11-29T21:14:59Z Waiting for HTTP worker threads to exit
2022-11-29T21:14:59Z Exited http event loop
2022-11-29T21:14:59Z Waiting for HTTP event thread to exit
2022-11-29T21:14:59Z Stopped HTTP server
2022-11-29T21:14:59Z scheduler thread exit
2022-11-29T21:14:59Z FlushStateToDisk: write block and undo data to disk started
2022-11-29T21:14:59Z FlushStateToDisk: write block and undo data to disk completed (2.18ms)
2022-11-29T21:14:59Z FlushStateToDisk: write block index to disk started
2022-11-29T21:14:59Z WriteBatch memory usage: db=index, before=0.0MiB, after=0.0MiB
2022-11-29T21:14:59Z FlushStateToDisk: write block index to disk completed (6.35ms)
2022-11-29T21:14:59Z FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
2022-11-29T21:14:59Z Writing final batch of 0.00 MiB
2022-11-29T21:14:59Z WriteBatch memory usage: db=chainstate, before=0.0MiB, after=0.0MiB
2022-11-29T21:14:59Z Committed 0 changed transaction outputs (out of 0) to coin database...
2022-11-29T21:14:59Z FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.82ms)
2022-11-29T21:14:59Z Enqueuing ChainStateFlushed: block hash=b0efa5786e1052f3e075de55d391b5e67dc65082d3765b0ea192fd6efec8fbc3
2022-11-29T21:14:59Z ChainStateFlushed: block hash=b0efa5786e1052f3e075de55d391b5e67dc65082d3765b0ea192fd6efec8fbc3
2022-11-29T21:14:59Z FlushStateToDisk: write block and undo data to disk started
2022-11-29T21:14:59Z FlushStateToDisk: write block and undo data to disk completed (2.21ms)
2022-11-29T21:14:59Z FlushStateToDisk: write block index to disk started
2022-11-29T21:14:59Z WriteBatch memory usage: db=index, before=0.0MiB, after=0.0MiB
2022-11-29T21:14:59Z FlushStateToDisk: write block index to disk completed (2.54ms)
2022-11-29T21:14:59Z FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
2022-11-29T21:14:59Z Writing final batch of 0.00 MiB
2022-11-29T21:14:59Z WriteBatch memory usage: db=chainstate, before=0.0MiB, after=0.0MiB
2022-11-29T21:14:59Z Committed 0 changed transaction outputs (out of 0) to coin database...
2022-11-29T21:14:59Z FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.72ms)
2022-11-29T21:14:59Z Enqueuing ChainStateFlushed: block hash=b0efa5786e1052f3e075de55d391b5e67dc65082d3765b0ea192fd6efec8fbc3
2022-11-29T21:14:59Z Shutdown: done

@peerchemist
Copy link
Member

@ihavenoface do you have any follow up on this?

@ihavenoface
Copy link
Contributor Author

Seems to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants