diff --git a/docs/introduction/howtoget.rst b/docs/introduction/howtoget.rst index 6ed19ab8625768fac76f876c2b71a48fea3a2b2f..7db0401669fe13cc268b0748928f79bf944466c4 100644 --- a/docs/introduction/howtoget.rst +++ b/docs/introduction/howtoget.rst @@ -408,7 +408,8 @@ environment variables: - ``NODE_HOST``: The name of the node container (defaults to ``node``). - ``NODE_RPC_PORT``: The RPC port **inside the container** the node listens to (defaults to ``8732``). - ``NODE_RPC_ADDR``: The RPC address **inside the container** the node binds to (defaults to ``[::]``). -- ``PROTOCOL``: The protocol used. +- ``PROTOCOL``: The protocol used (if the protocol is not provided, + ``octez-baker`` and ``octez-accuser`` will be used). These variables can be set in the docker-compose file, as demonstrated in :src:`scripts/docker/alpha.yml`:: diff --git a/scripts/docker/entrypoint.inc.sh b/scripts/docker/entrypoint.inc.sh index 9ff1d95fffd97a9d7caf6f9fff18672fb24ec5c2..acc90841f16327ccbaf01d164c3649a44372e7f6 100644 --- a/scripts/docker/entrypoint.inc.sh +++ b/scripts/docker/entrypoint.inc.sh @@ -5,7 +5,6 @@ node=${node:?} client=${client:?} admin_client=${admin_client:?} baker=${baker:?} -endorser=${endorser:?} accuser=${accuser:?} signer=${signer:?} smart_rollup_node=${smart_rollup_node:?} @@ -137,14 +136,6 @@ launch_node() { if [ "$i" = "--help" ]; then exit 0; fi done - # Generate a new identity if not present - - if [ ! -f "$node_data_dir/identity.json" ]; then - echo "Generating a new node identity..." - "$node" identity generate "${IDENTITY_POW:-26}". \ - --data-dir "$node_data_dir" - fi - configure_client # Launching the node @@ -186,24 +177,6 @@ launch_baker_test() { run with local node "$node_data_dir" "$@" } -launch_endorser() { - configure_client - wait_for_the_node_to_be_bootstrapped - exec "$endorser" --chain main \ - --base-dir "$client_dir" \ - --endpoint "http://$NODE_HOST:$NODE_RPC_PORT" \ - run "$@" -} - -launch_endorser_test() { - configure_client - wait_for_the_node_to_be_bootstrapped - exec "$endorser" --chain test \ - --base-dir "$client_dir" \ - --endpoint "http://$NODE_HOST:$NODE_RPC_PORT" \ - run "$@" -} - launch_accuser() { configure_client wait_for_the_node_to_be_bootstrapped @@ -225,7 +198,7 @@ launch_smart_rollup_node() { configure_client if [ ! -f "$smart_rollup_node_data_dir/config.json" ]; then - echo "Configuring the rollup node..." + echo "Configuring the smart rollup node..." "$smart_rollup_node" init observer config \ for "$SOR_ALIAS_OR_ADDR" \ with operators \ diff --git a/scripts/docker/entrypoint.sh b/scripts/docker/entrypoint.sh index 31579eed97500cce053f70d3ef14bfb6cbbc8b81..fedadfee542e36bf1068589cf2d21722953969f7 100755 --- a/scripts/docker/entrypoint.sh +++ b/scripts/docker/entrypoint.sh @@ -14,15 +14,18 @@ bin_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")" # outside world. : "${NODE_RPC_ADDR:="[::]"}" -: "${PROTOCOL:="unspecified-PROTOCOL-variable"}" - # export all these variables to be used in the inc script export node="$BIN_DIR/octez-node" export client="$BIN_DIR/octez-client" export admin_client="$BIN_DIR/octez-admin-client" -export baker="$BIN_DIR/octez-baker-$PROTOCOL" -export endorser="$BIN_DIR/octez-endorser-$PROTOCOL" -export accuser="$BIN_DIR/octez-accuser-$PROTOCOL" +# Set default only if PROTOCOL is unset or empty +if [ -z "$PROTOCOL" ]; then + export baker="$BIN_DIR/octez-baker" + export accuser="$BIN_DIR/octez-accuser" +else + export baker="$BIN_DIR/octez-baker-$PROTOCOL" + export accuser="$BIN_DIR/octez-accuser-$PROTOCOL" +fi export signer="$BIN_DIR/octez-signer" export smart_rollup_node="$BIN_DIR/octez-smart-rollup-node" @@ -53,12 +56,6 @@ octez-baker) octez-baker-test) launch_baker_test "$@" ;; -octez-endorser) - launch_endorser "$@" - ;; -octez-endorser-test) - launch_endorser_test "$@" - ;; octez-accuser) launch_accuser "$@" ;; @@ -89,12 +86,11 @@ entrypoint using --entrypoint . All binaries are in $BIN_DIR and the tezos data in $DATA_DIR You can specify the network with argument --network, for instance: - --network carthagenet -(default is mainnet). + --network mainnet Daemons: - octez-node [args] - Initialize a new identity and run the octez node. + Run the octez node. - octez-smart-rollup-node [args] Run the octez smart rollup node.