Bitcoin-Core

無法啟動 bitcoind - “塊文件之前已被修剪”

  • November 16, 2018

我按照說明安裝了比特幣。

我主要將它與bitcoin-qt -testnet選項一起使用,甚至在測試網中進行了一些交易。我正在使用修剪模式。

現在我想執行bitcoind然後連接bitcoin-cli到它。

但是當我執行以下命令時:bitcoind -testnet,我得到以下輸出:

punnysher@punnysher ~ $ bitcoind -testnet

2018-11-16T09:16:40Z Bitcoin Core version v0.17.0.1 (release build)

2018-11-16T09:16:40Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1

2018-11-16T09:16:40Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.

2018-11-16T09:16:40Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463

2018-11-16T09:16:40Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation

2018-11-16T09:16:40Z Using RdRand as an additional entropy source

2018-11-16T09:16:40Z Default data directory /home/punnysher/.bitcoin

2018-11-16T09:16:40Z Using data directory /home/punnysher/.bitcoin/testnet3

2018-11-16T09:16:40Z Using config file /home/punnysher/.bitcoin/bitcoin.conf

2018-11-16T09:16:40Z Using at most 125 automatic connections (1024 file descriptors available)

2018-11-16T09:16:40Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements

2018-11-16T09:16:40Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements

2018-11-16T09:16:40Z Using 4 threads for script verification

2018-11-16T09:16:40Z scheduler thread start

2018-11-16T09:16:40Z HTTP: creating work queue of depth 16

2018-11-16T09:16:40Z No rpcpassword set - using random cookie authentication.

2018-11-16T09:16:40Z Generated RPC authentication cookie /home/punnysher/.bitcoin/testnet3/.cookie

2018-11-16T09:16:40Z HTTP: starting 4 worker threads

2018-11-16T09:16:40Z Using wallet directory /home/punnysher/.bitcoin/testnet3/wallets

2018-11-16T09:16:40Z init message: Verifying wallet(s)...

2018-11-16T09:16:40Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)

2018-11-16T09:16:40Z Using wallet wallet.dat

2018-11-16T09:16:40Z BerkeleyEnvironment::Open: LogDir=/home/punnysher/.bitcoin/testnet3/wallets/database ErrorFile=/home/punnysher/.bitcoin/testnet3/wallets/db.log

2018-11-16T09:16:40Z Cache configuration:

2018-11-16T09:16:40Z * Using 2.0MiB for block index database

2018-11-16T09:16:40Z * Using 8.0MiB for chain state database

2018-11-16T09:16:40Z * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)

2018-11-16T09:16:40Z init message: Loading block index...

2018-11-16T09:16:40Z Opening LevelDB in /home/punnysher/.bitcoin/testnet3/blocks/index

2018-11-16T09:16:40Z Opened LevelDB successfully

2018-11-16T09:16:40Z Using obfuscation key for /home/punnysher/.bitcoin/testnet3/blocks/index: 0000000000000000

2018-11-16T09:16:48Z LoadBlockIndexDB: last block file = 154

2018-11-16T09:16:48Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=2233, size=44632870, heights=1441380...1443684, time=2018-10-31...2018-11-16)

2018-11-16T09:16:48Z Checking all blk files are present...

2018-11-16T09:16:48Z LoadBlockIndexDB(): Block files have previously been pruned

2018-11-16T09:16:48Z : You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.

Please restart with -reindex or -reindex-chainstate to recover.

: You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.

Please restart with -reindex or -reindex-chainstate to recover.

2018-11-16T09:16:48Z Aborted block database rebuild. Exiting.

2018-11-16T09:16:48Z Shutdown: In progress...

2018-11-16T09:16:48Z scheduler thread interrupt

2018-11-16T09:16:48Z Shutdown: done

punnysher@punnysher ~ $ 

消息說

2018-11-16T09:16:48Z LoadBlockIndexDB():塊文件以前已被修剪

2018-11-16T09:16:48Z :您需要使用 -reindex 重建數據庫以返回未修剪模式。這將重新下載整個區塊鏈。

請使用 -reindex 或 -reindex-chainstate 重新啟動以恢復。

如果你一直在修剪模式下執行,bitcoind 一直在修剪區塊鏈。這意味著它已丟棄數據以節省磁碟空間。

要在非修剪模式下執行,您必須恢復失去的數據。提供的方法是再次下載整個區塊鏈。

唯一明顯的選擇大概是在修剪模式下執行。


相關問題:

相關連結:

> > 好的,我有一個問題。說:我啟用了修剪模式,比特幣核心有效地開始在這種模式下工作。但如果我想回到“完整”模式,這是一種方式,我需要再次下載並驗證整個區塊鏈,沒有捷徑嗎? > > >

是的,你必須重新下載整個區塊鏈,沒有捷徑

引用自:https://bitcoin.stackexchange.com/questions/81077