Skip to content

Commit a074c0a

Browse files
committed
docker: enhance swap type selection and unexpose makerd port
1 parent 1312a0b commit a074c0a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ services:
8989
9090
makerd -t "$${TOR_AUTH_PASSWORD}" -r $${BITCOIN_RPC_HOST} -a $${BITCOIN_RPC_AUTH} $${MAKERD_EXTRA_ARGS} -w "$$WALLET_NAME"
9191
ports:
92-
- "${MAKERD_PORT:-6102}:${MAKERD_PORT:-6102}"
9392
- "${MAKERD_RPC_PORT:-6103}:${MAKERD_RPC_PORT:-6103}"
9493
volumes:
9594
- maker-data:/home/coinswap/.coinswap

docker-setup

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,22 @@ configure_setup() {
465465
read -p "Makerd RPC port [${DEFAULT_MAKERD_RPC_PORT}]: " makerd_rpc
466466
MAKERD_RPC_PORT="${makerd_rpc:-$DEFAULT_MAKERD_RPC_PORT}"
467467

468-
read -p "Use Taproot (experimental)? [Y/n]: " use_taproot
469-
if [[ "${use_taproot:-Y}" =~ ^[Yy]$ ]]; then
468+
echo ""
469+
echo "Select Swap Type:"
470+
echo ""
471+
echo " 1) Taproot (Recommended New Protocol)"
472+
echo " - Contract Tx with [Musig2 + Taproot HTLC]. Cheaper swap fees, more private. "
473+
echo ""
474+
echo " 2) Legacy (Original Atomic Swap Protocol)"
475+
echo " - Contract Tx with [2of2 Multisig + P2WSH HTLC]. Higher swap fees, less private."
476+
echo -e "${YELLOW}NOTE:${NC}"
477+
echo -e "${YELLOW} Currently, a maker can only perform Legacy or Taproot swaps, but cannot perform both.${NC}"
478+
echo -e "${YELLOW} Although it can handle both taproot and legacy transactions for regular wallet operations.${NC}"
479+
echo -e "${YELLOW} If you wanna serve both types of swap in the market, run two separate makers of each type.${NC}"
480+
echo -e "${YELLOW} You can use the existing bitcoind Docker sockets for the second maker too to avoid multiple node IBD.${NC}"
481+
read -p "Selected Option [1]: " swap_type
482+
483+
if [[ "${swap_type:-1}" == "1" ]]; then
470484
USE_TAPROOT="true"
471485
else
472486
USE_TAPROOT="false"

0 commit comments

Comments
 (0)