Browse Source

Fix more collisions

main
Luke Childs 2 months ago
parent
commit
62d1a2a8f5
  1. 8
      test-deps-bitcoin/docker-compose.yml
  2. 71
      test-deps-bitcoin/exports.sh
  3. 2
      test-deps-bitcoin/umbrel-app.yml

8
test-deps-bitcoin/docker-compose.yml

@ -4,8 +4,8 @@ services:
app_proxy:
environment:
APP_HOST: $APP_BITCOIN_IP
APP_PORT: 3005
APP_PORT: 3069
server:
image: getumbrel/umbrel-bitcoin:v0.8.0@sha256:38465d8e3744223201993950954f0644841587d741e66d200d92b68ca719e6c1
depends_on: [bitcoind]
@ -14,7 +14,7 @@ services:
- ${APP_DATA_DIR}/data/app:/data # volume to persist advanced settings json
- ${APP_BITCOIN_DATA_DIR}:/bitcoin/.bitcoin # volume to persist umbrel-bitcoin.conf and bitcoin.conf
environment:
PORT: "3005"
PORT: "3069"
BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}"
RPC_PORT: "${APP_BITCOIN_RPC_PORT}"
BITCOIN_RPC_PORT: "${APP_BITCOIN_RPC_PORT}"
@ -66,7 +66,7 @@ services:
networks:
default:
ipv4_address: "${APP_BITCOIN_TOR_PROXY_IP}"
i2pd_daemon:
image: purplei2p/i2pd:release-2.44.0@sha256:d154a599793c393cf9c91f8549ba7ece0bb40e5728e1813aa6dd4c210aa606f6
user: "root"

71
test-deps-bitcoin/exports.sh

@ -1,16 +1,19 @@
export APP_BITCOIN_IP="10.21.22.2"
export APP_BITCOIN_NODE_IP="10.21.21.8"
export APP_BITCOIN_TOR_PROXY_IP="10.21.22.10"
export APP_BITCOIN_I2P_DAEMON_IP="10.21.22.11"
export APP_BITCOIN_IP="10.21.69.5"
export APP_BITCOIN_NODE_IP="10.21.69.7"
export APP_BITCOIN_TOR_PROXY_IP="10.21.69.12"
export APP_BITCOIN_I2P_DAEMON_IP="10.21.69.13"
export APP_BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin"
export APP_BITCOIN_RPC_PORT="8332"
export APP_BITCOIN_P2P_PORT="8333"
export APP_BITCOIN_TOR_PORT="8334"
export APP_BITCOIN_ZMQ_RAWBLOCK_PORT="28332"
export APP_BITCOIN_ZMQ_RAWTX_PORT="28333"
export APP_BITCOIN_ZMQ_HASHBLOCK_PORT="28334"
export APP_BITCOIN_ZMQ_SEQUENCE_PORT="28335"
export APP_BITCOIN_RPC_PORT="9692"
export APP_BITCOIN_P2P_PORT="9693"
export APP_BITCOIN_TOR_PORT="9694"
export APP_BITCOIN_ZMQ_RAWBLOCK_PORT="69332"
export APP_BITCOIN_ZMQ_RAWTX_PORT="69333"
export APP_BITCOIN_ZMQ_HASHBLOCK_PORT="69334"
export APP_BITCOIN_ZMQ_SEQUENCE_PORT="69335"
export APP_BITCOIN_INTERNAL_RPC_PORT="8332"
export APP_BITCOIN_INTERNAL_P2P_PORT="8333"
export APP_BITCOIN_INTERNAL_tor_PORT="8334"
BITCOIN_CHAIN="main"
BITCOIN_ENV_FILE="${EXPORTS_APP_DIR}/.env"
@ -24,9 +27,7 @@ BITCOIN_ENV_FILE="${EXPORTS_APP_DIR}/.env"
"main")
BITCOIN_NETWORK="mainnet";;
"test")
BITCOIN_NETWORK="testnet3";;
"testnet4")
BITCOIN_NETWORK="testnet4";;
BITCOIN_NETWORK="testnet";;
"signet")
BITCOIN_NETWORK="signet";;
"regtest")
@ -66,16 +67,11 @@ fi
if [[ "${APP_BITCOIN_NETWORK}" == "mainnet" ]]; then
BITCOIN_CHAIN="main"
elif [[ "${APP_BITCOIN_NETWORK}" == "testnet3" ]]; then
elif [[ "${APP_BITCOIN_NETWORK}" == "testnet" ]]; then
BITCOIN_CHAIN="test"
# export APP_BITCOIN_RPC_PORT="18332"
# export APP_BITCOIN_P2P_PORT="18333"
# export APP_BITCOIN_TOR_PORT="18334"
elif [[ "${APP_BITCOIN_NETWORK}" == "testnet4" ]]; then
BITCOIN_CHAIN="testnet4"
# export APP_BITCOIN_RPC_PORT="48332"
# export APP_BITCOIN_P2P_PORT="48333"
# export APP_BITCOIN_TOR_PORT="48334"
elif [[ "${APP_BITCOIN_NETWORK}" == "signet" ]]; then
BITCOIN_CHAIN="signet"
# export APP_BITCOIN_RPC_PORT="38332"
@ -90,7 +86,7 @@ else
echo "Warning (${EXPORTS_APP_ID}): Bitcoin Network '${APP_BITCOIN_NETWORK}' is not supported"
fi
export BITCOIN_DEFAULT_NETWORK="${BITCOIN_CHAIN}"
export BITCOIN_KNOTS_DEFAULT_NETWORK="${BITCOIN_CHAIN}"
BIN_ARGS=()
# Commenting out options that are replaced by generated config file. We should migrate all these over in a future update.
@ -101,7 +97,6 @@ BIN_ARGS=()
# BIN_ARGS+=( "-bind=${APP_BITCOIN_NODE_IP}" )
# BIN_ARGS+=( "-port=${APP_BITCOIN_P2P_PORT}" )
# BIN_ARGS+=( "-rpcport=${APP_BITCOIN_RPC_PORT}" )
# We hardcode the ports p2p and rpc ports to always be the same for all networks
BIN_ARGS+=( "-port=8333" )
BIN_ARGS+=( "-rpcport=8332" )
BIN_ARGS+=( "-rpcbind=${APP_BITCOIN_NODE_IP}" )
@ -118,10 +113,9 @@ BIN_ARGS+=( "-zmqpubsequence=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_SEQUENCE_PORT}" )
# BIN_ARGS+=( "-peerbloomfilters=1" )
# BIN_ARGS+=( "-peerblockfilters=1" )
# BIN_ARGS+=( "-rpcworkqueue=128" )
BIN_ARGS+=( "-blocknotify='curl -s -m 5 http://datum_datum_1:21000/NOTIFY'" )
# We can remove depratedrpc=create_bdb in a future update once Jam (JoinMarket) implements descriptor wallet support
BIN_ARGS+=( "-deprecatedrpc=create_bdb" )
# Required for LND compatibility. We can remove deprecatedrpc=warnings in a future update once LND releases a version with this fix: https://github.com/btcsuite/btcd/pull/2245
BIN_ARGS+=( "-deprecatedrpc=warnings" )
export APP_BITCOIN_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}")
@ -138,28 +132,7 @@ if [[ "${APP_BITCOIN_NETWORK_ELECTRS}" = "mainnet" ]]; then
APP_BITCOIN_NETWORK_ELECTRS="bitcoin"
fi
{
# Migrate settings for app updates differently to fresh installs
BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin"
IS_POST_ADVANCED_SETTINGS_INSTALL_FILE_PATH="${EXPORTS_APP_DIR}/data/app/IS_POST_ADVANCED_SETTINGS_INSTALL"
# If no blocks directory exists, we write out a file to indicate that this is a fresh install.
# This gets around the issue of the pre-start hook starting up the bitcoind container early for Tor HS creation
# and creating the blocks directory.
if [[ ! -d "${BITCOIN_DATA_DIR}/blocks" ]] && [[ ! -d "${BITCOIN_DATA_DIR}/testnet3/blocks" ]] && [[ ! -d "${BITCOIN_DATA_DIR}/regtest/blocks" ]]
then
touch "${IS_POST_ADVANCED_SETTINGS_INSTALL_FILE_PATH}"
fi
APP_CONFIG_EXISTS="false"
if [[ -f "${EXPORTS_APP_DIR}/data/app/bitcoin-config.json" ]]
then
APP_CONFIG_EXISTS="true"
fi
if [[ ! -f "${IS_POST_ADVANCED_SETTINGS_INSTALL_FILE_PATH}" ]] && [[ "${APP_CONFIG_EXISTS}" = "false" ]]
then
# This app is not a fresh install, it's being updated, so preserve existing clearnet over Tor setting
export BITCOIN_INITIALIZE_WITH_CLEARNET_OVER_TOR="true"
fi
} || true
# Add special handling for knots internal/external port mismatch.
# This must appear above the below loop.
export APP_BITCOIN_RPC_PORT="${APP_BITCOIN_INTERNAL_RPC_PORT}"
export APP_BITCOIN_P2P_PORT="${APP_BITCOIN_INTERNAL_P2P_PORT}"

2
test-deps-bitcoin/umbrel-app.yml

@ -32,7 +32,7 @@ website: https://umbrel.com
dependencies: []
repo: https://github.com/getumbrel/umbrel-bitcoin
support: https://community.getumbrel.com/c/bitcoin-and-lightning
port: 2100
port: 2169
gallery:
- 1.jpg
- 2.jpg

Loading…
Cancel
Save