Repository navigation
feat(platform)!: activate Tenderdash consensus version 2 with protocol version 15 - #5941
Claudius-Maginificent wants to merge 1 commit into
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 <noreply@anthropic.com> 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 aebfe85) · 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.
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 ·
aebfe85rs-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/tests/strategy_tests/test_cases/upgrade_fork_tests.rs) — QuantumExplorer or shumkovpackages/rs-platform-version/src/version/v15.rs) — QuantumExplorer or 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