bhdone / btchd

BitcoinHD Core integration/staging tree
https://bhd.one
MIT License
2 stars 1 forks source link

Failed to start btchdd client by error parameter -timelord-vdf_client #2

Open web3miner opened 1 year ago

web3miner commented 1 year ago

Bug Description

The btchdd client start failed by loading error parameter -timelord-vdf_client.

If the startup parameter -timelord-vdf_client=xxxx does not exist or the path is incorrect , wrong startup parameters will cause abnormal exit and fail to start .

Because there is no log prompt, it is difficult to analyze the cause


Environment

btchdd server

btchdd path

root@dev:~/bhd-miner# pwd
/root/bhd-miner
root@dev:~/bhd-miner# ls
btchd-cli  btchd-miner  btchdd

In fact, vdf_client does not exist


Startup Command

./btchdd -datadir=./data -testnet -server -rpcuser=geelabs -rpcpassword=Aa123456 -rpcport=18732 -rpcallowip=0.0.0.0/24 -rpcbind=0.0.0.0 -timelord -timelord-vdf_client=./vdf_client

Startup Logs

2023-02-24T05:49:36Z BitcoinHD Core version v2.1.0.62-d4e20b919 (release build)
2023-02-24T05:49:36Z Assuming ancestors of block 915e3ef622459f8b1b04dc274e1097b31111b0c6e0a9e9cd2da60c9d692f2c93 have valid signatures.
2023-02-24T05:49:36Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000
2023-02-24T05:49:36Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2023-02-24T05:49:36Z Using RdSeed as additional entropy source
2023-02-24T05:49:36Z Using RdRand as an additional entropy source
2023-02-24T05:49:36Z AppInitMain: Burn to address 2MsFDzHRUAMpjHxKyoEHU3aMCMsVtMqs1PV
2023-02-24T05:49:36Z Default data directory /root/.btchd
2023-02-24T05:49:36Z Using data directory /root/bhd-miner/data/testnet3
2023-02-24T05:49:36Z Config file: /root/bhd-miner/data/btchd.conf (not found, skipping)
2023-02-24T05:49:36Z Using at most 125 automatic connections (1024 file descriptors available)
2023-02-24T05:49:36Z Warning: relative datadir option 'data' specified, which will be interpreted relative to the current working directory '/root/bhd-miner'. This is fragile, because if bitcoin is started in the future from a different location, it will be unable to locate the current data files. There could also be data loss if bitcoin is started while in a temporary directory.
2023-02-24T05:49:36Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2023-02-24T05:49:36Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2023-02-24T05:49:36Z Using 16 threads for script verification
2023-02-24T05:49:36Z scheduler thread start
2023-02-24T05:49:36Z WARNING: the RPC server is not safe to expose to untrusted networks such as the public internet
2023-02-24T05:49:36Z HTTP: creating work queue of depth 16
2023-02-24T05:49:36Z 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.
2023-02-24T05:49:36Z HTTP: starting 4 worker threads
2023-02-24T05:49:36Z Using wallet directory /root/bhd-miner/data/testnet3/wallets
2023-02-24T05:49:36Z init message: Verifying wallet(s)...
2023-02-24T05:49:36Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2023-02-24T05:49:36Z Using wallet /root/bhd-miner/data/testnet3/wallets
2023-02-24T05:49:36Z BerkeleyEnvironment::Open: LogDir=/root/bhd-miner/data/testnet3/wallets/database ErrorFile=/root/bhd-miner/data/testnet3/wallets/db.log
2023-02-24T05:49:36Z init message: Loading banlist...
2023-02-24T05:49:36Z ERROR: DeserializeFileDB: Failed to open file /root/bhd-miner/data/testnet3/banlist.dat
2023-02-24T05:49:36Z Invalid or missing banlist.dat; recreating
2023-02-24T05:49:36Z Cache configuration:
2023-02-24T05:49:36Z * Using 2.0 MiB for block index database
2023-02-24T05:49:36Z * Using 8.0 MiB for chain state database
2023-02-24T05:49:36Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2023-02-24T05:49:36Z init message: Loading block index...
2023-02-24T05:49:36Z Opening LevelDB in /root/bhd-miner/data/testnet3/blocks/index
2023-02-24T05:49:36Z Opened LevelDB successfully
2023-02-24T05:49:36Z Using obfuscation key for /root/bhd-miner/data/testnet3/blocks/index: 0000000000000000
2023-02-24T05:49:36Z LoadBlockIndexDB: last block file = 0
2023-02-24T05:49:36Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2023-02-24T05:49:36Z Checking all blk files are present...
2023-02-24T05:49:36Z Initializing databases...
2023-02-24T05:49:36Z Pre-allocating up to position 0x1000000 in blk00000.dat
2023-02-24T05:49:36Z The work of the block(height=0): 1.00663e+11, the work of the best chain: 0
2023-02-24T05:49:36Z Opening LevelDB in /root/bhd-miner/data/testnet3/chainstate
2023-02-24T05:49:36Z Opened LevelDB successfully
2023-02-24T05:49:36Z Wrote new obfuscate key for /root/bhd-miner/data/testnet3/chainstate: 0ce8872ac6411ad2
2023-02-24T05:49:36Z Using obfuscation key for /root/bhd-miner/data/testnet3/chainstate: 0ce8872ac6411ad2
2023-02-24T05:49:36Z Upgrading UTXO database to 00000011: [0%]...[DONE]. remove utxo 0, add utxo 0
2023-02-24T05:49:36Z init message: Rewinding blocks...
2023-02-24T05:49:36Z  block index               4ms
2023-02-24T05:49:36Z init message: Loading wallet...
2023-02-24T05:49:36Z BerkeleyEnvironment::Open: LogDir=/root/bhd-miner/data/testnet3/wallets/database ErrorFile=/root/bhd-miner/data/testnet3/wallets/db.log
2023-02-24T05:49:36Z [default wallet] Wallet File Version = 10500
2023-02-24T05:49:36Z [default wallet] Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total. Unknown wallet records: 0
2023-02-24T05:49:36Z [default wallet] Performing wallet upgrade to 159900
2023-02-24T05:49:36Z [default wallet] keypool added 1 keys (0 internal), size=1 (0 internal)
2023-02-24T05:49:36Z [default wallet] Wallet completed loading in              19ms
2023-02-24T05:49:36Z [default wallet] keypool reserve 1
2023-02-24T05:49:36Z [default wallet] setKeyPool.size() = 1
2023-02-24T05:49:36Z [default wallet] mapWallet.size() = 0
2023-02-24T05:49:36Z [default wallet] mapAddressBook.size() = 1
2023-02-24T05:49:36Z [default wallet] Primary address = 2NDWrgLiFUW1y5piTWgtgYkk9Hpy6T6Sfxv
2023-02-24T05:49:36Z UpdateTip: new best=8cec494f7f02ad25b3abf418f7d5647885000e010c34e16c039711e4061497b0 height=0 version=0x00000002 log2_work=36.550747 tx=1 date='2018-07-11T07:06:29Z' progress=0.000001 cache=0.0MiB(0txo), work=0.00000e+00
2023-02-24T05:49:36Z block tree size = 1
2023-02-24T05:49:36Z nBestHeight = 0
2023-02-24T05:49:36Z Failed to open mempool file from disk. Continuing anyway.
2023-02-24T05:49:36Z torcontrol thread start
2023-02-24T05:49:36Z Bound to [::]:18733
2023-02-24T05:49:36Z Bound to 0.0.0.0:18733
2023-02-24T05:49:36Z init message: Loading P2P addresses...
2023-02-24T05:49:36Z ERROR: DeserializeFileDB: Failed to open file /root/bhd-miner/data/testnet3/peers.dat
2023-02-24T05:49:36Z Invalid or missing peers.dat; recreating
2023-02-24T05:49:36Z init message: Starting network threads...
2023-02-24T05:49:36Z net thread start
2023-02-24T05:49:36Z dnsseed thread start
2023-02-24T05:49:36Z Loading addresses from DNS seed testnet3.intgrow.com
2023-02-24T05:49:36Z addcon thread start
2023-02-24T05:49:36Z opencon thread start
2023-02-24T05:49:36Z Starting PoC module
2023-02-24T05:49:36Z Starting PoC forge thread
2023-02-24T05:49:36Z msghand thread start
2023-02-24T05:49:36Z Import mining-sign private key from wallet primary address 2NDWrgLiFUW1y5piTWgtgYkk9Hpy6T6Sfxv
2023-02-24T05:49:36Z StartTimelord: cannot find a valid path for `vdf_client`, provided path vdf_client
2023-02-24T05:49:36Z Interrupting PoC module
2023-02-24T05:49:36Z tor: Thread interrupt
2023-02-24T05:49:36Z Shutdown: In progress...
2023-02-24T05:49:36Z addcon thread exit
2023-02-24T05:49:36Z torcontrol thread exit
2023-02-24T05:49:36Z opencon thread exit
2023-02-24T05:49:36Z Exit PoC forge thread
2023-02-24T05:49:36Z Stopped PoC module
2023-02-24T05:49:36Z dnsseed thread exit
2023-02-24T05:49:36Z net thread exit
2023-02-24T05:49:36Z msghand thread exit
2023-02-24T05:49:36Z scheduler thread interrupt
2023-02-24T05:49:36Z Dumped mempool: 6e-06s to copy, 0.000685s to dump
2023-02-24T05:49:36Z WriteBatchSync: writing indexes total 1 entries...
2023-02-24T05:49:36Z WriteBatchSync: writing indexes total 0 entries...
2023-02-24T05:49:36Z [default wallet] Releasing wallet
2023-02-24T05:49:36Z Shutdown: done

The log can only be used to judge the abnormal exit when loading the wallet, and cannot be used to analyze the connection with - timerecord-vdf_client The client parameter has any relationship

Solution

bhdone commented 1 year ago

The error message can be found from the log and it looks like below: 2023-02-24T05:49:36Z StartTimelord: cannot find a valid path for vdf_client, provided path vdf_client

But yes, the message should be improved and we should put a text ERROR or something else into the log.

vdf_client is compiled from the repo belongs to Chia network, so we will not just simply put the binary file into our distributed package.