diff --git a/bin/basicswap_prepare.py b/bin/basicswap_prepare.py index 9e128db..650c77c 100755 --- a/bin/basicswap_prepare.py +++ b/bin/basicswap_prepare.py @@ -153,9 +153,9 @@ PART_RPC_USER = os.getenv('PART_RPC_USER', '') PART_RPC_PWD = os.getenv('PART_RPC_PWD', '') XMR_RPC_HOST = os.getenv('XMR_RPC_HOST', '127.0.0.1') -BASE_XMR_RPC_PORT = int(os.getenv('BASE_XMR_RPC_PORT', 29798)) -BASE_XMR_ZMQ_PORT = int(os.getenv('BASE_XMR_ZMQ_PORT', 30898)) -BASE_XMR_WALLET_PORT = int(os.getenv('BASE_XMR_WALLET_PORT', 29998)) +XMR_RPC_PORT = int(os.getenv('XMR_RPC_PORT', 29798)) +XMR_ZMQ_PORT = int(os.getenv('XMR_ZMQ_PORT', 30898)) +XMR_WALLET_PORT = int(os.getenv('XMR_WALLET_PORT', 29998)) XMR_WALLET_RPC_HOST = os.getenv('XMR_WALLET_RPC_HOST', '127.0.0.1') XMR_WALLET_RPC_USER = os.getenv('XMR_WALLET_RPC_USER', 'xmr_wallet_user') XMR_WALLET_RPC_PWD = os.getenv('XMR_WALLET_RPC_PWD', 'xmr_wallet_pwd') @@ -164,9 +164,9 @@ XMR_RPC_PWD = os.getenv('XMR_RPC_PWD', '') DEFAULT_XMR_RESTORE_HEIGHT = int(os.getenv('DEFAULT_XMR_RESTORE_HEIGHT', 2245107)) WOW_RPC_HOST = os.getenv('WOW_RPC_HOST', '127.0.0.1') -BASE_WOW_RPC_PORT = int(os.getenv('BASE_WOW_RPC_PORT', 34598)) -BASE_WOW_ZMQ_PORT = int(os.getenv('BASE_WOW_ZMQ_PORT', 34698)) -BASE_WOW_WALLET_PORT = int(os.getenv('BASE_WOW_WALLET_PORT', 34798)) +WOW_RPC_PORT = int(os.getenv('WOW_RPC_PORT', 34598)) +WOW_ZMQ_PORT = int(os.getenv('WOW_ZMQ_PORT', 34698)) +WOW_WALLET_PORT = int(os.getenv('WOW_WALLET_PORT', 34798)) WOW_WALLET_RPC_HOST = os.getenv('WOW_WALLET_RPC_HOST', '127.0.0.1') WOW_WALLET_RPC_USER = os.getenv('WOW_WALLET_RPC_USER', 'wow_wallet_user') WOW_WALLET_RPC_PWD = os.getenv('WOW_WALLET_RPC_PWD', 'wow_wallet_pwd') @@ -1897,9 +1897,9 @@ def main(): 'connection_type': 'rpc' if 'monero' in with_coins else 'none', 'manage_daemon': True if ('monero' in with_coins and XMR_RPC_HOST == '127.0.0.1') else False, 'manage_wallet_daemon': True if ('monero' in with_coins and XMR_WALLET_RPC_HOST == '127.0.0.1') else False, - 'rpcport': BASE_XMR_RPC_PORT + port_offset, - 'zmqport': BASE_XMR_ZMQ_PORT + port_offset, - 'walletrpcport': BASE_XMR_WALLET_PORT + port_offset, + 'rpcport': XMR_RPC_PORT + port_offset, + 'zmqport': XMR_ZMQ_PORT + port_offset, + 'walletrpcport': XMR_WALLET_PORT + port_offset, 'rpchost': XMR_RPC_HOST, 'trusted_daemon': extra_opts.get('trust_remote_node', 'auto'), 'walletrpchost': XMR_WALLET_RPC_HOST, @@ -1978,9 +1978,9 @@ def main(): 'connection_type': 'rpc' if 'wownero' in with_coins else 'none', 'manage_daemon': True if ('wownero' in with_coins and WOW_RPC_HOST == '127.0.0.1') else False, 'manage_wallet_daemon': True if ('wownero' in with_coins and WOW_WALLET_RPC_HOST == '127.0.0.1') else False, - 'rpcport': BASE_WOW_RPC_PORT + port_offset, - 'zmqport': BASE_WOW_ZMQ_PORT + port_offset, - 'walletrpcport': BASE_WOW_WALLET_PORT + port_offset, + 'rpcport': WOW_RPC_PORT + port_offset, + 'zmqport': WOW_ZMQ_PORT + port_offset, + 'walletrpcport': WOW_WALLET_PORT + port_offset, 'rpchost': WOW_RPC_HOST, 'trusted_daemon': extra_opts.get('trust_remote_node', 'auto'), 'walletrpchost': WOW_WALLET_RPC_HOST, diff --git a/doc/install.md b/doc/install.md index 44fba93..c53aa79 100644 --- a/doc/install.md +++ b/doc/install.md @@ -71,8 +71,8 @@ Setup with a local Monero daemon (recommended): To instead use Monero public nodes and not run a local Monero daemon<br>(it can be difficult to find reliable public nodes): - Set XMR_RPC_HOST and BASE_XMR_RPC_PORT to a public XMR node. - docker-compose run --rm -e XMR_RPC_HOST="node.xmr.to" -e BASE_XMR_RPC_PORT=18081 swapclient basicswap-prepare --datadir=/coindata --withcoins=monero --htmlhost="0.0.0.0" --wshost="0.0.0.0" --xmrrestoreheight=$CURRENT_XMR_HEIGHT + Set XMR_RPC_HOST and XMR_RPC_PORT to a public XMR node. + docker-compose run --rm -e XMR_RPC_HOST="node.xmr.to" -e XMR_RPC_PORT=18081 swapclient basicswap-prepare --datadir=/coindata --withcoins=monero --htmlhost="0.0.0.0" --wshost="0.0.0.0" --xmrrestoreheight=$CURRENT_XMR_HEIGHT **Record the mnemonic from the output of the above command.** @@ -190,7 +190,7 @@ Prepare the datadir: basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --xmrrestoreheight=$CURRENT_XMR_HEIGHT OR using a remote/public XMR daemon (not recommended): - XMR_RPC_HOST="node.xmr.to" BASE_XMR_RPC_PORT=18081 basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --xmrrestoreheight=$CURRENT_XMR_HEIGHT + XMR_RPC_HOST="node.xmr.to" XMR_RPC_PORT=18081 basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --xmrrestoreheight=$CURRENT_XMR_HEIGHT Record the mnemonic from the output of the above command. diff --git a/docker/production/compose-fragments/1_monero-wallet.yml b/docker/production/compose-fragments/1_monero-wallet.yml index 94c5810..ee19981 100644 --- a/docker/production/compose-fragments/1_monero-wallet.yml +++ b/docker/production/compose-fragments/1_monero-wallet.yml @@ -7,7 +7,7 @@ volumes: - ${DATA_PATH}/monero_wallet:/data expose: - - ${BASE_XMR_WALLET_PORT} + - ${XMR_WALLET_PORT} logging: driver: "json-file" options: diff --git a/docker/production/compose-fragments/8_monero-daemon.yml b/docker/production/compose-fragments/8_monero-daemon.yml index 9990f65..114be8a 100644 --- a/docker/production/compose-fragments/8_monero-daemon.yml +++ b/docker/production/compose-fragments/8_monero-daemon.yml @@ -7,7 +7,7 @@ volumes: - ${DATA_PATH}/monero_daemon:/data expose: - - ${BASE_XMR_RPC_PORT} + - ${XMR_RPC_PORT} logging: driver: "json-file" options: diff --git a/docker/production/compose-fragments/9_swapprepare.yml b/docker/production/compose-fragments/9_swapprepare.yml index f6aa102..42905f7 100644 --- a/docker/production/compose-fragments/9_swapprepare.yml +++ b/docker/production/compose-fragments/9_swapprepare.yml @@ -39,11 +39,11 @@ - LTC_RPC_PWD - XMR_DATA_DIR - XMR_RPC_HOST - - BASE_XMR_RPC_PORT - - BASE_XMR_ZMQ_PORT + - XMR_RPC_PORT + - XMR_ZMQ_PORT - XMR_WALLETS_DIR - XMR_WALLET_RPC_HOST - - BASE_XMR_WALLET_PORT + - XMR_WALLET_PORT - XMR_WALLET_RPC_USER - XMR_WALLET_RPC_PWD - DEFAULT_XMR_RESTORE_HEIGHT diff --git a/docker/production/example.env b/docker/production/example.env index 44d9fad..0faecd9 100644 --- a/docker/production/example.env +++ b/docker/production/example.env @@ -36,11 +36,11 @@ DCR_RPC_PWD=decred_pass XMR_DATA_DIR=/data/monero_daemon XMR_RPC_HOST=monero_daemon -BASE_XMR_RPC_PORT=29798 +XMR_RPC_PORT=29798 XMR_WALLETS_DIR=/data/monero_wallet XMR_WALLET_RPC_HOST=monero_wallet -BASE_XMR_WALLET_PORT=29998 +XMR_WALLET_PORT=29998 XMR_WALLET_RPC_USER=xmr_wallet_user XMR_WALLET_RPC_PWD=xmr_wallet_pwd