feat: add Platform Tenderdash chain id to CChainParams - #7764
PastaPastaPasta wants to merge 1 commit into
Conversation
Expose the Tenderdash chain id of each network's Dash Platform through CChainParams::PlatformChainId(), beside the existing Platform ports and bech32 HRP: "evo1" on mainnet and "dash-testnet-51" on testnet, matching the genesis chain_id in dashmate's mainnet and testnet config defaults. Devnet and regtest have no canonical Platform chain and carry an empty id. This is a network parameter a Platform client verifies signed response metadata against; it is not a consensus rule, so it stays out of Consensus::Params. No new command-line options are added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Potential PR merge conflictsThis is advisory only. It does not block CI, but it marks PRs that will likely need a rebase depending on merge order. If this PR merges firstThese open PRs will likely need a rebase:
If these PRs merge firstThis PR will likely need a rebase:
|
|
✅ Final review complete — no blockers (commit bf7ad04) · triage: low |
|
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 configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. Walkthrough
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Merge Risk: ⚪ Minimal · up to This adds per-network Platform ID access. No concrete behavior mismatch or merge-blocking issue was established in the reviewed code. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new values are fixed per network and tested. This change does not add a response verifier or expose a new network entrypoint, but the downstream verification behavior is outside the reviewed change. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Verified the complete single-commit change at bf7ad04 and found no actionable defects: all four network values match the PR description, the accessor is additive, and the new test is registered in both required lists. The unit-test target built successfully; chainparams_platform_tests, pow_tests, llmq_params_tests, and evo_netinfo_tests passed, git diff --check passed, and the worktree remains clean. External Platform genesis values and the reported mutation check were not independently verified; the claimed chainparams_tests suite was not present in the executed binary.
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (agent: phase1-reviewer, role: dash-core-commit-history); reviewer 3: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 4: gpt-6-astra (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6-astra (agent: astra-verifier, role: final-verifier)
- Triage:
lowbygpt-6-astra(effort low) — The diff adds a small, self-contained network parameter and accessor with straightforward per-network tests and build registration, without changing consensus, signature verification, or other critical logic. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer,glm-5.3-flash— dash-core-commit-history (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 89% left, weekly 94% left; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 13% left, 5h 100% left) - Fresh verifier:
gpt-6-astra— final-verifier; agentastra-verifier - Phase 2 reviewers:
gpt-6-astra— general (completed, effort medium); agentphase2-reviewer,gpt-6-astra— dash-core-commit-history (completed, effort medium); agentphase2-reviewer
Issue being fixed or feature implemented
A Dash Platform client verifies that signed response metadata comes from the Platform chain it expects. The chain id is part of what the quorum signs. The DashPay GUI in dash-qt (tracking issue #7512) needs each network's Platform chain id. Core already carries the other Platform network parameters (
nDefaultPlatformP2PPort,nDefaultPlatformHTTPPortand the bech32 HRP), so this PR puts the chain id next to them.Earlier, the value was proposed for dash-sdk's own configuration (dashpay/platform#4963). The maintainer closed that PR, so the Platform shell keeps the check, and Core supplies the value from
CChainParams. This answers knst's question about where the chain id should live, asked on the earlier composite branch.What was done?
CChainParams::PlatformChainId()returns"evo1"on mainnet and"dash-testnet-51"on testnet. Both match the genesischain_idin dashmate's mainnet and testnet config defaults. Devnet and regtest have no canonical Platform chain, so their id is empty.Consensus::Params.-platformchainidoverride for testnet and devnets, which is refused on mainnet.How Has This Been Tested?
chainparams_platform_testschecks the value for every network. The test ran on this branch alone on top ofdevelop(0f876369f9c7), on aarch64-apple-darwin.The DashPay GUI verified every live testnet response against
dash-testnet-51from this parameter.-platformchainid=bogusproduced an explicit chain-id mismatch (see #7512).Breaking Changes
None.
Checklist:
🤖 Generated with Claude Code