From 6c482e19706fc0260e21ccb146f099b295aae398 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 12 Feb 2026 21:20:21 +0000 Subject: [PATCH 1/7] add node 10.6.2 --- start-node.sh | 63 +++++++-------------------------------------------- 1 file changed, 8 insertions(+), 55 deletions(-) diff --git a/start-node.sh b/start-node.sh index 1e52ba8..4ca9981 100755 --- a/start-node.sh +++ b/start-node.sh @@ -132,7 +132,7 @@ select connection_type in "${connection_options[@]}"; do done # Define the list of available networks -available_networks=("mainnet" "preprod" "preview" "sanchonet-pig" "sanchonet-chicken") +available_networks=("mainnet" "preprod" "preview" "sanchonet") # If user selected external node configuration @@ -233,7 +233,7 @@ echo echo -e "${CYAN}Setting up Docker node...${NC}" # Define the list of available node versions -available_versions=( "10.5.3" "10.5.1") +available_versions=( "10.6.2" "10.5.3" "10.5.1") # Initialize variables to avoid unbound variable errors network="" @@ -283,11 +283,7 @@ else fi # Normalize network name for directory/container naming -# sanchonet-pig and sanchonet-chicken both normalize to sanchonet network_normalized="$network" -if [ "$network" = "sanchonet-pig" ] || [ "$network" = "sanchonet-chicken" ]; then - network_normalized="sanchonet" -fi # Function to assign a unique port based on version # This ensures different versions on the same network use different ports @@ -395,7 +391,7 @@ dumps_dir="$base_dir/dumps/$network_normalized" utilities_dir="$base_dir/utilities" # Base URL for node config files -if [ "$network" = "sanchonet-pig" ] || [ "$network" = "sanchonet-chicken" ]; then +if [ "$network" = "sanchonet" ]; then config_base_url="https://raw.githubusercontent.com/Hornan7/SanchoNet-Tutorials/refs/heads/main/genesis/" else config_base_url="https://book.play.dev.cardano.org/environments/$network/" @@ -447,9 +443,13 @@ config_files=( "alonzo-genesis.json" "conway-genesis.json" "peer-snapshot.json" - "guardrails-script.plutus" ) +# add dijkstra-genesis.json for 10.6.2 +if [ "$node_version" = "10.6.2" ]; then + config_files+=("dijkstra-genesis.json") +fi + # Change directory to the config directory and download files echo -e "${CYAN}Downloading configuration files...${NC}" cd "$config_dir" || exit @@ -463,53 +463,6 @@ for file in "${config_files[@]}"; do curl --silent -O -J -L "${config_base_url}${file}" done -# Create custom topology.json for sanchonet-chicken -if [ "$network" = "sanchonet-chicken" ]; then - echo -e "${BLUE}Creating custom topology.json for sanchonet-chicken${NC}" - cat > topology.json << 'EOF' -{ - "bootstrapPeers": [ - { - "address": "sanchorelay1.intertreecryptoconsultants.com", - "port": 6002 - } - ], - "localRoots": [ - { - "accessPoints": [ - { - "address": "sanchorelay1.intertreecryptoconsultants.com", - "port": 6002 - }, - { - "address": "9.tcp.eu.ngrok.io", - "port": 20802 - }, - { - "address": "34.19.153.32", - "port": 6002 - }, - { - "address": "relay.hephy.io", - "port": 9000 - } - ], - "advertise": false, - "trustable": true, - "valency": 4 - } - ], - "publicRoots": [ - { - "accessPoints": [], - "advertise": false - } - ], - "useLedgerAfterSlot": -1 -} -EOF -fi - # Return to the base directory cd "$base_dir" || exit From c3aa86ca1720a93eef9dd8a6c308724f76de94ce Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 12 Feb 2026 21:28:01 +0000 Subject: [PATCH 2/7] set pipefail --- start-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start-node.sh b/start-node.sh index 4ca9981..6c5d822 100755 --- a/start-node.sh +++ b/start-node.sh @@ -1,7 +1,7 @@ #!/bin/bash # errors are handled gracefully to tell the user -# set -euo pipefail +set -euo pipefail # ---------------------------------------- ALLOW_MAINNET_EXTERNAL="false" From c05b71c6195200754942736794022e8ecdbbc307 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 12 Feb 2026 21:36:34 +0000 Subject: [PATCH 3/7] improve stop script --- stop-nodes.sh | 55 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/stop-nodes.sh b/stop-nodes.sh index 2e19840..b7c21eb 100755 --- a/stop-nodes.sh +++ b/stop-nodes.sh @@ -1,23 +1,60 @@ #!/bin/bash set -euo pipefail -# Stop all cardano node containers matching the pattern node-*-*-container -# This handles versioned containers (e.g., node-preprod-10.5.3-container) -echo "Stopping all Cardano node containers..." +# Define colors +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +BLUE='\033[0;34m' +CYAN='\033[0;36m' +NC='\033[0m' # No color -# Get all running containers and filter for node-*-*-container pattern +# Get all running containers matching the node pattern containers=$(docker ps --format "{{.Names}}" | grep -E "^node-[^-]+-[^-]+-container$" || true) if [ -z "$containers" ]; then - echo "No Cardano node containers found running." + echo -e "${YELLOW}No Cardano node containers found running.${NC}" exit 0 fi -# Stop each container -for container in $containers; do - echo "Stopping container: $container" +# Convert to array (compatible with Bash 3.x on macOS) +container_list=() +while IFS= read -r line; do + container_list+=("$line") +done <<< "$containers" +count=${#container_list[@]} + +echo -e "${CYAN}Running Cardano node containers:${NC}" +for i in "${!container_list[@]}"; do + echo -e " ${GREEN}$((i + 1))${NC}) ${BLUE}${container_list[$i]}${NC}" +done +echo -e " ${GREEN}$((count + 1))${NC}) ${RED}Stop all${NC}" +echo + +# Prompt user to select which node(s) to stop +echo -e "${CYAN}Select a container to stop (1-$((count + 1))):${NC}" +read -r choice < /dev/tty + +# Validate input +if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -lt 1 ] || [ "$choice" -gt $((count + 1)) ]; then + echo -e "${RED}Invalid selection.${NC}" + exit 1 +fi + +# Build list of containers to stop +if [ "$choice" -eq $((count + 1)) ]; then + stop_list=("${container_list[@]}") +else + stop_list=("${container_list[$((choice - 1))]}") +fi + +# Stop and remove selected containers +for container in "${stop_list[@]}"; do + echo -e "${YELLOW}Stopping: $container${NC}" docker stop "$container" 2>/dev/null || true docker rm "$container" 2>/dev/null || true + echo -e "${GREEN}Stopped: $container${NC}" done -echo "All Cardano node containers stopped." \ No newline at end of file +echo +echo -e "${GREEN}Done.${NC}" From 913e52872197b556f78f616a2d98a23263e48491 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 12 Feb 2026 21:49:57 +0000 Subject: [PATCH 4/7] redo stop nodes for ci --- stop-nodes.sh | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/stop-nodes.sh b/stop-nodes.sh index b7c21eb..043f6db 100755 --- a/stop-nodes.sh +++ b/stop-nodes.sh @@ -24,28 +24,34 @@ while IFS= read -r line; do done <<< "$containers" count=${#container_list[@]} -echo -e "${CYAN}Running Cardano node containers:${NC}" -for i in "${!container_list[@]}"; do - echo -e " ${GREEN}$((i + 1))${NC}) ${BLUE}${container_list[$i]}${NC}" -done -echo -e " ${GREEN}$((count + 1))${NC}) ${RED}Stop all${NC}" -echo +# Non-interactive mode (CI or piped input): stop all containers automatically +if [ ! -t 0 ] && [ ! -t 1 ]; then + echo "Stopping all Cardano node containers..." + stop_list=("${container_list[@]}") +else + # Interactive mode: let user choose + echo -e "${CYAN}Running Cardano node containers:${NC}" + for i in "${!container_list[@]}"; do + echo -e " ${GREEN}$((i + 1))${NC}) ${BLUE}${container_list[$i]}${NC}" + done + echo -e " ${GREEN}$((count + 1))${NC}) ${RED}Stop all${NC}" + echo -# Prompt user to select which node(s) to stop -echo -e "${CYAN}Select a container to stop (1-$((count + 1))):${NC}" -read -r choice < /dev/tty + echo -e "${CYAN}Select a container to stop (1-$((count + 1))):${NC}" + read -r choice < /dev/tty -# Validate input -if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -lt 1 ] || [ "$choice" -gt $((count + 1)) ]; then - echo -e "${RED}Invalid selection.${NC}" - exit 1 -fi + # Validate input + if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -lt 1 ] || [ "$choice" -gt $((count + 1)) ]; then + echo -e "${RED}Invalid selection.${NC}" + exit 1 + fi -# Build list of containers to stop -if [ "$choice" -eq $((count + 1)) ]; then - stop_list=("${container_list[@]}") -else - stop_list=("${container_list[$((choice - 1))]}") + # Build list of containers to stop + if [ "$choice" -eq $((count + 1)) ]; then + stop_list=("${container_list[@]}") + else + stop_list=("${container_list[$((choice - 1))]}") + fi fi # Stop and remove selected containers From ac2ec3f68b5bc56f07c947db9e3b1ae670c1626b Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 12 Feb 2026 21:53:00 +0000 Subject: [PATCH 5/7] reorder versions to fix ci --- start-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start-node.sh b/start-node.sh index 6c5d822..2e9a1ce 100755 --- a/start-node.sh +++ b/start-node.sh @@ -233,7 +233,7 @@ echo echo -e "${CYAN}Setting up Docker node...${NC}" # Define the list of available node versions -available_versions=( "10.6.2" "10.5.3" "10.5.1") +available_versions=( "10.5.3" "10.5.1" "10.6.2" ) # Initialize variables to avoid unbound variable errors network="" From 8284993d546c8051ada5bb55923c371911cfaca6 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 12 Feb 2026 21:53:24 +0000 Subject: [PATCH 6/7] add 10.5.4 --- start-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start-node.sh b/start-node.sh index 2e9a1ce..51254be 100755 --- a/start-node.sh +++ b/start-node.sh @@ -233,7 +233,7 @@ echo echo -e "${CYAN}Setting up Docker node...${NC}" # Define the list of available node versions -available_versions=( "10.5.3" "10.5.1" "10.6.2" ) +available_versions=( "10.5.3" "10.5.4" "10.6.2" ) # Initialize variables to avoid unbound variable errors network="" From bbee5fdf362c13af3932ce7277b22551cffcfeec Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 12 Feb 2026 22:00:53 +0000 Subject: [PATCH 7/7] add checkpoints.json to config --- start-node.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/start-node.sh b/start-node.sh index 51254be..61cef1b 100755 --- a/start-node.sh +++ b/start-node.sh @@ -450,6 +450,11 @@ if [ "$node_version" = "10.6.2" ]; then config_files+=("dijkstra-genesis.json") fi +# add checkpoints.json for preview and mainnet (not available for sanchonet or preprod) +if [ "$network" = "preview" ] || [ "$network" = "mainnet" ]; then + config_files+=("checkpoints.json") +fi + # Change directory to the config directory and download files echo -e "${CYAN}Downloading configuration files...${NC}" cd "$config_dir" || exit