e3a8b25850
* Rename service for nitro node * Update nitro node setup * Rename nitro-contracts image to nitro-client * Fix nitro node config setup * Add env variable for deterministic deployment * Keep nitro-contracts service running * Start nitro-bridge service after asset file is ready * Update environment variables for all services * Use quotes for bridge address * Update nitro-node and bridge stack readme * Fix nitro-node readme --------- Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
49 lines
1.3 KiB
Bash
Executable File
49 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
set -x
|
|
fi
|
|
|
|
node_config_file="/app/config.toml"
|
|
|
|
echo "Using the following environment variables:"
|
|
echo "NITRO_USE_DURABLE_STORE: ${NITRO_USE_DURABLE_STORE}"
|
|
echo "NITRO_MSG_PORT: ${NITRO_MSG_PORT}"
|
|
echo "NITRO_RPC_PORT: ${NITRO_RPC_PORT}"
|
|
echo "NITRO_SC_PK: ${NITRO_SC_PK}"
|
|
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_L2: ${NITRO_L2}"
|
|
|
|
echo "Using Nitro contract addresses:"
|
|
echo "NA_ADDRESS: ${NA_ADDRESS}"
|
|
echo "CA_ADDRESS: ${CA_ADDRESS}"
|
|
echo "VPA_ADDRESS: ${VPA_ADDRESS}"
|
|
echo "BRIDGE_ADDRESS: ${BRIDGE_ADDRESS}"
|
|
|
|
# Create required certs
|
|
./create-certs.sh
|
|
|
|
# Create the required config file
|
|
cat <<EOF > "$node_config_file"
|
|
usedurablestore = ${NITRO_USE_DURABLE_STORE}
|
|
msgport = ${NITRO_MSG_PORT}
|
|
rpcport = ${NITRO_RPC_PORT}
|
|
pk = "${NITRO_SC_PK}"
|
|
chainpk = "${NITRO_CHAIN_PK}"
|
|
chainurl = "${NITRO_CHAIN_URL}"
|
|
bootpeers = "${NITRO_BOOTPEERS}"
|
|
bridgepublicip = "${NITRO_PUBLIC_P2P_HOST}"
|
|
l2 = ${NITRO_L2}
|
|
|
|
naaddress = "${NA_ADDRESS}"
|
|
vpaaddress = "${CA_ADDRESS}"
|
|
caaddress = "${VPA_ADDRESS}"
|
|
bridgeaddress = "${BRIDGE_ADDRESS}"
|
|
EOF
|
|
|
|
# Start the node
|
|
./nitro -config $node_config_file
|