feat(platform): introduce protocol version 15 - #5043
Conversation
Adds PLATFORM_V15 as a behavior-free gate for the 4.3 consensus changes, the same pattern as the v13 and v14 introductions: identical component tables to v14, registered in PLATFORM_VERSIONS and made the latest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: dashpay/platform/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
🕓 Queued for automated review — 4th in line, estimated start in ~25 min (commit 2ad4cb2)
|
Basic explanation
What this does: Platform's rules are numbered by "protocol version". Every change to how nodes agree on the chain has to switch on at a specific version, so all nodes switch at the same block. This PR creates version 15 for the 4.3 line. Version 15 behaves exactly like version 14 for now. It exists only so the 4.3 changes have a switch to attach to.
Value: Six open 4.3 PRs need version 15. Four of them currently create it themselves, each with its own copy, so whichever merges first breaks the other three. With this PR merged first, they all build on one shared version 15 and each only adds its own change to it.
Risks: Low. Version 15 uses the same rule tables as version 14, so no behaviour changes at any block height. Once the network votes version 15 in, nodes on binaries that don't know it can no longer follow the chain. That is true of every new version, and it only matters once a release carrying it ships.
Issue being fixed or feature implemented
Protocol version 15 is the activation gate for the consensus changes planned for 4.3, and v4.3-dev does not have it yet. Four open PRs each add their own
v15.rs:Two more, #4986 (epoch payout) and #4899 (yes/no vote poll), target version 15 but don't create it.
This follows the same pattern as the v13 (#4143) and v14 (#4267) introductions: a standalone version with no behaviour of its own.
What was done?
Three files in
rs-platform-version:v15.rs:PLATFORM_V15, with the same component version tables asPLATFORM_V14.protocol_version.rs: registersPLATFORM_V15inPLATFORM_VERSIONSand pointsLATEST_PLATFORM_VERSIONat it.version/mod.rs:LATEST_VERSIONbecomesPROTOCOL_VERSION_15. This also extends every open-ended activation range (N..=LATEST_VERSION) to cover 15, as the v13 and v14 introductions did. The ranges are checked against the running protocol version, so nothing changes for a network at 14 or below.Before:
After:
rs-sdk's per-network seed (min_protocol_version) is unchanged: devnets still seed at 14 and move up to 15 through auto-detect once a devnet runs it.For the PRs above: the
mod.rsandprotocol_version.rshunks here are byte-identical to the ones in #4706 and #4730, so those merge cleanly.v15.rswill be an add/add conflict. Resolve it by keeping this file and applying your table bumps (and your doc item) to it.How Has This Been Tested?
With v15 == v14, everything that runs at latest now runs at 15 with unchanged tables.
cargo test -p platform-version --all-features: 26 passed. This includes the registry-completeness check, which comparesPLATFORM_VERSIONS.len()againstLATEST_VERSION.cargo check -p dpp -p drive -p drive-abci -p dash-sdk --tests: clean.cargo test -p drive-abci --lib protocol_upgrade: 57 passed.perform_events_on_first_block_of_protocol_changeneeds no 14 to 15 step, since there is nothing to migrate.LATEST_VERSIONbump on v4.3-dev, and its Rust workspace, JS, Swift and Kotlin checks are green.Breaking Changes
Adds a protocol version. Nodes on binaries without v15 cannot follow the chain once the network votes it in. Behaviour at v15 is identical to v14 until a follow-up consumes the gate, so the title carries no
!, as with the v13 and v14 introductions.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
2ad4cb2/skip-botsproceeds without the ones not yet reported/self-reviewedonce the bots are doneWhen every box is checked the
PR Hygienecheck passes and this can merge.