fedimint / fedimint-docker

6 stars 5 forks source link

bitcoin.conf missing line breaks #1

Closed hensg closed 3 months ago

hensg commented 3 months ago

After installing it and trying to access the bitcoind (not esplora), I found a few small issues:

docker container name.

The message says bitcoind but in my installation it has another name.

WARNING: Your new local bitcoind node is now syncing
This may take a while, you can check the progress with:
docker exec -it bitcoind bitcoin-cli getblockchaininfo
$ docker ps --format '{{.Names}}'
fedimint-service-guardian-ui-1
fedimint-service-bitcoind-1
traefik
fedimint-service-fedimintd-1

bitcoin.conf

It seems that is missing some line breaks here

$ docker exec -it fedimint-service-bitcoind-1 sh
# ls
bin  boot  data  dev  entrypoint.sh  etc  home  lib  lib32  lib64  libx32  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
# ls data
banlist.json  bitcoin.conf  bitcoind.pid  blocks  chainstate  debug.log  peers.dat  settings.json
# cat data/bitcoin.conf
mainnet=1
[main]
printtoconsole=1
rpcallowip=::/0
rpcuser=bitcoin rpcpassword=bitcoin prune=550 assumevalid=00000000000000000001e216eb9b0e6ee1ce404c218575571fae2d79363e07af

Let me know if this is a real issue or If I made any mistake.

Kodylow commented 3 months ago

I'm passing those in as "bitcoin_extra_args" which I think is fine that way where it ends up on 1 line, the fedimint-service tacking is annoying but I think that's because it's launching within the directory. Would it be better to not create and use the directory so it doesn't do the fedimint-service- or to rename everything to assume the fedimint-service- prefix? not sure what best practice for docker container naming is

hensg commented 3 months ago

Bear in mind that the "all in one line" conf won't be parsed well by bitcoin-cli / bitcoind. (ref: https://github.com/bitcoin/bitcoin/blob/v27.1/src/common/config.cpp#L35-L71). So, futher usage of the bitcoin-cli in the docker will require -rpcpassword=xx

Regarding the naming and dir, there is no standard, up to you... I was only point out that the docker exec message is a bit misleading.

Kodylow commented 3 months ago

kk updating the service naming and will update the extra args to be multiliene