Skip to content

fix(wallet): pin Platform protocol v13 for current shielded denominations - #886

Merged
romchornyi merged 1 commit into
swift-sdk-integrationfrom
fix/pin-platform-protocol-v13
Jul 27, 2026
Merged

romchornyi merged 1 commit into
swift-sdk-integrationfrom
fix/pin-platform-protocol-v13

Conversation

@romchornyi

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

The SDK is created pinned to Platform protocol v12 (SDK(network:, platformVersion: 12)). Testnet Drive has since moved to v13, whose validation set changed the shielded identity-create exit denominations:

  • v12 / validation V8: [0.1, 0.3, 0.5, 1.0]
  • v13 / validation V9: [0.03, 0.1, 0.25, 0.5, 1.0]

The shielded builder validates the chosen denomination against sdk.version() (not PlatformVersion::latest()). A client pinned at v12 therefore built shielded transitions against the retired set, so a contested (0.25 DASH) shielded username create failed client-side — "Shielded build error: denomination 25000000000 is not a member of the allowed exit-denomination set [10000000000, 30000000000, 50000000000, 100000000000]" — even though the server (v13) requires exactly 0.25. Rebuilding the FFI did not help: the explicit with_version(12) pin (version_pinned = true, ratchet disabled), not the FFI, selected the version.

What was done?

Bumped the pin to v13 in SwiftDashSDKHost — the existing comment already said to "bump this when the agreed protocol moves past v12." v13 is a superset of v12's shielded fee logic, so the original v11→v12 rationale (correct ShieldFromAssetLock / Shield fees) still holds. Kept the explicit pin rather than the auto-detect default (platformVersion: 0, floor + ratchet) so the shielded build can't race a not-yet-ratcheted network version. The pinned version is now logged at SDK creation. Requires a v13-capable FFI (already rebuilt from the current platform checkout).

This is a general SDK-version alignment (affects every transition the client builds), independent of the BUG-24 denomination value (0.25, shipped separately) which stays correct.

How Has This Been Tested?

Manual, on testnet: a contested shielded username (Gamma) now submits and enters the pending-vote state ("submitted for voting … we will notify you when voting ends") instead of failing at build time. Non-contested shielded / Core / Platform-Payment registrations continue to work. Verified the SDK-create log reports pinned protocol v13.

Breaking Changes

None. Bumps only the client's pinned protocol version to match the network.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

…ions

The SDK was pinned to Platform protocol v12 at creation
(`SDK(network:, platformVersion: 12)`). Testnet Drive has since moved to
v13, whose validation set changed the shielded identity-create exit
denominations from v12/V8 [0.1, 0.3, 0.5, 1.0] to v13/V9
[0.03, 0.1, 0.25, 0.5, 1.0]. The shielded builder validates the chosen
denomination against `sdk.version()` (not `PlatformVersion::latest()`),
so a client pinned at v12 built transitions against the retired set: a
contested (0.25 DASH) shielded username create failed client-side
("denomination 25000000000 is not a member of the allowed
exit-denomination set [...]") even though the server (v13) requires
exactly 0.25. Rebuilding the FFI did not help — the explicit
`with_version(12)` pin, not the FFI, selected the version.

Bump the pin to v13 (the code comment already said to bump it when the
agreed protocol moves past v12). v13 is a superset of v12's shielded
fee logic, so the original v11->v12 reason (correct ShieldFromAssetLock
/ Shield fees) still holds; keep the explicit pin rather than the
auto-detect default so the shielded build can't race a not-yet-ratcheted
version. Requires a v13-capable FFI. Log the pinned version at SDK
creation.

Verified on testnet: a contested shielded username ("Gamma") now
submits and enters the pending-vote state instead of failing at build.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: eda8f576-a8f3-4dd7-beac-2ea2529e05d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pin-platform-protocol-v13

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.

@romchornyi
romchornyi merged commit c69853f into swift-sdk-integration Jul 27, 2026
1 check passed
@romchornyi
romchornyi deleted the fix/pin-platform-protocol-v13 branch July 27, 2026 20:04
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.

2 participants