feat(consensus): gate NSM LTS support#7
Closed
evan-forbes wants to merge 2 commits into
Closed
Conversation
024eaea to
f2c0ae5
Compare
ed552f1 to
9b7ed85
Compare
f2c0ae5 to
bd846aa
Compare
9b7ed85 to
462d082
Compare
bd846aa to
aa60d6c
Compare
462d082 to
026728c
Compare
The `format_upgrades` list unconditionally included a 27.1.0 NoMigration entry for the LTS value-pool format. The migration apply loop in `apply_format_upgrade` iterates over every upgrade whose version is greater than the on-disk version, with no upper bound at the running version, and calls `mark_as_upgraded_to` for each. In a default build (nsm off) the running database version is 27.0.0. When such a build upgrades any older database it would reach the 27.1.0 entry and `mark_as_upgraded_to` would trip its `format_upgrade_version <= running_version` assertion, panicking the format-change thread. The reference branch never hit this because it is an always-nsm build whose running version is 27.1.0. Gate the 27.1.0 entry behind `cfg(zcash_unstable = "nsm")` so default builds never see an upgrade version newer than their own running version. This keeps the entry only in nsm builds, where the running version is also 27.1.0 and the assertion holds. Switched the array to a Vec so the entry can be cfg-gated in place.
aa60d6c to
0f00f0f
Compare
026728c to
33cc897
Compare
ValarDragon
pushed a commit
that referenced
this pull request
Jun 12, 2026
* feat: add Ubuntu package command (#9) Cherry-pick the Ubuntu packaging helper from `/home/evan/src/zcash/nu7-testnet` so this fork can build an Ubuntu release binary through `cargo xtask package ubuntu`. Issue: not linked; no issue was provided in the request. - Add an `xtask` workspace crate with the `package ubuntu` command. - Add `docker/ubuntu-package.Dockerfile` for the Docker-based Ubuntu build. - Update the Docker context allowlist and cargo config needed by the packaging flow. - `cargo fmt --all -- --check` - `cargo check -p xtask` - `git diff --check origin/main..HEAD` Note: I did not run `cargo xtask package ubuntu` because it performs a Docker release build. Used Codex to cherry-pick the xtask Ubuntu packaging work from the NU7 testnet worktree, apply rustfmt, run focused validation, and prepare this PR description. (cherry picked from commit 5ab24f2e386772c2ad4b7788a68930a10d019103) * feat: add JSONL tracing crate (#7) ## Motivation Cherry-pick the reusable JSONL tracing package from `/home/evan/src/zcash/nu7-testnet` so the fork can share non-blocking JSONL trace writing support without pulling every individual tracing call site. Issue: not linked; no issue was provided in the request. ## Solution - Add the `zebra-jsonl-trace` workspace crate. - Register it in the workspace. - Include the package lockfile entries needed by the crate. ## Tests - `cargo fmt --all -- --check` - `cargo test -p zebra-jsonl-trace` - `git diff --check origin/main..HEAD` ## AI Disclosure Used Codex to cherry-pick the JSONL tracing package from the NU7 testnet worktree, resolve the workspace-member conflict, run focused validation, and prepare this PR description. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> (cherry picked from commit b27b508009f0bdeb3806ae93c9ae18ba3ff075a7) * feat(chain): add local testnet genesis generation (#8) ## Motivation Cherry-pick the local genesis creation work from `/home/evan/src/zcash/nu7-testnet` so this fork can generate custom local testnet seed chains with funded transparent keys. Issue: not linked; no issue was provided in the request. ## Solution - Add `zebra_chain::local_genesis` for generating local testnet genesis and premine blocks. - Add the follow-up local-genesis fixes from the NU7 branch while dropping unrelated RPC/getblocktemplate devnet response changes from that source commit. - Adapt coinbase input construction to the current 4.5.0 `zebra-chain` transparent input API. ## Tests - `cargo fmt --all -- --check` - `cargo check -p zebra-chain` - `git diff --check origin/main..HEAD` ## AI Disclosure Used Codex to cherry-pick and adapt the local genesis generation work from the NU7 testnet worktree, resolve version drift against this fork, run focused validation, and prepare this PR description. (cherry picked from commit 235006267f2157afc7aeaaba399eba5a7c1ad30e) * fix(state): increase reorg window to 1000 blocks (cherry picked from commit 3c33139) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
|
Closing as no longer needed. |
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.
Motivation
Port NSM/LTS behavior while keeping default Zebra builds and database behavior upstream-compatible.
Solution
Add LTS pool accounting, ZIP-235/NSM payout validation, GBT payout calculation, and NSM pool RPC exposure behind zcash_unstable="nsm". Compile-time checks require nsm builds to also enable nu7 and zip235. Default builds do not use the NSM value-pool encoding or DB minor-version bump.
Tests
AI Disclosure
Used OpenAI Codex to inspect the branch stack, resolve cherry-pick conflicts, implement gating/test fixes, and run verification.