Skip to content

feat(consensus): disallow version 4 transactions at NU7 - #959

Draft
ValarDragon wants to merge 4 commits into
mainfrom
feat/zip2003-disallow-v4-main
Draft

feat(consensus): disallow version 4 transactions at NU7#959
ValarDragon wants to merge 4 commits into
mainfrom
feat/zip2003-disallow-v4-main

Conversation

@ValarDragon

@ValarDragon ValarDragon commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

ZIP 2003 deprecates Sprout by disallowing version 4 transactions at NU7. The original implementation in #856 was merged into the unmerged ZIP 218 branch rather than main, so it needs a focused replacement on the current codebase.

Solution

When the off-by-default nu7-experimental feature is enabled, reject version 4 transactions from the configured network exact NU7 activation height onward. Default builds and networks without an explicit NU7 activation continue accepting V4 transactions in post-NU5 eras.

Resolve NU7 directly inside zakura-consensus, avoiding the two public zakura-chain::Network helpers added by #856. A later configured upgrade therefore cannot substitute for an omitted NU7 activation.

The build-feature prerequisite landed in #958. This branch is rebased directly onto main after that merge.

Testing

  • cargo test --locked -p zakura-consensus --lib: 235 passed, 1 ignored
  • cargo test --locked -p zakura-consensus --lib --features nu7-experimental: 235 passed, 1 ignored
  • cargo test --locked -p zakura-consensus v4_deprecation_boundary in both build configurations
  • cargo clippy --locked -p zakura-consensus --all-targets -- -D warnings
  • cargo clippy --locked -p zakura-consensus --all-targets --features nu7-experimental -- -D warnings
  • cargo fmt --all -- --check
  • markdownlint docs/changelog/unreleased/959.md --config .github/.markdownlint.yaml
  • ./scripts/changelog.py check
  • git diff --check

The boundary test covers the height immediately before NU7, the activation height, a later height, the default build, the feature-enabled build, and a network that omits NU7.

Changelog

Added docs/changelog/unreleased/959.md.

Specifications & References

Follow-up Work

None.

@ValarDragon
ValarDragon force-pushed the feat/zip2003-disallow-v4-main branch from 8f4eec1 to 3ad0a89 Compare September 10, 2026 13:51
Base automatically changed from build/nu7-experimental-feature-main to main September 10, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants