与区块链网络同步的问题

问题描述

我有一个 Windows Server 作为一个完整的节点,PC 上的其他客户端连接并与之同步,一切正常,然后我决定添加一个基于 ubuntu 18.04 的托管 vps,即使它看起来也不同步块数,我用 ufw 打开了 tcp 端口,但我不知道为什么它不同步:

2021-01-21T17:11:35Z testcoin Core version v1.0.0.0-g (release build)
2021-01-21T17:11:35Z InitParameterInteraction: parameter interaction: -connect set -> setting -dnsseed=0
2021-01-21T17:11:35Z InitParameterInteraction: parameter interaction: -connect set -> setting -listen=0
2021-01-21T17:11:35Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -upnp=0
2021-01-21T17:11:35Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -discover=0
2021-01-21T17:11:35Z InitParameterInteraction: parameter interaction: -listen=0 -> setting -listenonion=0
2021-01-21T17:11:35Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2021-01-21T17:11:35Z Assuming ancestors of block 00000a49e6b0d232e39d3c20ed7f9000e034047d42370e869270ec7cb595d6ec have valid signatures.
2021-01-21T17:11:35Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000200020
2021-01-21T17:11:35Z Using the 'sse4(1way),sse41(4way)' SHA256 implementation
2021-01-21T17:11:35Z Using rdrand as an additional entropy source
2021-01-21T17:11:35Z Default data directory /root/.testcoin
2021-01-21T17:11:35Z Using data directory /root/.testcoin
2021-01-21T17:11:35Z Using config file /root/.testcoin/testcoin.conf
2021-01-21T17:11:35Z Using at most 125 automatic connections (1024 file descriptors available)
2021-01-21T17:11:35Z Using 16 MiB out of 32/2 requested for signature cache,able to store 524288 elements
2021-01-21T17:11:35Z Using 16 MiB out of 32/2 requested for script execution cache,able to store 524288 elements
2021-01-21T17:11:35Z Using 0 threads for script verification
2021-01-21T17:11:35Z HTTP: creating work queue of depth 16
2021-01-21T17:11:35Z No rpcpassword set - using random cookie authentication.
2021-01-21T17:11:35Z Generated RPC authentication cookie /root/.testcoin/.cookie
2021-01-21T17:11:35Z HTTP: starting 4 worker threads
2021-01-21T17:11:35Z Using wallet directory /root/.testcoin
2021-01-21T17:11:35Z init message: Verifying wallet(s)...
2021-01-21T17:11:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9,2010)
2021-01-21T17:11:35Z Using wallet wallet.dat
2021-01-21T17:11:35Z BerkeleyEnvironment::Open: LogDir=/root/.testcoin/database ErrorFile=/root/.testcoin/db.log
2021-01-21T17:11:35Z scheduler thread start
2021-01-21T17:11:35Z Cache configuration:
2021-01-21T17:11:35Z * Using 2.0MiB for block index database
2021-01-21T17:11:35Z * Using 8.0MiB for chain state database
2021-01-21T17:11:35Z * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2021-01-21T17:11:35Z init message: Loading block index...
2021-01-21T17:11:35Z opening LevelDB in /root/.testcoin/blocks/index
2021-01-21T17:11:35Z Opened LevelDB successfully
2021-01-21T17:11:35Z Using obfuscation key for /root/.testcoin/blocks/index: 0000000000000000
2021-01-21T17:11:35Z LoadBlockIndexDB: last block file = 0
2021-01-21T17:11:35Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1,size=288,heights=0...0,time=2021-01-10...2021-01-10)
2021-01-21T17:11:35Z Checking all blk files are present...
2021-01-21T17:11:35Z opening LevelDB in /root/.testcoin/chainstate
2021-01-21T17:11:35Z Opened LevelDB successfully
2021-01-21T17:11:35Z Using obfuscation key for /root/.testcoin/chainstate: fec815e2991463fd
2021-01-21T17:11:35Z Loaded best chain: hashBestChain=00000a49e6b0d232e39d3c20ed7f9000e034047d42370e869270ec7cb595d6ec height=0 date=2021-01-10T10:15:11Z progress=1.000000
2021-01-21T17:11:35Z init message: Rewinding blocks...
2021-01-21T17:11:35Z init message: Verifying blocks...
2021-01-21T17:11:35Z  block index              12ms
2021-01-21T17:11:35Z init message: Loading wallet...
2021-01-21T17:11:35Z [default wallet] nFiLeversion = 1000000
2021-01-21T17:11:35Z [default wallet] Keys: 2001 plaintext,0 encrypted,2001 w/ Metadata,2001 total. UnkNown wallet records: 1
2021-01-21T17:11:35Z [default wallet] Wallet completed loading in              60ms
2021-01-21T17:11:35Z [default wallet] setKeyPool.size() = 2000
2021-01-21T17:11:35Z [default wallet] mapWallet.size() = 0
2021-01-21T17:11:35Z [default wallet] mapAddressBook.size() = 0
2021-01-21T17:11:35Z mapBlockIndex.size() = 6
2021-01-21T17:11:35Z nBestHeight = 0
2021-01-21T17:11:35Z init message: Loading P2P addresses...
2021-01-21T17:11:35Z Loaded 3 addresses from peers.dat  0ms
2021-01-21T17:11:35Z init message: Loading banlist...
2021-01-21T17:11:35Z init message: Starting network threads...
2021-01-21T17:11:35Z DNS seeding disabled
2021-01-21T17:11:35Z init message: Done loading
2021-01-21T17:11:35Z msghand thread start
2021-01-21T17:11:35Z opencon thread start
2021-01-21T17:11:35Z addcon thread start
2021-01-21T17:11:35Z Imported mempool transactions from disk: 0 succeeded,0 Failed,0 expired,0 already there
2021-01-21T17:11:35Z net thread start
2021-01-21T17:11:35Z New outbound peer connected: version: 70015,blocks=202,peer=0
2021-01-21T17:11:35Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 0000015584b1352a512e2139846c49d8ecd408d7d945c5651e7036b8ab846198,bad-diffbits,incorrect proof of work (code 16)
2021-01-21T17:11:35Z Warning: not punishing manually-connected peer 35.238.12.61:11890!

如果您检查以下行,您会得出结论,它看到了 202 个块,那么它为什么不同步?

2021-01-21T17:11:35Z New outbound peer connected: version: 70015,peer=0

解决方法

在您带来的日志中,有一个错误 ERROR: AcceptBlockHeader: Consensus :: ContextualCheckBlockHeader :。很可能由于这个原因同步没有开始。您是否尝试过查找有关此错误的信息?看起来像这样 https://github.com/Bitcoin-ABC/bitcoin-abc/issues/324 .