Skip to content

Conversation

@pinheadmz
Copy link
Contributor

Besides the test and one utility tweak, this PR is entirely yaml and helm stuff.

How it works:

  • Two new images are defined and hosted on our dockerhub repo. They are both tor nodes configured as tor relays (not just clients) and one has extra configuration as a directory authority with hard-coded, pre-generated authority keys. The fingerprints of those keys is hard-coded in the torrc files for the relays.

  • New warnet plugin "tor" helm-installs a 1-pod chart before anything else in the network, that starts the tor DA. It also spawns a service which is used by all tor nodes in the network to resolve the IP address of the DA. That IP address is then "echo'd" into the torrc files, which can not accept a domain name for configuratioN!

# network.yaml

plugins:
  preDeploy:
    tor:
      entrypoint: "../../../resources/plugins/tor"
  • Each bitcoin tank that needs tor access gets configured with a tor container and bitcoin.conf stuff:
# node-defaults.yaml

defaultConfig: |
  debug=net
  debug=tor
  proxy=127.0.0.1:9050
  listen=1
  onlynet=onion
  torcontrol=127.0.0.1:9051

extraContainers:
  - name: tor
    image: bitcoindevproject/tor-relay:latest
    ports:
      - name: toror
        containerPort: 9001
        protocol: TCP

The test takes a really long time -- like maybe around 15 minutes on my macbook, this maybe can be optimized in the future but I'm also ok with disabling it on ci

@pinheadmz pinheadmz merged commit 072aeca into bitcoin-dev-project:main May 30, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bring back Tor in k8s

1 participant