feat(consensus): disallow version 4 transactions at NU7 - #856
Open
evan-forbes wants to merge 5 commits into
Open
feat(consensus): disallow version 4 transactions at NU7#856evan-forbes wants to merge 5 commits into
evan-forbes wants to merge 5 commits into
Conversation
This was referenced Sep 1, 2026
evan-forbes
force-pushed
the
feat/zip218-blocktime-reduction
branch
from
September 5, 2026 05:22
c418772 to
25eb882
Compare
evan-forbes
force-pushed
the
feat/zip2003-disallow-v4
branch
from
September 5, 2026 05:22
0ba4e21 to
81b6ba0
Compare
evan-forbes
marked this pull request as ready for review
September 5, 2026 05:24
evan-forbes
force-pushed
the
feat/zip2003-disallow-v4
branch
from
September 5, 2026 05:28
81b6ba0 to
cfbbc0f
Compare
czarcas7ic
reviewed
Sep 5, 2026
evan-forbes
force-pushed
the
feat/zip2003-disallow-v4
branch
from
September 7, 2026 07:46
cfbbc0f to
0f0b551
Compare
evan-forbes
force-pushed
the
feat/zip218-blocktime-reduction
branch
from
September 7, 2026 08:13
e76fe49 to
d2a03db
Compare
evan-forbes
force-pushed
the
feat/zip2003-disallow-v4
branch
3 times, most recently
from
September 7, 2026 15:54
ef528e4 to
df3ac3d
Compare
evan-forbes
force-pushed
the
feat/zip218-blocktime-reduction
branch
from
September 7, 2026 16:11
d40db49 to
123c7cf
Compare
evan-forbes
force-pushed
the
feat/zip2003-disallow-v4
branch
from
September 7, 2026 16:11
df3ac3d to
97bca39
Compare
…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
force-pushed
the
feat/zip2003-disallow-v4
branch
from
September 7, 2026 16:27
97bca39 to
a5467a0
Compare
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
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-experimentalCargo 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, andNeverchoices 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.