From fe85e744250865fe24372b3ad5bb1dbdca3e7ac0 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 23 Jul 2024 11:46:46 +0000 Subject: [PATCH] Configure extra multiaddr to listen on in nitro-node and bridge setup (#1) Part of [Create bridge channel in go-nitro](https://www.notion.so/Create-bridge-channel-in-go-nitro-22ce80a0d8ae4edb80020a8f250ea270) Requires https://github.com/cerc-io/go-nitro/pull/63 Reviewed-on: https://git.vdb.to/cerc-io/nitro-stack/pulls/1 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- stack-orchestrator/compose/docker-compose-nitro-bridge.yml | 2 ++ stack-orchestrator/compose/docker-compose-nitro-node.yml | 1 + stack-orchestrator/config/go-nitro/run-bridge.sh | 4 ++++ stack-orchestrator/config/go-nitro/run-nitro-node.sh | 4 +++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stack-orchestrator/compose/docker-compose-nitro-bridge.yml b/stack-orchestrator/compose/docker-compose-nitro-bridge.yml index caae62e..f8eeca7 100644 --- a/stack-orchestrator/compose/docker-compose-nitro-bridge.yml +++ b/stack-orchestrator/compose/docker-compose-nitro-bridge.yml @@ -20,6 +20,8 @@ services: NITRO_L2_MSG_PORT: ${NITRO_L2_MSG_PORT:-3006} NITRO_RPC_PORT: ${NITRO_RPC_PORT:-4006} NITRO_PUBLIC_P2P_HOST: ${NITRO_PUBLIC_P2P_HOST:-127.0.0.1} + NITRO_L1_EXT_MULTIADDR: ${NITRO_L1_EXT_MULTIADDR} + NITRO_L2_EXT_MULTIADDR: ${NITRO_L2_EXT_MULTIADDR} NITRO_PUBLIC_RPC_HOST: nitro-bridge entrypoint: ["bash", "-c", "/app/run-bridge.sh"] volumes: diff --git a/stack-orchestrator/compose/docker-compose-nitro-node.yml b/stack-orchestrator/compose/docker-compose-nitro-node.yml index 0ddd1ee..e8f7c0f 100644 --- a/stack-orchestrator/compose/docker-compose-nitro-node.yml +++ b/stack-orchestrator/compose/docker-compose-nitro-node.yml @@ -14,6 +14,7 @@ services: NITRO_CHAIN_URL: ${NITRO_CHAIN_URL} NITRO_BOOTPEERS: ${NITRO_BOOTPEERS} NITRO_PUBLIC_P2P_HOST: ${NITRO_PUBLIC_P2P_HOST:-127.0.0.1} + NITRO_EXT_MULTIADDR: ${NITRO_EXT_MULTIADDR} NITRO_L2: ${NITRO_L2:-false} NA_ADDRESS: ${NA_ADDRESS} CA_ADDRESS: ${CA_ADDRESS} diff --git a/stack-orchestrator/config/go-nitro/run-bridge.sh b/stack-orchestrator/config/go-nitro/run-bridge.sh index a30bb2e..906d84a 100755 --- a/stack-orchestrator/config/go-nitro/run-bridge.sh +++ b/stack-orchestrator/config/go-nitro/run-bridge.sh @@ -18,6 +18,8 @@ echo "NITRO_L1_MSG_PORT: ${NITRO_L1_MSG_PORT}" echo "NITRO_L2_MSG_PORT: ${NITRO_L2_MSG_PORT}" echo "NITRO_RPC_PORT: ${NITRO_RPC_PORT}" echo "NITRO_PUBLIC_P2P_HOST: ${NITRO_PUBLIC_P2P_HOST}" +echo "NITRO_L1_EXT_MULTIADDR: ${NITRO_L1_EXT_MULTIADDR}" +echo "NITRO_L2_EXT_MULTIADDR: ${NITRO_L2_EXT_MULTIADDR}" echo "Waiting for $bridge_assets_map_file to be ready" @@ -40,6 +42,8 @@ nodel1msgport = $NITRO_L1_MSG_PORT nodel2msgport = $NITRO_L2_MSG_PORT rpcport = $NITRO_RPC_PORT bridgepublicip = "$NITRO_PUBLIC_P2P_HOST" +nodel1ExtMultiAddr = "$NITRO_L1_EXT_MULTIADDR" +nodel2ExtMultiAddr = "$NITRO_L2_EXT_MULTIADDR" assetmapfilepath = "$bridge_assets_map_file" EOF diff --git a/stack-orchestrator/config/go-nitro/run-nitro-node.sh b/stack-orchestrator/config/go-nitro/run-nitro-node.sh index 99c1174..958f132 100755 --- a/stack-orchestrator/config/go-nitro/run-nitro-node.sh +++ b/stack-orchestrator/config/go-nitro/run-nitro-node.sh @@ -15,6 +15,7 @@ echo "NITRO_CHAIN_PK: ${NITRO_CHAIN_PK}" echo "NITRO_CHAIN_URL: ${NITRO_CHAIN_URL}" echo "NITRO_BOOTPEERS: ${NITRO_BOOTPEERS}" echo "NITRO_PUBLIC_P2P_HOST: ${NITRO_PUBLIC_P2P_HOST}" +echo "NITRO_EXT_MULTIADDR: ${NITRO_EXT_MULTIADDR}" echo "NITRO_L2: ${NITRO_L2}" echo "Using Nitro contract addresses:" @@ -35,7 +36,8 @@ pk = "${NITRO_SC_PK}" chainpk = "${NITRO_CHAIN_PK}" chainurl = "${NITRO_CHAIN_URL}" bootpeers = "${NITRO_BOOTPEERS}" -bridgepublicip = "${NITRO_PUBLIC_P2P_HOST}" +publicip = "${NITRO_PUBLIC_P2P_HOST}" +extMultiAddr = "${NITRO_EXT_MULTIADDR}" l2 = ${NITRO_L2} naaddress = "${NA_ADDRESS}"