Invoking HTTP RPC getblock
resulted in the following failure:
0status_code: 500 status: Internal Server Error response_body: {"result":null,"error":{"code":-1,"message":"Block not found on disk"}
The logs have shown:
02021-01-21T16:48:53Z Pre-allocating up to position 0x400000 in rev02417.dat
12021-01-21T16:48:53Z UpdateTip: new best=00000000000000000005656edcf6fb5cea1d2fe392841a9bdaa8b1fa821df661 height=667046 version=0x20004000 log2_work=92.608345 tx=608416058 date='2021-01-21T16:48:23Z' progress=1.000000 cache=95.6MiB(725599txo) warning='73 of last 100 blocks have unexpected version'
22021-01-21T16:59:14Z UpdateTip: new best=0000000000000000000383edc4ee51e5e55000c85ae844899e582aedc6d0cb2f height=667047 version=0x2000e000 log2_work=92.608362 tx=608418465 date='2021-01-21T16:58:42Z' progress=1.000000 cache=96.9MiB(735971txo) warning='73 of last 100 blocks have unexpected version'
3
42021-01-21T17:13:25Z ERROR: ReadBlockFromDisk: OpenBlockFile failed for FlatFilePos(nFile=-1, nPos=0)
5
62021-01-21T17:13:25Z UpdateTip: new best=0000000000000000000bc7c177f0ef9fa47492beb5c14250c6d412b12997a56b height=667048 version=0x20000000 log2_work=92.608379 tx=608421018 date='2021-01-21T17:13:24Z' progress=1.000000 cache=98.4MiB(747960txo) warning='72 of last 100 blocks have unexpected version'
72021-01-21T17:16:06Z UpdateTip: new best=000000000000000000034359728a89d359e6859f6908145594888c26f952dcb7 height=667049 version=0x20600000 log2_work=92.608396 tx=608423202 date='2021-01-21T17:15:51Z' progress=1.000000 cache=99.2MiB(754485txo) warning='73 of last 100 blocks have unexpected version'
Expected behavior
No error
Actual behavior
RPC 500 error returned and ReadBlockFromDisk ERROR logged.
To reproduce
Unknown.
System information
AWS K8S 4 CPUs/8Gi RAM, GP3 EBS 3000 IOPS/125Mips
02021-01-21T15:30:54Z Bitcoin Core version v0.20.1 (release build)
12021-01-21T15:30:54Z Assuming ancestors of block 0000000000000000000f2adce67e49b0b6bdeb9de8b7c3d7e93b21e7fc1e819d have valid signatures.
22021-01-21T15:30:54Z Setting nMinimumChainWork=00000000000000000000000000000000000000000e1ab5ec9348e9f4b8eb8154
32021-01-21T15:30:54Z Using the 'shani(1way,2way)' SHA256 implementation
42021-01-21T15:30:54Z Using RdSeed as additional entropy source
52021-01-21T15:30:54Z Using RdRand as an additional entropy source
62021-01-21T15:30:54Z Default data directory /root/.bitcoin
72021-01-21T15:30:54Z Using data directory /home/bitcoin/.bitcoin
82021-01-21T15:30:54Z Config file: /home/bitcoin/.bitcoin/bitcoin.conf (not found, skipping)
92021-01-21T15:30:54Z Command-line arg: datadir="/home/bitcoin/.bitcoin"
102021-01-21T15:30:54Z Command-line arg: rpcallowip="100.64.0.0/10"
112021-01-21T15:30:54Z Command-line arg: rpcbind=****
122021-01-21T15:30:54Z Command-line arg: rpcpassword=****
132021-01-21T15:30:54Z Command-line arg: rpcport="18332"
142021-01-21T15:30:54Z Command-line arg: rpcuser=****
152021-01-21T15:30:54Z Command-line arg: rpcworkqueue="4096"
162021-01-21T15:30:54Z Command-line arg: server=""
172021-01-21T15:30:54Z Command-line arg: txindex="1"
182021-01-21T15:30:54Z Using at most 125 automatic connections (1048576 file descriptors available)
192021-01-21T15:30:54Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
202021-01-21T15:30:54Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
212021-01-21T15:30:54Z Script verification uses 7 additional threads
222021-01-21T15:30:54Z scheduler thread start
232021-01-21T15:30:54Z WARNING: the RPC server is not safe to expose to untrusted networks such as the public internet
242021-01-21T15:30:54Z HTTP: creating work queue of depth 4096
252021-01-21T15:30:54Z Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation.
262021-01-21T15:30:54Z HTTP: starting 4 worker threads
272021-01-21T15:30:54Z Using wallet directory /home/bitcoin/.bitcoin
282021-01-21T15:30:54Z init message: Verifying wallet(s)...
292021-01-21T15:30:54Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
302021-01-21T15:30:54Z Using wallet /home/bitcoin/.bitcoin
312021-01-21T15:30:54Z BerkeleyEnvironment::Open: LogDir=/home/bitcoin/.bitcoin/database ErrorFile=/home/bitcoin/.bitcoin/db.log
322021-01-21T15:30:54Z init message: Loading banlist...
332021-01-21T15:30:54Z Using /16 prefix for IP bucketing
342021-01-21T15:30:54Z Cache configuration:
352021-01-21T15:30:54Z * Using 2.0 MiB for block index database
362021-01-21T15:30:54Z * Using 56.0 MiB for transaction index database
372021-01-21T15:30:54Z * Using 8.0 MiB for chain state database
382021-01-21T15:30:54Z * Using 384.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
392021-01-21T15:30:54Z init message: Loading block index...
402021-01-21T15:30:54Z Opening LevelDB in /home/bitcoin/.bitcoin/blocks/index
412021-01-21T15:30:54Z Opened LevelDB successfully
422021-01-21T15:30:54Z Using obfuscation key for /home/bitcoin/.bitcoin/blocks/index: 0000000000000000
432021-01-21T15:30:58Z LoadBlockIndexDB: last block file = 2417
442021-01-21T15:30:58Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=6, size=8006735, heights=667029...667034, time=2021-01-21...2021-01-21)
452021-01-21T15:30:58Z Checking all blk files are present...
462021-01-21T15:30:58Z Opening LevelDB in /home/bitcoin/.bitcoin/chainstate
472021-01-21T15:30:58Z Opened LevelDB successfully
482021-01-21T15:30:58Z Using obfuscation key for /home/bitcoin/.bitcoin/chainstate: 8d04dcac7c5beaa0
492021-01-21T15:30:58Z Loaded best chain: hashBestChain=000000000000000000029ce801aba0474f571370c0f12808bae6501cf9ca1cec height=667034 date=2021-01-21T15:13:02Z progress=0.999994
502021-01-21T15:30:58Z init message: Rewinding blocks...
512021-01-21T15:30:58Z FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
522021-01-21T15:30:58Z FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.00s)
532021-01-21T15:30:58Z init message: Verifying blocks...
542021-01-21T15:30:58Z Verifying last 6 blocks at level 3
552021-01-21T15:30:58Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
562021-01-21T15:31:03Z No coin database inconsistencies in last 6 blocks (11765 transactions)
572021-01-21T15:31:03Z block index 9520ms
582021-01-21T15:31:03Z Opening LevelDB in /home/bitcoin/.bitcoin/indexes/txindex
592021-01-21T15:31:03Z Opened LevelDB successfully
602021-01-21T15:31:03Z Using obfuscation key for /home/bitcoin/.bitcoin/indexes/txindex: 0000000000000000
612021-01-21T15:31:03Z init message: Loading wallet...
622021-01-21T15:31:03Z txindex thread start
632021-01-21T15:31:03Z txindex is enabled at height 667034
642021-01-21T15:31:03Z txindex thread exit
652021-01-21T15:31:03Z BerkeleyEnvironment::Open: LogDir=/home/bitcoin/.bitcoin/database ErrorFile=/home/bitcoin/.bitcoin/db.log
662021-01-21T15:31:03Z [default wallet] Wallet File Version = 169900
672021-01-21T15:31:03Z [default wallet] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0
682021-01-21T15:31:03Z [default wallet] Wallet completed loading in 35ms
692021-01-21T15:31:03Z [default wallet] setKeyPool.size() = 2000
702021-01-21T15:31:03Z [default wallet] mapWallet.size() = 0
712021-01-21T15:31:03Z [default wallet] m_address_book.size() = 0
722021-01-21T15:31:03Z block tree size = 667038
732021-01-21T15:31:03Z nBestHeight = 667034
742021-01-21T15:31:03Z torcontrol thread start
752021-01-21T15:31:03Z Bound to [::]:8333
762021-01-21T15:31:03Z Bound to 0.0.0.0:8333
772021-01-21T15:31:03Z init message: Loading P2P addresses...