Skip to content

Bump CURRENT_NETWORK_PROTOCOL_VERSION to 170_150 for NU7 - #162

Open
0xpierre-dev wants to merge 2 commits into
QED-it:zsa1from
0xpierre-dev:fix/nu7-regtest-protocol-version
Open

Bump CURRENT_NETWORK_PROTOCOL_VERSION to 170_150 for NU7#162
0xpierre-dev wants to merge 2 commits into
QED-it:zsa1from
0xpierre-dev:fix/nu7-regtest-protocol-version

Conversation

@0xpierre-dev

Copy link
Copy Markdown

On a single-node regtest started from testnet-single-node-deploy/dockerfile
(tested at zsa-integration-demo @ 2b036fd; the same code is present on
zsa1), zebrad aborts about ten seconds after the block at the NU7
activation height (height 1 with the shipped config) is accepted:

thread 'tokio-rt-worker' panicked at zebra-network/src/protocol/external/types.rs:41:9:
Zebra does not implement the minimum specified Nu7 protocol version for Regtest { activation_heights: {Height(0): Genesis, Height(1): Nu7}, ... }

Cause: zebra-network/src/constants.rs ships
CURRENT_NETWORK_PROTOCOL_VERSION = Version(170_140), while
min_specified_for_upgrade requires 170_150 for (Testnet(regtest), Nu7)
(types.rs line 119). Once the tip reaches activation, the peer set's
chain-tip watcher calls Version::min_remote_for_height and the assert
aborts zebrad. With the shipped [state] ephemeral = true, the restart
wipes the chain back to genesis, so a client that saw its block accepted
then fails in confusing ways (template height regresses; a reissuance forks
a fresh chain and fails contextual validation, e.g.
MissingReferenceNoteOnFirstIssuance).

Repro: build and run the regtest image per the tx_tool README, mine one
block via getblocktemplate/submitblock, watch the logs for ~10 seconds.
The bundled test scenarios can complete inside that window, which may be
why CI does not catch it.

Fix: this PR bumps the constant to the NU7 Testnet value already
present as a comment in the file.

Verified locally: with this change the node survives sustained
mining/submission sessions on regtest — the same client integration suite
that deterministically failed on the unpatched image (template height
regression + MissingReferenceNoteOnFirstIssuance) passes 5/5 on the
patched one, across issuance, reissuance, transfer, burn and finalization
flows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant