reverse-hash / bitcoin-full-node-with-docker

A simple way to deploy your own node with Docker! 🐳
MIT License
7 stars 5 forks source link

Various suggestions and fixes #6

Closed cozybear-dev closed 4 months ago

cozybear-dev commented 1 year ago

Hi @reverse-hash,

This is my current branch I run personally. I run it on a ARM based board, and ran into some issues which I fixed. Amongst other minor things. I'm aware you can't merge it as is, but wanted to share it already like this just so you're aware.

cozybear-dev commented 1 year ago

Btw, you could also just clone the cmehay repo, build in that repo, and change the docker compose file with;

git clone https://github.com/cmehay/docker-tor-hidden-service
cd ./docker-tor-hidden-service
docker buildx build -f Dockerfile -t goldy/tor-hidden-service:arm64-0.4.7.13 .
services:
  tor:
    image: goldy/tor-hidden-service:arm64-0.4.7.13
    volumes:
      - tor-keys:/var/lib/tor/hidden_service/
    restart: on-failure
    environment:
      - TOR_SOCKS_PORT="172.18.0.2:9050"
    networks:
      default:
        ipv4_address: 172.18.0.2

But generally, that's more tedious and you have quite some bloat. There's still a chance I'll go this route as I want a custom onion address which is supported in that image. But again shouldn't be too hard to implement it in this image as well though...

cozybear-dev commented 1 year ago

You don't even need to do anything for custom onion addresses I see, it's already location in the volume that is mounted. So just enable the hidden services, tor will create them for you. Shut everything down, replace the files - done.

reverse-hash commented 1 year ago

Hi @cozybear-dev, I will try to check everything during the weekend and the next week. Thanks a lot for all the effort and time for sharing.

I leave this open in case I have any questions.

cozybear-dev commented 1 year ago

Hi,

Another update on my setup;

My data disk is a HDD, which is quite slow for the whole bootstrapping (loading all blocks). I read online you can improve the process by locating the relevant dirs at faster storage - which I did and it does.

Blocks is the data heavy part, which is on the HDD. The rest of the data (currently around 20G) is located on my fast sdcard, with a symlink inside the directory to the block location on the HDD. Using volumes in this order + with the symlink; you can mount overlapping volumes to the container without creating conflicts.

The indexing performance increased using this method. Disk read speeds are now 400% faster.

volumes:

cozybear-dev commented 1 year ago

This looks as follows;

image

reverse-hash commented 1 year ago

Hi @cozybear-dev, following your suggestions I updated the project to create Tor from sources. I've pending to verify the signature of the tags, but it's working.

In: I also noticed that you hadn't disabled the dns traffic in the config, such requests go over clearnet. To be fair, if you really want to be tor only, you'd need to proxy in a different way anyways - but why not use the option if it's available.

Do you mean in bitcoind.conf? I've updated the config files to set dns=0 and dnsseed=0. Let me know if I'm wrong.

I will try to continue investigating a bit the rest of thigs you were sugesting. Regards.

cozybear-dev commented 1 year ago

Yes, that was what my comment was regarding.

I ended up not using it altogether as I don't require Tor only and want the additional integrity garuantees (eclipse attack vector) by also connecting to clearnet nodes.

reverse-hash commented 4 months ago

Already integrated in main branch. Thanks Cozybear. Closing.