Skip to content

fix(types): don't reject valid Platform quorums (8-of-12) in ValidateBasic - #1315

Closed
QuantumExplorer wants to merge 1 commit into
v1.6-devfrom
fix/valset-threshold-validation-platform-quorum
Closed

QuantumExplorer wants to merge 1 commit into
v1.6-devfrom
fix/valset-threshold-validation-platform-quorum

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented May 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Removes the quorum voting-threshold validation in ValidatorSet.ValidateBasic() that prevents a node from starting when given a valid llmq_devnet_platform quorum.

Since v1.5.0, Tenderdash fails replay in a restart loop with:

ERROR: failed to start node: error on replay: validator set updates: voting threshold 800 of quorum with power 1200 MUST be at least 2/3*1200+1 = 801

llmq_devnet_platform is defined as 8-of-12 (dash/llmq/llmq.go), which is exactly 2/3 — threshold 8 * 100 = 800 of total power 12 * 100 = 1200. The check added in #1052 requires more than 3-member sets to have a threshold of at least 2/3 + 1 = 801, so it rejects the quorum Dash Core actually produces.

The voting threshold is dictated by the LLMQ quorum type formed by Core, not by Tenderdash, so enforcing a stricter rule here makes otherwise-valid quorums unstartable.

Fixes #1314.

Changes

This restores the pre-#1052 ValidateBasic() behavior for this code path.

Notes / alternatives

The block was also internally inconsistent: case 3 allowed exactly 2/3 (threshold < totalPower*2/3) while the default branch required strictly more (threshold < (totalPower*2/3)+1), so 3-member platform quorums passed but 12-member ones did not.

If a strict BFT threshold is desired in the future, it should be coordinated with Dash Core's LLMQ quorum definitions (or driven via the voting_power_threshold consensus param), rather than enforced unilaterally in ValidateBasic() where it rejects quorums Core considers valid.

Test plan

  • CI: go build ./...
  • CI: go test ./types/... — existing TestValidatorSetValidateBasic cases still pass (none assert the removed threshold errors; the 1-validator and 4-validator "good" cases continue to validate).
  • Manual: start a node against a llmq_devnet_platform (8-of-12) quorum and confirm replay no longer fails.

Note: Go is not installed in the authoring environment, so build/tests were not run locally — relying on CI.

Summary by CodeRabbit

  • Bug Fixes
    • Relaxed quorum voting threshold validation to accept valid configurations that were previously rejected due to overly strict enforcement rules.

Review Change Stack

…lid Platform quorums

The threshold-vs-total-power check added in #1052 requires validator sets with
more than 3 members to have a voting threshold of at least 2/3 + 1 of total
power. The llmq_devnet_platform quorum type produced by Dash Core is 8-of-12,
which is exactly 2/3 (threshold 800 of power 1200), so the check rejects it and
the node fails replay in a restart loop:

  voting threshold 800 of quorum with power 1200 MUST be at least 2/3*1200+1 = 801

The threshold is dictated by the LLMQ quorum type formed by Core, not by
Tenderdash, so enforcing a stricter rule here makes otherwise valid quorums
unstartable. This removes the switch block (restoring pre-#1052 behavior) while
keeping the VotingPowerThreshold overflow guard.

Fixes #1314

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@QuantumExplorer
QuantumExplorer requested a review from lklimek as a code owner May 25, 2026 20:51
@coderabbitai

coderabbitai Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 31236f49-4c12-4e46-8eae-1f4ca67a0e37

📥 Commits

Reviewing files that changed from the base of the PR and between 297c65c and 990ce14.

📒 Files selected for processing (1)
  • types/validator_set.go

📝 Walkthrough

Walkthrough

ValidatorSet.ValidateBasic removes an overly strict quorum voting power threshold validation that was rejecting valid Dash Core LLMQ quorums like the 8-of-12 llmq_devnet_platform. The size-dependent checks (requiring thresholds ≥ 2/3 or ≥ 2/3+1) are replaced with an explanatory comment noting the threshold is determined by Dash Core's quorum type.

Changes

Quorum Threshold Validation

Layer / File(s) Summary
Remove quorum threshold validation from ValidateBasic
types/validator_set.go
The switch statement enforcing size-dependent quorum voting power threshold rules against total voting power is removed, replaced with a comment explaining that quorum threshold validation is intentionally skipped because the threshold is determined by Dash Core's LLMQ quorum type and stricter enforcement would reject valid quorums.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A threshold too strict caused the quorum to sigh,
Eight-twelfths of the power seemed never enough, why?
The comment now whispers: "Dash Core knows the score,"
So ValidateBasic looks kindly once more. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing validation that rejected valid 8-of-12 Platform quorums in ValidateBasic.
Linked Issues check ✅ Passed The PR fully addresses issue #1314 by removing the overly-strict validation block and restoring the pre-#1052 behavior that accepts 8-of-12 quorums.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the validation rejection of valid Platform quorums; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/valset-threshold-validation-platform-quorum

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 and usage tips.

@lklimek

lklimek commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

replaced by #1328

@lklimek lklimek closed this Jun 12, 2026
@lklimek
lklimek deleted the fix/valset-threshold-validation-platform-quorum branch November 10, 2026 10:35
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.

Platform quorum (llmq_devnet_platform) rejected since v1.5.0: 8-of-12 threshold fails ValidateBasic's 2/3+1 check

2 participants