- Load WELIST_PING_DELEGATION_FILE into a typed OnionDelegation - Send the certificate only with v2 pings for onion hosts - Validate the onion host, expiry and delegated key against BAL_SERVER_URL and SSL_KEY_PATH at startup; disable delegation with a warning on any mismatch - Stop sending unsigned info/base_fee/version with v1 pings so v1 remains liveness-only - Document v1/v2 metadata handling and onion delegation implications - Add contrib/make_onion_delegation.py to issue certificates offline, with Ed25519 key validation and clean CLI error handling
75 lines
3.0 KiB
Plaintext
75 lines
3.0 KiB
Plaintext
# Gitea API Token for releases
|
|
# Get this from your gitea settings: https://bitcoin-after.life/gitea/user-settings/applications
|
|
# DO NOT commit the real token to git!
|
|
# This file is in .gitignore and should not be committed to git
|
|
GITEA_API_TOKEN=your_gitea_api_token_here
|
|
# If a token was ever committed, revoke it and set a new one via the environment.
|
|
|
|
# === bal-server ===
|
|
# !!! WARNING: Never bind to 0.0.0.0 in production. Use 127.0.0.1 and place
|
|
# Nginx with TLS in front. Direct exposure will leak transaction data !!!
|
|
RUST_LOG=info
|
|
BAL_SERVER_DB_FILE=/var/bal/bal.db
|
|
BAL_SERVER_BIND_ADDRESS=127.0.0.1
|
|
BAL_SERVER_BIND_PORT=9137
|
|
BAL_SERVER_INFO="BAL server production"
|
|
BAL_SERVER_PUB_KEY_PATH=/var/bal/public_key.pem
|
|
|
|
BAL_SERVER_BITCOIN_ADDRESS="your_bitcoin_or_xpub_address"
|
|
BAL_SERVER_BITCOIN_FIXED_FEE=50000
|
|
|
|
# Actix Web DoS Protection Settings
|
|
BAL_SERVER_ACTIX_MAX_BODY_SIZE=1048576
|
|
BAL_SERVER_ACTIX_TIMEOUT_SECS=5
|
|
BAL_SERVER_ACTIX_PUSHTXS_PER_SEC=1
|
|
BAL_SERVER_ACTIX_PUSHTXS_BURST=3
|
|
BAL_SERVER_ACTIX_SEARCHTX_PER_SEC=5
|
|
BAL_SERVER_ACTIX_SEARCHTX_BURST=10
|
|
BAL_SERVER_ACTIX_INFO_PER_SEC=20
|
|
BAL_SERVER_ACTIX_INFO_BURST=30
|
|
BAL_SERVER_ACTIX_DEFAULT_PER_SEC=50
|
|
BAL_SERVER_ACTIX_DEFAULT_BURST=100
|
|
BAL_SERVER_ACTIX_WORKERS=4
|
|
BAL_SERVER_ACTIX_MAX_CONNECTIONS=100
|
|
|
|
# === PostgreSQL (optional; used by pg-server.sh) ===
|
|
# pg-server.sh requires BAL_PG_PASSWORD to be set; never commit a real password.
|
|
BAL_PG_PASSWORD=change_me
|
|
BAL_PG_USER=bal
|
|
BAL_PG_DB=baldb
|
|
# Docker volume that stores the database, so the container can be recreated
|
|
# without losing data.
|
|
BAL_PG_VOLUME=bal-pg-data
|
|
# Interface on which the container publishes port 5432. Keep 127.0.0.1 so the
|
|
# database listens on loopback only; 0.0.0.0 would expose it on every interface.
|
|
BAL_PG_BIND_ADDR=127.0.0.1
|
|
|
|
# === bal-pusher ===
|
|
BAL_SERVER_DB_FILE=/var/bal/bal.db
|
|
BAL_PUSHER_BITCOIN_DIR=/home/bal/.bitcoin
|
|
BAL_PUSHER_SEND_STATS=false
|
|
BAL_SERVER_URL=http://127.0.0.1:9137
|
|
SSL_KEY_PATH=/var/bal/private_key.pem
|
|
WELIST_SERVER_URL=https://welist.bitcoin-after.life
|
|
# Sign WeTime pings with the v2 canonical JSON scheme. Requires a DNSSEC-
|
|
# validated `_welist-key.<host>` TXT record (or a v3 onion address). Omit or
|
|
# set to 1 for the legacy scheme.
|
|
WELIST_PING_SIG_VERSION=2
|
|
# Onion hosts only: delegation certificate issued offline by the onion identity
|
|
# key. SSL_KEY_PATH is then the dedicated ping key, not the identity key.
|
|
# WELIST_PING_DELEGATION_FILE=/var/bal/onion-delegation.json
|
|
|
|
# ZMQ endpoints per network (default: localhost only)
|
|
BAL_PUSHER_BITCOIN_ZMQ_HASHBLOCK=tcp://127.0.0.1:28332
|
|
BAL_PUSHER_REGTEST_ZMQ_HASHBLOCK=tcp://127.0.0.1:23332
|
|
BAL_PUSHER_TESTNET_ZMQ_HASHBLOCK=tcp://127.0.0.1:24332
|
|
BAL_PUSHER_TESTNET4_ZMQ_HASHBLOCK=tcp://127.0.0.1:22332
|
|
BAL_PUSHER_SIGNET_ZMQ_HASHBLOCK=tcp://127.0.0.1:21332
|
|
|
|
# RPC endpoints per network (default: localhost only)
|
|
BAL_PUSHER_BITCOIN_RPC_URL=http://127.0.0.1:8332
|
|
BAL_PUSHER_REGTEST_RPC_URL=http://127.0.0.1:18443
|
|
BAL_PUSHER_TESTNET_RPC_URL=http://127.0.0.1:18332
|
|
BAL_PUSHER_TESTNET4_RPC_URL=http://127.0.0.1:48332
|
|
BAL_PUSHER_SIGNET_RPC_URL=http://127.0.0.1:38332
|