Repository navigation
fix(wallet): pin Platform protocol v13 for current shielded denominations - #886
Merged
Merged
Conversation
…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.
|
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: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:[0.1, 0.3, 0.5, 1.0][0.03, 0.1, 0.25, 0.5, 1.0]The shielded builder validates the chosen denomination against
sdk.version()(notPlatformVersion::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 explicitwith_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 (correctShieldFromAssetLock/Shieldfees) 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 reportspinned protocol v13.Breaking Changes
None. Bumps only the client's pinned protocol version to match the network.
Checklist:
For repository code-owners and collaborators only