diff --git a/seednode/bisq.env b/seednode/bisq.env index cece3dc9e1..4fb6e2540b 100644 --- a/seednode/bisq.env +++ b/seednode/bisq.env @@ -45,3 +45,8 @@ BISQ_DUMP_BLOCKCHAIN=false # set to true for BSQ markets BISQ_DUMP_STATISTICS=false + +# burning man +BISQ_BM_FULLNODE=true +BISQ_BM_ORACLE_NODE_PUBKEY=__BISQ_BM_ORACLE_NODE_PUBKEY__ +BISQ_BM_ORACLE_NODE_PRIVKEY=__BISQ_BM_ORACLE_NODE_PRIVKEY__ diff --git a/seednode/bisq.service b/seednode/bisq.service index 3a16c4f7a0..3e02c98e5f 100644 --- a/seednode/bisq.service +++ b/seednode/bisq.service @@ -12,7 +12,6 @@ EnvironmentFile=/etc/default/bisq.env ExecStart=/bin/bash __BISQ_HOME__/__BISQ_REPO_NAME__/${BISQ_ENTRYPOINT} \ --fullDaoNode=${BISQ_DAO_FULLNODE} \ - --isBmFullNode=${BISQ_DAO_FULLNODE} \ --userDataDir=${BISQ_HOME} \ --appName=${BISQ_APP_NAME} \ --baseCurrencyNetwork=${BISQ_BASE_CURRENCY} \ @@ -31,6 +30,9 @@ ExecStart=/bin/bash __BISQ_HOME__/__BISQ_REPO_NAME__/${BISQ_ENTRYPOINT} \ --torControlPort=${BISQ_EXTERNAL_TOR_PORT} \ --torControlUseSafeCookieAuth=${BISQ_EXTERNAL_TOR_CONTROL_USE_COOKIE} \ --torControlCookieFile=${BISQ_EXTERNAL_TOR_CONTROL_COOKIE_FILE} \ + --isBmFullNode=${BISQ_BM_FULLNODE} \ + --bmOracleNodePubKey=${BISQ_BM_ORACLE_NODE_PUBKEY} \ + --bmOracleNodePrivKey=${BISQ_BM_ORACLE_NODE_PRIVKEY} \ ExecStop=/bin/kill ${MAINPID} ; sleep 5 Restart=on-failure diff --git a/seednode/install_seednode_debian.sh b/seednode/install_seednode_debian.sh index 2b7501186f..dbe94800e3 100755 --- a/seednode/install_seednode_debian.sh +++ b/seednode/install_seednode_debian.sh @@ -134,7 +134,14 @@ fi sudo sed -i -e "s/__BISQ_REPO_NAME__/${BISQ_REPO_NAME}/" "${SYSTEMD_SERVICE_HOME}/bisq.service" sudo sed -i -e "s!__BISQ_HOME__!${BISQ_HOME}!" "${SYSTEMD_SERVICE_HOME}/bisq.service" -echo "[*] Installing Bisq environment file with Bitcoin RPC credentials" +echo "[*] Generating ECDSA key for BM oracle node" +key=$(openssl ecparam -name secp256k1 -genkey) +# Extract the private key in hex format +BISQ_BM_ORACLE_NODE_PRIVKEY=$(echo "$key" | openssl ec -text -noout 2>/dev/null | awk '/priv:/{flag=1;next}/pub:/{flag=0}flag' | tr -d ' \n:') +# Extract the compressed public key in hex format +BISQ_BM_ORACLE_NODE_PUBKEY=$(echo "$key" | openssl ec -pubout -conv_form compressed -outform DER 2>/dev/null | tail -c 33 | xxd -p | tr -d '\n') + +echo "[*] Installing Bisq environment file" sudo -H -i -u "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/bisq.env" "${SYSTEMD_ENV_HOME}/bisq.env" sudo sed -i -e "s/__BITCOIN_P2P_HOST__/${BITCOIN_P2P_HOST}/" "${SYSTEMD_ENV_HOME}/bisq.env" sudo sed -i -e "s/__BITCOIN_P2P_PORT__/${BITCOIN_P2P_PORT}/" "${SYSTEMD_ENV_HOME}/bisq.env" @@ -146,6 +153,8 @@ sudo sed -i -e "s/__BITCOIN_RPC_BLOCKNOTIFY_HOST__/${BITCOIN_RPC_BLOCKNOTIFY_HOS sudo sed -i -e "s/__BITCOIN_RPC_BLOCKNOTIFY_PORT__/${BITCOIN_RPC_BLOCKNOTIFY_PORT}/" "${SYSTEMD_ENV_HOME}/bisq.env" sudo sed -i -e "s!__BISQ_APP_NAME__!${BISQ_APP_NAME}!" "${SYSTEMD_ENV_HOME}/bisq.env" sudo sed -i -e "s!__BISQ_HOME__!${BISQ_HOME}!" "${SYSTEMD_ENV_HOME}/bisq.env" +sudo sed -i -e "s!__BISQ_BM_ORACLE_NODE_PUBKEY__!${BISQ_BM_ORACLE_NODE_PUBKEY}!" "${SYSTEMD_ENV_HOME}/bisq.env" +sudo sed -i -e "s!__BISQ_BM_ORACLE_NODE_PRIVKEY__!${BISQ_BM_ORACLE_NODE_PRIVKEY}!" "${SYSTEMD_ENV_HOME}/bisq.env" echo "[*] Checking out Bisq ${BISQ_LATEST_RELEASE}" sudo -H -i -u "${BISQ_USER}" sh -c "cd ${BISQ_HOME}/${BISQ_REPO_NAME} && git checkout ${BISQ_LATEST_RELEASE}"