Repository navigation
feat(platform)!: activate Tenderdash consensus version 2 with protocol version 15 - #5941
Conversation
…l version 15 PLATFORM_V15 sets tenderdash_consensus_version to 2, so the PV15 activation block's consensus parameter update turns on Tenderdash proposer liveness and round skipping (CONSENSUS_VERSION_2, Tenderdash 2.0). Heartbeat and silence timeouts keep Tenderdash defaults. consensus_params_update v2 (selected only by PV15) emergency updates now force at least consensus version 1 instead of exactly 1, so they cannot lower version 2. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit e2ad4f3) · triage: critical |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The protocol-15 activation is correctly wired through PlatformVersion and the shared version-dispatched consensus-parameter update path. No in-scope correctness or consensus-safety defects were found; the failed Rust workspace check is attributable to pre-existing rustfmt drift in an unchanged file.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: tenderdash-consensus-security); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — The diff changes protocol-version activation and consensus parameter updates in rs-drive-abci, directly altering consensus behavior and the chain's Tenderdash compatibility boundary. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— tenderdash-consensus-security (completed, effort xhigh); agentphase2-reviewer
Out-of-scope follow-up suggestions (2)
These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.
- Remote signers cannot participate in proposer-liveness votes — The pinned Tenderdash implementation explicitly returns an unsupported-operation error for both SignProposerHeartbeat and SignRoundSkipVote in its socket and gRPC remote-signer clients. As a result, deployments whose round-skip threshold cannot be met by locally signing validators will not obtain the advertised fast recovery from silent proposers after protocol version 15 activates.
- Follow-up: Track a follow-up dashpay/tenderdash change adding proposer-heartbeat and round-skip-vote requests to the socket and gRPC remote-signer protocols, and document or gate protocol-15 rollout for deployments that rely on remote signing.
- Rust workspace CI failure indicates a regression — Not this PR's responsibility: the failed job stopped on rustfmt drift at packages/rs-drive-abci/src/execution/validation/state_transition/processor/traits/is_allowed.rs:815, an unchanged file outside the diff.
- Follow-up: Consider creating a separate issue or author/maintainer-requested PR for this.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
/skip-bots |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
Static verification found two in-scope suggestions. The V11 method-table documentation omits the new emergency-update floor, and enabling Tenderdash consensus version 2 leaves mixed deployments with socket or gRPC remote signers unable to produce the round-skip votes needed for proposer recovery. CI shows no failed code checks on this head; Rust workspace tests passed, while several broader suites were skipped.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Follow-up candidates (optional) (2)
New non-blocking observations on code unchanged since the last full review. No inline threads are opened for them and later reviews do not repeat them: fix forward or track separately if they are worth it.
🟡 Suggestion: Document the emergency consensus-version floor in the V11 method table
packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v11.rs:116
The canonical V11 method-table documentation currently says that engine.consensus_params_update version 2 installs the full evidence policy when it changes, but it omits the behavior introduced by this PR. The v2 implementation now uses max(1, new_platform_version.consensus.tenderdash_consensus_version) for emergency updates, so it also prevents an active Tenderdash consensus version from being lowered. Keeping this description aligned with the implementation will prevent readers from missing the reason for the changed emergency path.
/// - `engine.consensus_params_update` 2 installs the full evidence policy when it changes and never lowers the Tenderdash consensus version on an emergency update.
source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality)
🟡 Suggestion: Remote-signing validators can prevent round-skip recovery
packages/rs-platform-version/src/version/v15.rs:968
Protocol version 15 enables Tenderdash consensus version 2 for every v15 chain, but the pinned Tenderdash socket and gRPC SignerClient implementations return ErrSigningNotSupported for both proposer heartbeats and round-skip votes. For the production LLMQ_100_67 configuration, the round-skip collector requires 67 of 100 voting shares; if remote-signer-backed validators represent at least 34% of the quorum, the remaining validators cannot form a certificate. An offline proposer therefore still forces transactions to wait for the ordinary proposal timeout, so the advertised idle-round recovery does not work for that supported signer deployment. The breaking-changes text mentions missing heartbeats but not the equally necessary missing skip votes. Gate activation on a liveness-capable signer deployment or extend the upstream remote-signer protocol before relying on version 2 for these validators.
source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality); gpt-6.1-sol (phase2-reviewer: general, architecture-layering, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: tenderdash-consensus-security); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — The diff changes protocol-version activation and consensus-parameter updates in rs-drive-abci, directly altering the consensus engine and behavior of the network, which is a critical consensus surface. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Code unchanged since the last final review (
aebfe85b): 2 new suggestion(s) listed as follow-up candidates, not posted inline - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— tenderdash-consensus-security (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
|
Policy satisfied — this can merge. |
TL;DR: When the network upgrades to protocol version 15, it also switches its consensus engine to the newer version that notices an offline block proposer and moves on to the next one.
User story
As a Dash Platform user, I want my transaction to be included quickly even when the validator whose turn it is to propose a block is offline, to achieve predictable confirmation times.
As a masternode operator, I want the faster recovery from offline proposers to switch on together with the protocol upgrade, to achieve it without a separate coordinated network event.
Scenario
Base flow
The network is idle, waiting for transactions. The validator whose turn it is to propose the next block has gone offline. A user then submits a transaction.
Actual behavior
Nobody notices the offline proposer until the transaction arrives. The transaction then waits for the full proposal timeout before another validator takes over.
Expected behavior
From protocol version 15, an idle proposer regularly signals that it is alive. When validators stop hearing from it, they hand the round to the next proposer in advance, so a new transaction is picked up without waiting out the timeout.
Detailed discussion
What was done
PLATFORM_V15.consensus.tenderdash_consensus_versionis set to2(it was1). At activation,consensus_params_updatesendsVersionParams { app_version: 15, consensus_version: 2 }together with the PV15 evidence policy. That enables TenderdashCONSENSUS_VERSION_2: proposer heartbeats, round skip votes and round skip certificates (Tenderdashv2.0.0-dev.2, feat(consensus)!: hand a silent proposer's idle round to the next proposer tenderdash#1572). A fresh chain started at PV15 gets the same value fromInitChain.proposer_heartbeatandproposer_silenceare not set, so Tenderdash uses its defaults of 1 s and 5 s (TimeoutParamsOrDefaults). RaisingConsensusVersionto 2 clears any stored values, per the Tenderdash spec (spec/consensus/consensus-proposer-liveness.md§ Parameters).consensus_params_update_v2emergency updates (mainnet epoch 3, testnet epoch 1480) now sendmax(1, new tenderdash_consensus_version)instead of a hardcoded1. Without this, an emergency update would lower a PV15 chain from version 2 to 1. Only PV15 selectsconsensus_params_update2, so earlier protocol versions are unaffected.In-place changes to shipped generations
consensus_params_update_v2is edited in place. It is selected only byDRIVE_ABCI_METHOD_VERSIONS_V11/ PV15, which has not been activated on any network (v5.1.0-dev.1is a dev prerelease). PV14 and earlier select v0/v1, which are unchanged.Testing
should_activate_tenderdash_consensus_version_2_with_protocol_version_15covers PV14 → PV15 on mainnet, testnet, regtest and devnet.should_install_zero_evidence_bytes_on_activation_and_skipped_upgrades(expects2) andshould_include_evidence_policy_alongside_emergency_version_updates(an emergency update must not lower the version). Both failed before the change and pass after it.should_emit_consensus_params_update_evidence_policy_once_across_activation_and_restartnow also checksconsensus_versionon the real activation block.consensus_params_update, init-chain and upgrade unit tests indrive-abci, theplatform-versiontests and the related strategy tests pass.cargo clippy -p drive-abci -p platform-version --all-targets -D warningsis clean.Breaking changes
Consensus-breaking. After PV15 activates, only Tenderdash 2.0 or later can follow the chain. Drive already rejects a Tenderdash with a different ABCI version (
infohandler, ABCI 1.5.0), and dashmate onv5.1-devshipsdashpay/tenderdash:2.0.0-dev.2. Validators that sign through a socket or gRPC remote signer send no heartbeats, so their idle rounds are skipped after the silence timeout.Checklist
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestPrior work
v2.0.0-dev.2, which shipsCONSENSUS_VERSION_2. This PR switches it on.consensus_params_update2 and the PV15 evidence policy that this update is sent with.Attribution
🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code
https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
PR Hygiene ·
e2ad4f3rs-drive-abci(packages/rs-drive-abci/src/execution/engine/consensus_params_update/mod.rs,packages/rs-drive-abci/src/execution/engine/consensus_params_update/v2/mod.rs,packages/rs-drive-abci/src/execution/validation/state_transition/processor/traits/is_allowed.rsand 1 more) — approved by shumkovpackages/rs-platform-version/src/version/v15.rs) — approved by shumkovWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit