Skip to content

Commit

Permalink
Run cotez_node
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsereda committed May 10, 2024
1 parent b66b08d commit e627532
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/etherlink/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ARG OCTEZ_PROTO
COPY --from=octez /usr/local/bin/octez-smart-rollup-node-${OCTEZ_PROTO} /usr/bin/octez-smart-rollup-node
COPY --from=octez /usr/local/bin/octez-client /usr/bin/octez-client
COPY --from=octez /usr/local/bin/octez-evm-node /usr/bin/octez-evm-node
COPY --from=octez /usr/local/bin/octez-node /usr/bin/octez-node
COPY --from=builder /build/bin/wasm_2_0_0/ /root/wasm_2_0_0/
ARG PACKAGE
COPY --from=builder /build/bin/${PACKAGE}_installer.wasm /root/kernel.wasm
Expand Down
19 changes: 19 additions & 0 deletions build/etherlink/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ if [ -z "$NODE_URI" ]; then
endpoint="https://rpc.tzkt.io/$NETWORK"
fi

TZNETWORK_ADDRESS="https://teztnets.com/$NETWORK"
SNAPSHOT_URL="https://snapshots.eu.tzinit.org/$NETWORK/rolling"

command=$1
shift 1

Expand All @@ -41,6 +44,18 @@ import_key() {
fi
}

run_octez_node() {
octez-node config init --network "$TZNETWORK_ADDRESS"

if [[ -n ${SNAPSHOT_URL} ]]; then
mkdir -p /snapshot
wget -O "/snapshot" "${SNAPSHOT_URL}"
octez-node snapshot import /snapshot
fi

octez-node run --rpc-addr=0.0.0.0:8732 --allow-all-rpc 0.0.0.0
}

run_node() {
import_key

Expand Down Expand Up @@ -119,6 +134,9 @@ send_message() {
}

case $command in
run_octez_node)
run_octez_node
;;
run_node)
run_node
;;
Expand All @@ -142,6 +160,7 @@ case $command in
Available commands:
Daemons:
- run_octez_node
- run_node
- run_sequencer
Expand Down

0 comments on commit e627532

Please sign in to comment.