stacks-network / stacks-blockchain-docker

Stacks-blockchain with API using docker compose
GNU General Public License v3.0
27 stars 37 forks source link

Bitcoin node built from source code is not using bitcoin.conf correctly #75

Closed criadoperez closed 2 years ago

criadoperez commented 2 years ago

Current Dockerfile bitcoin.Dockerfile that builds the bitcoin node from source is not loading the current bitcoin.conf correctly and its ignoring it:

2022-05-10T08:18:54Z Bitcoin Core version v0.21.1 (release build)
2022-05-10T08:18:54Z Assuming ancestors of block 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72 have valid signatures.
2022-05-10T08:18:54Z Setting nMinimumChainWork=00000000000000000000000000000000000000001533efd8d716a517fe2c5008
2022-05-10T08:18:54Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2022-05-10T08:18:54Z Using RdSeed as additional entropy source
2022-05-10T08:18:54Z Using RdRand as an additional entropy source
2022-05-10T08:18:54Z Default data directory /root/.bitcoin
2022-05-10T08:18:54Z Using data directory /root/.bitcoin
2022-05-10T08:18:54Z Warning: The specified config file /etc/bitcoin/bitcoin.conf does not exist

Warning: The specified config file /etc/bitcoin/bitcoin.conf does not exist

2022-05-10T08:18:54Z Command-line arg: conf="/etc/bitcoin/bitcoin.conf"
2022-05-10T08:18:54Z Command-line arg: datadir="/root/.bitcoin"

This issue is being resolved in PR #74 . We no longer need one bitcoin.conf file anyway, but two (one for mainnet and another for testnet). So the unused ./Dockerfiles/bitcoin.conf will be replaced by two bitcoin.conf files, and the bitcoin.Dockerfile needs to be modified accordingly.

criadoperez commented 2 years ago

This has been fixed with the PR leaving as we can see in these logs:

2022-05-10T09:30:09Z Config file arg: [test] rpcbind=****
2022-05-10T09:30:09Z Config file arg: [test] rpcport="18332"
2022-05-10T09:30:09Z Command-line arg: conf="/etc/bitcoin/bitcoin.conf"
2022-05-10T09:30:09Z Command-line arg: datadir="/root/.bitcoin"
2022-05-10T09:30:09Z Command-line arg: debuglogfile=false