feat: combine NU7 join into one script that downloads released binaries#4
Merged
Conversation
Joining the NU7 testnet previously took two scripts: a downloader wrapper (in the zebra fork) and a join script generated by `kresko join-bundle` and embedded in each bundle, which built Zebra and kresko from source on the host. Combine them into a single committed script, scripts/join-nu7-testnet.sh, and switch to prebuilt binaries: - The script downloads the join bundle, validates its hashes, then downloads and checksum-verifies the prebuilt zebrad (release tarball) and kresko (release binary) named in the bundle manifest. No rustup/cargo/clang/git on the host; runtime deps shrink to curl/jq/tar/tmux/chrony/python3. - The bundle is now data-only (manifest, zebrad.join.toml, local_genesis/*); `kresko join-bundle` no longer emits a script. Its manifest and CLI carry release coordinates (repo + tag) instead of git URLs/refs. - The release workflow attaches join-nu7-testnet.sh as a release asset. - docs/regenerate_join_bundle_example.md updated for the binary flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The join bundle is run-specific (genesis + live bootstrap-peer IPs), so it can't be built by the release CI. Add an operator one-shot: scripts/publish-join-bundle.sh --run-dir <dir> [--tag v0.1.0] It runs `kresko join-bundle`, compresses to nu7-join-bundle.tar.gz (+ .sha256), validates it with `join-nu7-testnet.sh --dry-run`, and `gh release upload`s it (--clobber). Gives joiners a stable --bundle-url on the release. Defaults to valargroup/kresko @ v0.1.0; --skip-upload builds without uploading; args after `--` forward to `kresko join-bundle`. docs/regenerate_join_bundle_example.md documents this as the primary publish path and points the join examples at the release bundle URL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- join-nu7-testnet.sh resets any prior NU7 join install before seeding (stops nu7-zebrad/nu7-mine, kills zebrad/kresko, clears /opt/nu7-testnet + logs + configs), guarded against removing "" or "/", so a host can be re-joined without manual cleanup. - publish-join-bundle.sh uploads join-nu7-testnet.sh alongside the bundle by default (--skip-script-upload / --join-script to control), so republishing a bundle keeps the script in sync. - Bump the default --zebra-release-tag to nu7-testnet-v0.1.1 (matches the live bundle on the release) so regenerating a bundle no longer downgrades zebrad. - docs updated for the rerun behavior and the v0.1.1 tag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Joining the NU7 testnet previously took two scripts: a downloader wrapper (in the zebra fork) and a join script generated by
kresko join-bundleand embedded in each bundle, whichgit cloned +cargo buildd both Zebra and kresko from source on the host.This combines them into one committed script —
scripts/join-nu7-testnet.sh— and switches to the prebuilt binaries we now publish on releases.Changes
scripts/join-nu7-testnet.sh(new): downloads the join bundle, validates its hashes, then downloads and checksum-verifies the prebuiltzebrad(release tarball) andkresko(release binary) named in the bundle manifest, seeds local genesis, and starts zebrad (+ optionalkresko mine). No rustup/cargo/clang/git — runtime deps shrink tocurl jq tar tmux chrony python3 libstdc++6. Supports--mine,--miner-address,--foreground,--dry-run, and--zebra-*/--kresko-*overrides.join_bundle.rs/main.rs: the bundle is now data-only (manifest,zebrad.join.toml,local_genesis/*);kresko join-bundleno longer emits a script (~480 lines of embedded template removed). The manifest and CLI carry release coordinates (--zebra-repo/--zebra-release-tag,--kresko-repo/--kresko-release-tag, defaulting tovalargroup/zebra @ nu7-testnet-v0.1.0andvalargroup/kresko @ v0.1.0) instead of git URLs/refs. The script reads these from the manifest, so it stays version-independent.release.yml: attachesjoin-nu7-testnet.shas a release asset. (Thev0.1.0release already has it uploaded.)docs/regenerate_join_bundle_example.md: rewritten for the binary flow.Validation
join_bundletests; release build compiles.bash -nclean;--dry-runvalidates a real bundle; tampered file rejected; overrides + missing-arg handling correct. Real release asset URLs +.sha256formats verified against the script's checksum logic.pow_tuning::…equihash_params— the pinned NU7 Zebra rejects regtest Equihash params; that file is untouched here).Notes
valargroup/zebra.actions/upload-artifactv5→v7 bump is intentionally not here — it stays in ci: bump actions/upload-artifact v5 → v7 (Node 24) #3.🤖 Generated with Claude Code