Skip to content

Commit 940d869

Browse files
committed
feat: update default branch for subnet management scripts
- Changed default branch from 'main' to 'storage-node-fix' in `ipc-subnet-manager.sh`, `bootstrap.sh`, and `health.sh` to align with current development practices. - Updated documentation and examples throughout the scripts to reflect the new default branch, ensuring consistency in usage and clarity for users.
1 parent 808da6a commit 940d869

3 files changed

Lines changed: 19 additions & 18 deletions

File tree

scripts/ipc-subnet-manager/ipc-subnet-manager.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ source "${SCRIPT_DIR}/lib/bootstrap.sh"
3030
source "${SCRIPT_DIR}/lib/dashboard.sh"
3131

3232
# Global variables
33+
DEFAULT_BUILD_BRANCH="storage-node-fix"
3334
VALIDATORS=()
3435
DRY_RUN=false
3536
DEBUG=false
@@ -74,7 +75,7 @@ Options:
7475
--dry-run Preview actions without executing
7576
--yes Skip confirmation prompts
7677
--debug Show verbose debug output
77-
--branch NAME For bootstrap/update-binaries: git branch to pull from (default: main)
78+
--branch NAME For bootstrap/update-binaries: git branch to pull from (default: $DEFAULT_BUILD_BRANCH)
7879
--compile MODE For update-binaries: 'local' or 'remote' (default: remote)
7980
--git-pull For update-binaries: fetch/pull latest changes before build (default: off)
8081
--with-storage For bootstrap/update-binaries: build ipc-storage feature and storage binaries
@@ -94,14 +95,14 @@ Examples:
9495
$0 restart --mode local --yes # Restart local subnet
9596
9697
# Remote mode (multiple machines via SSH)
97-
$0 bootstrap --branch main --with-storage # First: bootstrap fresh hosts (with storage binaries)
98+
$0 bootstrap --branch $DEFAULT_BUILD_BRANCH --with-storage # First: bootstrap fresh hosts (with storage binaries)
9899
$0 init # Then: initialize subnet from scratch
99100
$0 init --resume # Resume after deploy (skip wipe/deploy)
100101
$0 init --debug # Initialize with verbose debug output
101102
$0 check # Run health checks
102-
$0 update-binaries --branch main # Update binaries from main branch
103-
$0 update-binaries -C local --branch main # Build locally, deploy to validators
104-
$0 update-binaries --branch main --with-storage # Update binaries with storage support
103+
$0 update-binaries --branch $DEFAULT_BUILD_BRANCH # Update binaries from default branch
104+
$0 update-binaries -C local --branch $DEFAULT_BUILD_BRANCH # Build locally, deploy to validators
105+
$0 update-binaries --branch $DEFAULT_BUILD_BRANCH --with-storage # Update binaries with storage support
105106
$0 deploy-binaries --path ./target/release # Copy binaries to all validators
106107
$0 watch-finality # Monitor parent finality progress
107108
$0 watch-blocks # Monitor block production
@@ -154,7 +155,7 @@ confirm() {
154155

155156
# Bootstrap validator hosts - install deps and build IPC
156157
cmd_bootstrap() {
157-
local branch="main"
158+
local branch="$DEFAULT_BUILD_BRANCH"
158159
local with_storage=false
159160

160161
while [[ $# -gt 0 ]]; do
@@ -182,7 +183,7 @@ Bootstrap validator hosts with IPC and dependencies
182183
Usage: $0 bootstrap [options]
183184
184185
Options:
185-
--branch NAME Git branch to clone (default: main)
186+
--branch NAME Git branch to clone (default: $DEFAULT_BUILD_BRANCH)
186187
--with-storage Build ipc-storage feature and storage binaries
187188
--config FILE Path to config file
188189
--dry-run Preview without executing
@@ -443,7 +444,7 @@ cmd_init() {
443444

444445
# Update binaries on all validators
445446
cmd_update_binaries() {
446-
local branch="main"
447+
local branch="$DEFAULT_BUILD_BRANCH"
447448
local compile_mode="remote"
448449
local with_storage=false
449450
local git_pull=false
@@ -470,7 +471,7 @@ Update IPC binaries on all validators
470471
Usage: $0 update-binaries [options]
471472
472473
Options:
473-
--branch NAME Git branch to build from (default: main)
474+
--branch NAME Git branch to build from (default: $DEFAULT_BUILD_BRANCH)
474475
--compile MODE Where to build: 'local' or 'remote' (default: remote)
475476
-C MODE Short for --compile
476477
--git-pull Fetch/pull latest changes before build (default: off)
@@ -485,11 +486,11 @@ Compile modes:
485486
Requires: cargo-zigbuild + zig (recommended) or cross (needs Docker).
486487
487488
Examples:
488-
$0 update-binaries --branch main
489-
$0 update-binaries --branch main --compile local
490-
$0 update-binaries -C local --branch main
491-
$0 update-binaries --branch main --git-pull
492-
$0 update-binaries --branch main --with-storage
489+
$0 update-binaries --branch $DEFAULT_BUILD_BRANCH
490+
$0 update-binaries --branch $DEFAULT_BUILD_BRANCH --compile local
491+
$0 update-binaries -C local --branch $DEFAULT_BUILD_BRANCH
492+
$0 update-binaries --branch $DEFAULT_BUILD_BRANCH --git-pull
493+
$0 update-binaries --branch $DEFAULT_BUILD_BRANCH --with-storage
493494
EOF
494495
exit 0
495496
;;

scripts/ipc-subnet-manager/lib/bootstrap.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Usage: bootstrap_validator_host <validator_idx> [branch]
66
bootstrap_validator_host() {
77
local validator_idx="$1"
8-
local branch="${2:-main}"
8+
local branch="${2:-storage-node-fix}"
99
local with_storage="${3:-false}"
1010

1111
local name="${VALIDATORS[$validator_idx]}"
@@ -194,7 +194,7 @@ bootstrap_validator_host() {
194194
# Bootstrap all validator hosts
195195
# Usage: bootstrap_all_hosts [branch]
196196
bootstrap_all_hosts() {
197-
local branch="${1:-main}"
197+
local branch="${1:-storage-node-fix}"
198198
local with_storage="${2:-false}"
199199

200200
log_header "Bootstrap Validator Hosts"

scripts/ipc-subnet-manager/lib/health.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,7 @@ update_validator_binaries() {
21302130
# Build IPC binaries locally (with cross-compilation for macOS->Linux)
21312131
# On success, writes binary directory path to $3 (result file). Returns 0/1.
21322132
build_ipc_locally() {
2133-
local branch="${1:-main}"
2133+
local branch="${1:-storage-node-fix}"
21342134
local local_repo="$2"
21352135
local result_file="$3"
21362136
local with_storage="${4:-false}"
@@ -2414,7 +2414,7 @@ deploy_binaries_only() {
24142414

24152415
# Update binaries on all validators
24162416
update_all_binaries() {
2417-
local branch="${1:-main}"
2417+
local branch="${1:-storage-node-fix}"
24182418
local compile_mode="${2:-remote}"
24192419
local with_storage="${3:-false}"
24202420
local do_git_pull="${4:-false}"

0 commit comments

Comments
 (0)