Skip to content

fix: move DEPLOYMENT_V24 to a fresh version bit - #7739

Merged
PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:fix/v24-fresh-ehf-bit
Sep 23, 2026
Merged

PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:fix/v24-fresh-ehf-bit

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

DEPLOYMENT_V24 uses version bit 12, and bit 12 already has MNHF (EHF) signals mined on both public networks, left over from before V24 had a start time:

  • testnet: d6220b5d9ca0318f24befcf0e6a748bb84836bd79efbdcf165867da638292220 in block 1349780
  • mainnet: 0a7a4516cc16cd9bc9b956aa793b82cf4a4fb353b325bb6ab29dc3534f95ac7a in block 2400222

This causes two problems:

  1. The old signals can be replayed. The MNHF request id is only ("mnhf", bit), and CheckMNHFTx does not check how recent the signing quorum is. The tx has no inputs or outputs, so no duplicate check catches a rebroadcast. Once nStartTime passes, anyone can rebroadcast the old bit-12 tx. V24 then moves to STARTED on miner signalling alone, without a new masternode vote.
  2. v23 nodes reject any later bit-12 signal. v23 has V24 at NEVER_ACTIVE (-2). Its GetSignalsStage therefore never expires the old signals, and ProcessBlock rejects any new bit-12 signal with bad-mnhf-duplicate. That includes a legitimate one. So the first bit-12 signal mined after this release splits v23 off, and with (1) an outsider can choose when that happens.

Testnet V24 signalling starts at nStartTime 1790208000 (2026-09-24).

What was done?

Moved DEPLOYMENT_V24 from bit 12 to bit 13 on all four networks, and updated the one unit-test checkpoint hash that depends on it. No EHF deployment has ever used bit 13, so no earlier signal exists to replay. v23 treats a bit it doesn't know as a valid activation and has no duplicate recorded for it, so v23 nodes keep following the chain through the V24 signal.

This PR deliberately changes only the bit. Two related issues are left for follow-ups:

  • the request id carries no deployment-specific data;
  • IsValidMNActivation falls through to the "unknown bit" path for a known bit outside its time window.

How Has This Been Tested?

One unit-test fixture, TestChainV24SignalBeforeV19Setup, mines blocks that signal V24 through miner version bits (-vbparams=v24:...:0). Changing the bit changes those blocks' nVersion, so the expected tip hash for height 494 in src/test/util/setup_common.cpp is updated here. The full test_dash suite passes locally on macOS arm64. No functional tests were run.

The replay described above was reproduced earlier on regtest with a throwaway functional test, using the testdummy deployment:

  • an old signal whose quorum was no longer active was accepted again after nStartTime moved forward;
  • the deployment moved to started;
  • a node still on the old parameters rejected that block with bad-mnhf-duplicate.

Breaking Changes

Miners and masternodes must signal V24 on bit 13 instead of bit 12. V24 has not activated on any public network, so no existing deployment state is affected.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

🤖 Generated with Claude Code

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

@thepastaclaw

thepastaclaw commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

🕓 Queued for automated review — 5th in line, estimated start in ~1.4 h (commit 1be3ac2)
Estimated review time once started: ~35 min (two-phase automated review; median of recent runs).

  • Request priority review — click to move this review to the front of the queue.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 72d78e2a-7a7d-46d9-a480-bb149743aada

📥 Commits

Reviewing files that changed from the base of the PR and between 9e34850 and 1be3ac2.

📒 Files selected for processing (2)
  • src/chainparams.cpp
  • src/test/util/setup_common.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


Walkthrough

The V24 version-bits deployment bit changes from 12 to 13 in the mainnet, testnet, devnet, and regtest chain parameter constructors. The test setup updates the expected block hash for the height-494 checkpoint.

Estimated code review effort: 2 (Simple) | ~8 minutes

Merge Risk: ⚪ Minimal · up to 1be3a

V24 now signals on bit 13 across all four networks. No concrete blocking issue was established; confirm the updated height-494 checkpoint in the available test environment.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: moving DEPLOYMENT_V24 to a new version bit.
Description check ✅ Passed The description directly explains the bit conflict, replay and compatibility risks, implementation changes, testing, and migration impact.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Bit 12 already has mined MNHF signals on mainnet and testnet from before V24 had a start time. v23 nodes still count those signals as live, so any later bit-12 signal is rejected by them as a duplicate, and the old signals stay valid for V24 itself. Bit 13 has never been used by an EHF deployment.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit 894e5fe into dashpay:develop Sep 23, 2026
42 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the fix/v24-fresh-ehf-bit branch September 23, 2026 20:38
@UdjinM6 UdjinM6 added this to the 24 milestone Sep 25, 2026
kwvg added a commit to kwvg/base-sdk that referenced this pull request Oct 23, 2026
kwvg added a commit to kwvg/base-sdk that referenced this pull request Oct 23, 2026
kwvg added a commit to kwvg/base-sdk that referenced this pull request Oct 23, 2026
kwvg added a commit to kwvg/base-sdk that referenced this pull request Oct 23, 2026
kwvg added a commit to dashpay/base-sdk that referenced this pull request Oct 23, 2026
…endency, sync params with Dash Core in preparation for v24 (#83)

* [57a2802] sdk%doc: clean up comments in `dash-params` and `dash-primitives` (Kittywhiskers Van Gogh)
* [8a4f29f] params%refac: move network parameters into a `params` module (Kittywhiskers Van Gogh)
* [0b09299] params%refac: split chain parameter types per module (Kittywhiskers Van Gogh)
* [94d639b] params%refac!: describe genesis blocks with `GenesisParams` (Kittywhiskers Van Gogh)
* [b5ec09a] sdk%refac!: invert `dash-params` and `dash-primitives` dependency (Kittywhiskers Van Gogh)
* [0756e42] sdk%refac!: invert `dash-params` and `dash-script` dependency (Kittywhiskers Van Gogh)
* [5d6e8d4] sdk%lint(codeql): apply codec and ordering policies to `dash-params` (Kittywhiskers Van Gogh)
* [aa762a6] params%fix: move v24 deployment to version bit 13 per dashpay/dash#7739 (Kittywhiskers Van Gogh)
* [f73b54b] params%fix: schedule the v24 deployment on testnet per dashpay/dash#7725 (Kittywhiskers Van Gogh)
* [de29aee] params%feat!: add the `evo_shares` deployment per dashpay/dash#7807 (Kittywhiskers Van Gogh)
* [8108fb7] params%fix!: drop per-chain `require_standard` per dashpay/dash#7710 (Kittywhiskers Van Gogh)
* [93e6c34] params%feat!: add the bech32m HRP to `AddrParams` per dashpay/dash#7285 (Kittywhiskers Van Gogh)
* [ce22bf5] params%fix(llmq)!: add the `LlmqNone` quorum type (Kittywhiskers Van Gogh)
* [482a397] params%feat(llmq): add size, DKG and signing parameters per LLMQ type (Kittywhiskers Van Gogh)
* [d3c65c4] params%feat: sync params with dashpay/dash#7379 (Kittywhiskers Van Gogh)

Description:

`````
## Motivation

The coupling between `dash-params` and `dash-{primitives,script}` proved to be expensive, namely by
* Creating circular dependencies that had to be worked around by snaking through parameters using `__private`
* Coupling an otherwise trivial crate (primarily holding fixed/infrequently updated values) to high-churn crates
* And tying those values to data structures that downstream consumers may not share

This pull request attempts to dissolve these differences while syncing them with new parameter updates in preparation for Dash Core v24.

## Breaking Changes

Affecting `dash-params`:

### Changed

- `ChainParams::genesis`, storing the new `GenesisParams` descriptor.
- `AddrParams::bech32_hrp`, the human-readable part of DIP-18 Platform addresses. Struct literals must set it.
- `LlmqType` gains `LlmqNone` for code `0xff`. The code previously decoded to `LlmqType::Unknown(255)`, exhaustive matches must handle the new variant.

### Removed

- `Network::genesis()`. Build the block with `Block::from(&network.chain().genesis)` from `dash-primitives`.
- `ChainParams::require_standard`.
- Dependency on `dash-primitives` and `dash-script`, now becoming dependents for them. The `portable` feature has been dropped as a result of this inversion.

Affecting `dash-primitives`:

### Removed

- `LlmqType`, superseded by `dash_params::LlmqType`.

Affecting `dash-script`:

### Removed

- `AddrParams`, superseded by `dash_params::AddrParams`.

## How Has This Been Tested?

```
just test lint
```

## Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional tests
- [ ] I have made corresponding changes to the documentation
- [x] I did not use agentic assistance (i.e. LLMs, AI) except as [disclosed](#agent-disclosure) and can answer questions, comments and concerns without said assistance. I assume authorship of the code submitted.
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

### Agent disclosure

Code generated with Claude Code using Opus 5.5, medium effort. Reviewed with Codex using GPT-6.1-Sol, medium effort as adversarial review and Claude Code using Fable 5.1, medium effort.
`````
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.

3 participants