Skip to content

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

Open
evan-forbes wants to merge 5 commits into
feat/zip218-blocktime-reductionfrom
feat/zip2003-disallow-v4
Open

feat(consensus): disallow version 4 transactions at NU7#856
evan-forbes wants to merge 5 commits into
feat/zip218-blocktime-reductionfrom
feat/zip2003-disallow-v4

Conversation

@evan-forbes

@evan-forbes evan-forbes commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Motivation

The candidate NU7 decision deprecates Sprout by disallowing version 4 transactions at NU7. Zakura needs one fixed consensus boundary for that decision. NU7 remains subject to change before deployment.

Solution

The off-by-default nu7-experimental Cargo feature makes Zakura reject version 4 transactions at the exact NU7 activation height. A default build and a network without an explicit NU7 activation continue to accept version 4 transactions.

The implementation does not expose a configurable deprecation policy or height. This removes the former AtNu7, AtHeight, and Never choices from consensus configuration.

The exact NU7 lookup matters for networks that omit NU7 but configure a later upgrade. A general network-upgrade lookup can substitute the later activation height. This branch searches the activation list for NU7 itself.

Testing

Tests cover the last valid height, the NU7 activation height, and later heights. They cover builds with and without nu7-experimental. They also cover an omitted NU7 and a later upgrade without NU7.

The audit passed the chain and consensus unit suites. Formatting and diff checks also passed.

Changelog

Added docs/changelog/unreleased/856.md.

Specifications & References

Follow-up Work

A deployment PR will replace the experimental feature with finalized NU7 rules and set the activation parameters.

Comment thread crates/zakura-chain/src/parameters/network.rs Outdated
@evan-forbes
evan-forbes force-pushed the feat/zip2003-disallow-v4 branch from cfbbc0f to 0f0b551 Compare September 7, 2026 07:46
@evan-forbes evan-forbes changed the title feat(consensus): implement ZIP 2003 with a configurable deprecation height feat(consensus): disallow version 4 transactions at NU7 Sep 7, 2026
@evan-forbes
evan-forbes force-pushed the feat/zip218-blocktime-reduction branch from e76fe49 to d2a03db Compare September 7, 2026 08:13
@evan-forbes
evan-forbes force-pushed the feat/zip2003-disallow-v4 branch 3 times, most recently from ef528e4 to df3ac3d Compare September 7, 2026 15:54
@evan-forbes
evan-forbes force-pushed the feat/zip218-blocktime-reduction branch from d40db49 to 123c7cf Compare September 7, 2026 16:11
@evan-forbes
evan-forbes force-pushed the feat/zip2003-disallow-v4 branch from df3ac3d to 97bca39 Compare September 7, 2026 16:11
…eight

Implements ZIP 2003 "Disallow version 4 transactions". Zakura already
rejected V4 transactions at NU7, but the height was welded to the NU7
activation height. The NU7 scope polls offer three deprecation dates, so
`V4Deprecation` names the choice instead:

- `AtNu7`, the ZIP 2003 default and today's behaviour, resolving to the
  NU7 activation height. A network that does not activate NU7 keeps
  accepting V4 transactions.
- `AtHeight(height)`, for a network that activates NU7 and deprecates V4
  transactions later.
- `Never`, for a network that keeps accepting V4 transactions.

`verify_v4_transaction_network_upgrade` now rejects on the resolved
height rather than on the NU7 arm of its network upgrade match, so
Mainnet and the default Testnet keep the rule they have today.

Testnet configures the choice through `testnet_parameters.v4_deprecation`,
which accepts `"nu7"`, `"never"`, or a block height.
@evan-forbes
evan-forbes force-pushed the feat/zip2003-disallow-v4 branch from 97bca39 to a5467a0 Compare September 7, 2026 16:27
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