Repository navigation
chore(deps)!: update Platform to v5.1-dev 063589bf and follow the network's protocol version - #1114
Conversation
Pin dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and platform-wallet-storage to dashpay/platform v5.1-dev 063589bf (5.0.0-rc.8). The lockfile moves only the Platform packages. The upstream V019 wallet-storage migration adds a nullable asset-lock operation id; V001-V018 are unchanged. The compatibility bridge gets the 033ecae destination snapshot it compares against, and the pin guard records the new revision with an unchanged migration fingerprint. BREAKING CHANGE: the wallet storage upgrade to V019 is forward only. An older build cannot open upgraded storage; going back needs a copy of the data directory taken before the upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The new rust-dashcore wraps secp256k1 keys in EcdsaSecretKey and EcdsaPublicKey, returns secret bytes as Zeroizing, and drops the Secp256k1 context argument. Signers, single-key wallets, DashPay derivation, address and QR handling, migrations and their tests follow the new types. Signing stays on the non-grinding dpp::secp256k1 path, and a parity test pins the BLS signature bytes the previous SDK made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Handle the dpp and SDK types the new pin adds, keeping today's behaviour: - Document replace keeps moderated_at and moderated_by; new documents start without them. - The document editor refuses typed-array fields instead of dropping their contents, and keeps referenced key ids as numbers. - Shielded token events show read-only in group actions, and the shielded pool token settings are refused before anything is signed. - Contested document creation states the protocol's base contest fund, so the SDK never auto-quotes a larger one. - Masternode vote reads use ResourceVoteWithCount, the SDK's new vote type; the vote count is not used yet. - New query fields, wallet events, wallet error variants and asset-lock funding modes are handled where the SDK now requires them. - Entropy-only document ids are documented as placeholders from protocol 14, and deferred upstream features link to their issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The SDK was pinned to the protocol 13 table, so it could not build any protocol 14 transition or follow the versioned identity lookup. It now starts at upstream's per-network minimum and ratchets to what proven responses report. - System contracts are cached per protocol version and served through accessors. The context provider serves them at the version the proof verifier asks for and fails rather than serve another version's. - A proved epoch sets the fee multiplier and raises the protocol version. An older epoch than the adopted one is ignored. - Rebuilding the connection resets the protocol version, fee multiplier and adopted epoch under one lock before the new SDK is published, and drops reads begun on the old connection. - Capabilities read the network's version through a helper that stays closed for a version this build does not define. - Contest timing reads the live version; retired vote schedules keep the protocol 13 notice window they were created under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Compare the protocol 13 client tables with a recorded snapshot, so an upstream change to them is reviewed, and check that keys and documents DET builds on a protocol 13 network use encodings protocol 13 decodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Map the refusals the new protocol adds to flows DET already offers to dedicated TaskError variants: a full username contest, a vote choice the contest does not allow, a name someone else asked for first, a token that cannot be moved, a changed immutable document field, a reference to a document type that cannot be deleted, and a moderators' fee on a contract without moderation. Names supplied by the node stay in the typed source only, never in the message. Token operations that fail inside the wallet runtime keep their SDK cause, so they are classified like any SDK error; an unclassified one names the operation that did not complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Add a dated design note for the pin, the protocol version sources, the connection state rules and the protocol 13 guards, and point AGENTS.md at From<SdkError> for TaskError as the SDK error reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
Important Review skippedToo many files! This PR contains 118 files, which is 18 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
|
🔍 Review in progress — actively reviewing now (commit 749f8bd) · triage: critical · Phase 2 only (no Phase 1 for this repository) |
…it refusals Protocol version 14 refusals that flows already in DET can hit get dedicated, actionable messages, each keeping the SDK error as its source: - an identity banned or suspended (until when) on a moderated contract; - a gas sponsor short of credits, a gas payer the document type does not offer, and mixed gas payers in one batch; - pre-programmed token distributions of one time over the limit. An overflowing shielded note total is logged at warn: it means corrupt or hostile sync data, not routine noise. Tests cover contracts saved at protocol 12 loading unchanged at 13 and 14, and contracts saved at 14 decoding at 13 and in full again at 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
@coderabbitai review No review for |
|
Waiting for bot review — coderabbitai skipped after its own rate limit · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
@thepastaclaw review No review for |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 2 only (no Phase 1 for this repository)
The connection rebuild can leave an initialized wallet backend and its SPV runtime connected to the previous SDK and DAPI endpoint set, so the new connection state is not applied consistently. Two additional versioning and synchronization issues remain: local user contracts are decoded with the active SDK version instead of the verifier-requested version, and protocol/fee state can be observed as a mixed snapshot. Test Suite and Clippy were still in progress in the supplied CI snapshot.
🔴 1 blocking | 🟡 2 suggestion(s)
2 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Decode local user contracts with the verifier's requested protocol version
src/context_provider.rs:61-64
The system-contract path correctly resolves contracts at the platform_version supplied by the proof verifier, but the user-contract fallback calls get_contract_by_id, whose decoder uses AppContext::platform_version() instead. During the upgrade window described by this PR, the verifier can request protocol 14 while the SDK has not yet ratcheted beyond protocol 13. A locally stored protocol-14 user contract can then be returned with protocol-14 fields such as action-fee metadata omitted. That gives proof verification the wrong schema and can lose versioned fields if the decoded contract is subsequently persisted. Add a version-aware local lookup/decode path that passes the verifier's version, or preserve and reuse the original serialized bytes.
source: gpt-6.1-sol (phase2-reviewer: general, rust-quality)
🟡 Suggestion: Publish fee and protocol state as one readable snapshot
src/context/mod.rs:853-866
adopt_epoch and replace_connection_observed update the fee multiplier and protocol version while holding epoch_adoption, but the public readers load two independent Relaxed atomics without that lock. A reader can therefore observe the new protocol with the old fee multiplier, or the reset protocol value with the previous connection's fee, despite the reset/adoption comments describing the state as coordinated. Fee estimation and protocol-dependent capability or transition logic can transiently combine values from different epochs or connections. Store both values in one lock-free snapshot or have readers acquire the same synchronization mechanism before reading the pair.
source: gpt-6.1-sol (phase2-reviewer: rust-quality)
Review provenance
Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — This large cross-cutting diff changes cryptography and signing/key handling in wallet and identity code, peer-facing protocol/version handling, and storage migration behavior, including files such as src/wallet_backend/det_signer.rs, src/context/mod.rs, and src/backend_task/migration/*.rs. - Phase 1 reviewers: not run (disabled for this repository)
- 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— rust-quality (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `src/context/mod.rs`:
- [BLOCKING] src/context/mod.rs:1363: Connection rebuild leaves WalletBackend bound to the old SDK
`reinit_core_client_and_sdk` publishes a new `AppContext.sdk`, but an already-created `WalletBackend` retains the SDK clone held by its `PlatformWalletManager`. `ensure_wallet_backend` only captures the context SDK during first initialization, and `WalletBackend::sdk()` returns the manager's retained SDK; the manager also owns the SPV runtime and its connection state. Therefore, when DAPI discovery persists new addresses and schedules this rebuild, the regular SDK uses the new endpoints while wallet operations and SPV continue using the old endpoint set. Rebind or rebuild the wallet backend and SPV runtime while preserving wallet storage and runtime state, or make the backend use a connection handle that follows the current SDK.
- [SUGGESTION] src/context/mod.rs:853-866: Publish fee and protocol state as one readable snapshot
`adopt_epoch` and `replace_connection_observed` update the fee multiplier and protocol version while holding `epoch_adoption`, but the public readers load two independent `Relaxed` atomics without that lock. A reader can therefore observe the new protocol with the old fee multiplier, or the reset protocol value with the previous connection's fee, despite the reset/adoption comments describing the state as coordinated. Fee estimation and protocol-dependent capability or transition logic can transiently combine values from different epochs or connections. Store both values in one lock-free snapshot or have readers acquire the same synchronization mechanism before reading the pair.
In `src/context_provider.rs`:
- [SUGGESTION] src/context_provider.rs:61-64: Decode local user contracts with the verifier's requested protocol version
The system-contract path correctly resolves contracts at the `platform_version` supplied by the proof verifier, but the user-contract fallback calls `get_contract_by_id`, whose decoder uses `AppContext::platform_version()` instead. During the upgrade window described by this PR, the verifier can request protocol 14 while the SDK has not yet ratcheted beyond protocol 13. A locally stored protocol-14 user contract can then be returned with protocol-14 fields such as action-fee metadata omitted. That gives proof verification the wrong schema and can lose versioned fields if the decoded contract is subsequently persisted. Add a version-aware local lookup/decode path that passes the verifier's version, or preserve and reuse the original serialized bytes.
A lookup at another version, as the proof verifier makes at a response's version, swapped out the app's set, so each such lookup reloaded the system contracts and the next app read reloaded them again. Each version now keeps its own set; the app's reads keep the set they last got for a failed reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…poch When the epoch cannot be read, the proved DPNS fallback confirmed the SDK's version, which starts at the network's upstream minimum (14 on devnet), as the network's. It now confirms the version of the responses the SDK verified, and nothing before any. Restores the completed-withdrawal status list with the reason sending FAILED to a protocol 13 network is safe, and its test, now comparing the protocol 13 schema with the latest one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The derived key DET signs with is copied into secp256k1's own type, which keeps its bytes after use. Wrap it so it is erased on drop, as the derived key it comes from would be; signatures stay byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
… protocol 13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The new refusals sent users to another document editor or token client. They now say the app cannot edit this field type, sign this action or change this token setting yet, in one wording, and the shielded setting refusal sits with the token contract errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
A released protocol's tables and each network's minimum version are upstream's to keep fixed; DET's start is covered by platform_version_starts_at_the_network_minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
Waiting for bot review — coderabbitai not yet · thepastaclaw 1 thread unresolved — resolve it. Wait for the missing reviews, or a writer can post |
The proof verifier asks for contracts at the version it verifies with, which can be newer than the SDK's. System contracts were already served at that version; a saved user contract was decoded at the SDK's version instead, dropping newer-protocol settings such as action fees. The fallback now decodes it at the version asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…king Building the recoverable-signature envelope returns an error upstream; it is now reported as the existing message-signing failure, with the detail logged, instead of aborting the signing path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)
The dependency and protocol-version migration is mostly coherent, and the protocol metadata tests now cover both verified and unverified responses. However, the wallet backend retains the SDK captured at construction across connection rebuilds, which can leave wallet and shielded operations using stale DAPI and protocol state; two additional non-blocking correctness issues remain.
🔴 1 blocking | 🟡 2 suggestion(s)
1 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Decode local user contracts with the verifier's requested protocol version
src/context_provider.rs:61-66
The provider receives the exact platform_version used by proof verification, but the non-system fallback calls get_contract_by_id, whose decode_stored_contract decodes the stored bytes using self.platform_version(). During a protocol transition, a verifier operating at protocol 14 can therefore receive a locally stored protocol-14 contract decoded with the SDK's current protocol-13 rules, potentially losing fields or failing before verification completes. Thread the requested PlatformVersion through the local lookup and decode path so the stored bytes are decoded with the same version that verifies the response.
source: gpt-6.1-sol (phase2-reviewer: rust-quality)
2 carried-forward finding(s) already raised on this PR; not re-posting as new inline comments.
Review provenance
Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — This is a large, intricate cross-cutting diff that changes cryptographic signing and key-handling code, peer-facing protocol/version behavior, and storage migration compatibility. - Phase 1 reviewers: not run (disabled for this repository)
- 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— rust-quality (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `src/context_provider.rs`:
- [SUGGESTION] src/context_provider.rs:61-66: Decode local user contracts with the verifier's requested protocol version
The provider receives the exact `platform_version` used by proof verification, but the non-system fallback calls `get_contract_by_id`, whose `decode_stored_contract` decodes the stored bytes using `self.platform_version()`. During a protocol transition, a verifier operating at protocol 14 can therefore receive a locally stored protocol-14 contract decoded with the SDK's current protocol-13 rules, potentially losing fields or failing before verification completes. Thread the requested `PlatformVersion` through the local lookup and decode path so the stored bytes are decoded with the same version that verifies the response.
In `src/context/mod.rs`:
- [BLOCKING] src/context/mod.rs:1223: Connection rebuild leaves WalletBackend bound to the old SDK
(existing thread: https://github.com/dashpay/dash-evo-tool/pull/1114#discussion_r4370532700)
`reinit_core_client_and_sdk` replaces `AppContext::sdk`, but an already-created `WalletBackend` is unchanged. `WalletBackend::new` passes a cloned SDK into `PlatformWalletManager`, and `WalletBackend::sdk()` continues returning that manager-owned SDK. Wallet and shielded tasks use it directly, so after DAPI or connection reconfiguration they can continue using the old DAPI addresses, protocol state, and client settings while the rest of the app uses the new SDK. The existing comment at `shield_from_core_protocol_version` explicitly acknowledges that the two SDKs can diverge. Rebuild must stop and recreate the wallet backend and its SPV runtime, or use an upstream-supported SDK replacement mechanism, before reporting the new connection as active.
In `src/backend_task/error.rs`:
- [SUGGESTION] src/backend_task/error.rs:4121-4126: Unmapped token broadcast rejections still lose the operation name
(existing thread: https://github.com/dashpay/dash-evo-tool/pull/1114#discussion_r4371072554)
`from_token_operation_failure` preserves the token operation only when `TaskError::from(source)` returns `TaskError::SdkError`. An otherwise-unclassified `StateTransitionBroadcastError` is converted to `TaskError::PlatformRejected` at lines 4641-4643, so wallet-runtime failures on that path produce the generic platform-rejected message and lose whether the failed operation was a claim, transfer, mint, unfreeze, or another token action. Preserve the operation for both the generic SDK fallback and the generic platform-rejection classification, while retaining dedicated consensus mappings when available.
|
Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
all issues handled in separate PRs
|
/skip-bots |
|
Policy satisfied — this can merge. |
…transfer (#1118) * build(deps)!: update Platform to v5.1-dev 063589bf Pin dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and platform-wallet-storage to dashpay/platform v5.1-dev 063589bf (5.0.0-rc.8). The lockfile moves only the Platform packages. The upstream V019 wallet-storage migration adds a nullable asset-lock operation id; V001-V018 are unchanged. The compatibility bridge gets the 033ecae destination snapshot it compares against, and the pin guard records the new revision with an unchanged migration fingerprint. BREAKING CHANGE: the wallet storage upgrade to V019 is forward only. An older build cannot open upgraded storage; going back needs a copy of the data directory taken before the upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor: adapt to the rust-dashcore cryptography API The new rust-dashcore wraps secp256k1 keys in EcdsaSecretKey and EcdsaPublicKey, returns secret bytes as Zeroizing, and drops the Secp256k1 context argument. Signers, single-key wallets, DashPay derivation, address and QR handling, migrations and their tests follow the new types. Signing stays on the non-grinding dpp::secp256k1 path, and a parity test pins the BLS signature bytes the previous SDK made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix: adapt to protocol version 14 upstream types Handle the dpp and SDK types the new pin adds, keeping today's behaviour: - Document replace keeps moderated_at and moderated_by; new documents start without them. - The document editor refuses typed-array fields instead of dropping their contents, and keeps referenced key ids as numbers. - Shielded token events show read-only in group actions, and the shielded pool token settings are refused before anything is signed. - Contested document creation states the protocol's base contest fund, so the SDK never auto-quotes a larger one. - Masternode vote reads use ResourceVoteWithCount, the SDK's new vote type; the vote count is not used yet. - New query fields, wallet events, wallet error variants and asset-lock funding modes are handled where the SDK now requires them. - Entropy-only document ids are documented as placeholders from protocol 14, and deferred upstream features link to their issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(sdk): follow the network's protocol version The SDK was pinned to the protocol 13 table, so it could not build any protocol 14 transition or follow the versioned identity lookup. It now starts at upstream's per-network minimum and ratchets to what proven responses report. - System contracts are cached per protocol version and served through accessors. The context provider serves them at the version the proof verifier asks for and fails rather than serve another version's. - A proved epoch sets the fee multiplier and raises the protocol version. An older epoch than the adopted one is ignored. - Rebuilding the connection resets the protocol version, fee multiplier and adopted epoch under one lock before the new SDK is published, and drops reads begun on the old connection. - Capabilities read the network's version through a helper that stays closed for a version this build does not define. - Contest timing reads the live version; retired vote schedules keep the protocol 13 notice window they were created under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(platform): guard the protocol 13 tables and transitions Compare the protocol 13 client tables with a recorded snapshot, so an upstream change to them is reviewed, and check that keys and documents DET builds on a protocol 13 network use encodings protocol 13 decodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain protocol 14 refusals that existing actions can hit Map the refusals the new protocol adds to flows DET already offers to dedicated TaskError variants: a full username contest, a vote choice the contest does not allow, a name someone else asked for first, a token that cannot be moved, a changed immutable document field, a reference to a document type that cannot be deleted, and a moderators' fee on a contract without moderation. Names supplied by the node stay in the typed source only, never in the message. Token operations that fail inside the wallet runtime keep their SDK cause, so they are classified like any SDK error; an unclassified one names the operation that did not complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs: record the Platform v5.1-dev bump and protocol tracking Add a dated design note for the pin, the protocol version sources, the connection state rules and the protocol 13 guards, and point AGENTS.md at From<SdkError> for TaskError as the SDK error reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * feat(tokens): create non-transferable tokens and stop offering their transfer Protocol version 14 lets a token configuration make a token non-transferable, and Platform refuses every transfer of such a token. - My Tokens no longer offers Transfer for a token that cannot be transferred; the disabled button says why. - The token creator offers "Holders can send this token to other identities", on by default. Turning it off uses upstream TokenConfiguration::set_transferable, which moves to a version 1 configuration only for a non-transferable token, so a transferable token keeps the version 0 format older networks accept. - The option is gated on a new NonTransferableTokens capability: the connected protocol version must decode version 1 token configurations. The creator and the backend both refuse a non-transferable token on a network that does not, before anything is signed. - Platform's refusal of a tradeable non-transferable token maps to a dedicated, actionable error. - User story TOK-020. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain moderation, gas sponsorship and distribution limit refusals Protocol version 14 refusals that flows already in DET can hit get dedicated, actionable messages, each keeping the SDK error as its source: - an identity banned or suspended (until when) on a moderated contract; - a gas sponsor short of credits, a gas payer the document type does not offer, and mixed gas payers in one batch; - pre-programmed token distributions of one time over the limit. An overflowing shielded note total is logged at warn: it means corrupt or hostile sync data, not routine noise. Tests cover contracts saved at protocol 12 loading unchanged at 13 and 14, and contracts saved at 14 decoding at 13 and in full again at 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): keep one system contract set per protocol version A lookup at another version, as the proof verifier makes at a response's version, swapped out the app's set, so each such lookup reloaded the system contracts and the next app read reloaded them again. Each version now keeps its own set; the app's reads keep the set they last got for a failed reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(platform): confirm only a verified protocol version without the epoch When the epoch cannot be read, the proved DPNS fallback confirmed the SDK's version, which starts at the network's upstream minimum (14 on devnet), as the network's. It now confirms the version of the responses the SDK verified, and nothing before any. Restores the completed-withdrawal status list with the reason sending FAILED to a protocol 13 network is safe, and its test, now comparing the protocol 13 schema with the latest one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): erase the secp256k1 signing key after use The derived key DET signs with is copied into secp256k1's own type, which keeps its bytes after use. Wrap it so it is erased on drop, as the derived key it comes from would be; signatures stay byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(protocol): guard a contested name built with the contest fund at protocol 13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(ui): say plainly what the app cannot edit or sign yet The new refusals sent users to another document editor or token client. They now say the app cannot edit this field type, sign this action or change this token setting yet, in one wording, and the shielded setting refusal sits with the token contract errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * chore: keep AGENTS.md and the marketplace comment as on v1.0-dev Also corrects the platform compatibility fixtures README: no code reads e3cd7cf.sql any more; it is the V001-V018 checksum reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): gate non-transferable tokens on protocol 14 like the rest Capability::NonTransferableTokens opens from protocol version 14 through known_protocol_version_at_least, like every other protocol capability, instead of probing the token configuration format version (which feature_gate.rs itself warns against). The token creator's local refusal and disabled-checkbox hint reuse TaskError::NonTransferableTokenNotSupported's text instead of copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(test): prove the protocol version the headless refresh learns The protocol version fallback takes only a version the SDK verified, and a mock expectation's metadata is never recorded as verified, so the three headless refresh tests saw the version stay unconfirmed. The mock now has the SDK accept the version from metadata treated as proved, as after a live network's signed response, and a new test pins that a response the SDK never verified leaves the version unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 transition encoding tests The SDK picks each transition's encoding from the platform version DET passes in, so these tests checked dpp's version tables rather than DET. The mainnet start version and the contest fund cap stay covered by the platform_info and fee_estimation tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): read the network's protocol version from the SDK The SDK at this pin already tracks the version the network has proven: it records the version of every response whose proof and quorum signature it verified, and a rebuilt connection is a new SDK that starts from nothing. DET's own copy, raised from proved epochs and DPNS reads and reset on every rebuild, duplicated that state. The app now reads the current SDK's verified version; capabilities still stay closed before a version is proven and for one this build does not define, and network info shows the proven number or says none is confirmed. Proved epochs still set the fee multiplier, in epoch order and only on the current connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): set the fee multiplier from each proved epoch read A connection rebuild never changes the chain, the multiplier changes once per epoch and feeds only fee estimates, so ordering epoch reads and dropping those begun before a rebuild guarded against nothing worth the machinery. A proved epoch read sets the multiplier directly again; an unavailable epoch still keeps the last known value and labels it as such. A rebuild still reads the epoch, so the new SDK proves the network's version again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs(context): say why proved epochs need no ordering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 client tables snapshot A released protocol's tables and each network's minimum version are upstream's to keep fixed; DET's start is covered by platform_version_starts_at_the_network_minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): decode saved contracts at the proof verifier's version The proof verifier asks for contracts at the version it verifies with, which can be newer than the SDK's. System contracts were already served at that version; a saved user contract was decoded at the SDK's version instead, dropping newer-protocol settings such as action fees. The fallback now decodes it at the version asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): report a failed signed-message envelope instead of panicking Building the recoverable-signature envelope returns an error upstream; it is now reported as the existing message-signing failure, with the detail logged, instead of aborting the signing path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * style: drop blank lines left by the removed secp256k1 context Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): prove protocol versions through the SDK in the non-transferable tests #1114 removed DET's protocol version copy. The tests prove versions through the SDK, which only raises them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): never hide or silently flip the transferability choice A choice to make a token non-transferable could be made in Advanced mode, stay hidden in Simple mode, and be signed without the confirmation saying so. And whenever the network's support was not confirmed yet, the creator silently flipped the choice back to transferable on that frame. - The "Holders can send this token to other identities" checkbox is shown in Simple mode too, so nothing hidden is submitted. - The choice is kept while the network does not (yet) accept non-transferable tokens; allowing transfers again stays possible. The existing NonTransferableTokenNotSupported reason shows next to the checkbox and blocks "Create Token" and "Register Token Contract" (with the reason next to and on hover over the blocked button). The backend still refuses it too. - The confirmation states what gets signed: "Holders can send this token to other identities." or "Holders cannot send this token to other identities. This cannot be changed later." - The Simple-mode hint below "Create Token" is now one complete sentence per case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q --------- Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…eate Token shortcut (#1129) * build(deps)!: update Platform to v5.1-dev 063589bf Pin dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and platform-wallet-storage to dashpay/platform v5.1-dev 063589bf (5.0.0-rc.8). The lockfile moves only the Platform packages. The upstream V019 wallet-storage migration adds a nullable asset-lock operation id; V001-V018 are unchanged. The compatibility bridge gets the 033ecae destination snapshot it compares against, and the pin guard records the new revision with an unchanged migration fingerprint. BREAKING CHANGE: the wallet storage upgrade to V019 is forward only. An older build cannot open upgraded storage; going back needs a copy of the data directory taken before the upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor: adapt to the rust-dashcore cryptography API The new rust-dashcore wraps secp256k1 keys in EcdsaSecretKey and EcdsaPublicKey, returns secret bytes as Zeroizing, and drops the Secp256k1 context argument. Signers, single-key wallets, DashPay derivation, address and QR handling, migrations and their tests follow the new types. Signing stays on the non-grinding dpp::secp256k1 path, and a parity test pins the BLS signature bytes the previous SDK made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix: adapt to protocol version 14 upstream types Handle the dpp and SDK types the new pin adds, keeping today's behaviour: - Document replace keeps moderated_at and moderated_by; new documents start without them. - The document editor refuses typed-array fields instead of dropping their contents, and keeps referenced key ids as numbers. - Shielded token events show read-only in group actions, and the shielded pool token settings are refused before anything is signed. - Contested document creation states the protocol's base contest fund, so the SDK never auto-quotes a larger one. - Masternode vote reads use ResourceVoteWithCount, the SDK's new vote type; the vote count is not used yet. - New query fields, wallet events, wallet error variants and asset-lock funding modes are handled where the SDK now requires them. - Entropy-only document ids are documented as placeholders from protocol 14, and deferred upstream features link to their issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(sdk): follow the network's protocol version The SDK was pinned to the protocol 13 table, so it could not build any protocol 14 transition or follow the versioned identity lookup. It now starts at upstream's per-network minimum and ratchets to what proven responses report. - System contracts are cached per protocol version and served through accessors. The context provider serves them at the version the proof verifier asks for and fails rather than serve another version's. - A proved epoch sets the fee multiplier and raises the protocol version. An older epoch than the adopted one is ignored. - Rebuilding the connection resets the protocol version, fee multiplier and adopted epoch under one lock before the new SDK is published, and drops reads begun on the old connection. - Capabilities read the network's version through a helper that stays closed for a version this build does not define. - Contest timing reads the live version; retired vote schedules keep the protocol 13 notice window they were created under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(platform): guard the protocol 13 tables and transitions Compare the protocol 13 client tables with a recorded snapshot, so an upstream change to them is reviewed, and check that keys and documents DET builds on a protocol 13 network use encodings protocol 13 decodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain protocol 14 refusals that existing actions can hit Map the refusals the new protocol adds to flows DET already offers to dedicated TaskError variants: a full username contest, a vote choice the contest does not allow, a name someone else asked for first, a token that cannot be moved, a changed immutable document field, a reference to a document type that cannot be deleted, and a moderators' fee on a contract without moderation. Names supplied by the node stay in the typed source only, never in the message. Token operations that fail inside the wallet runtime keep their SDK cause, so they are classified like any SDK error; an unclassified one names the operation that did not complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs: record the Platform v5.1-dev bump and protocol tracking Add a dated design note for the pin, the protocol version sources, the connection state rules and the protocol 13 guards, and point AGENTS.md at From<SdkError> for TaskError as the SDK error reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * feat(tokens): create non-transferable tokens and stop offering their transfer Protocol version 14 lets a token configuration make a token non-transferable, and Platform refuses every transfer of such a token. - My Tokens no longer offers Transfer for a token that cannot be transferred; the disabled button says why. - The token creator offers "Holders can send this token to other identities", on by default. Turning it off uses upstream TokenConfiguration::set_transferable, which moves to a version 1 configuration only for a non-transferable token, so a transferable token keeps the version 0 format older networks accept. - The option is gated on a new NonTransferableTokens capability: the connected protocol version must decode version 1 token configurations. The creator and the backend both refuse a non-transferable token on a network that does not, before anything is signed. - Platform's refusal of a tradeable non-transferable token maps to a dedicated, actionable error. - User story TOK-020. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain moderation, gas sponsorship and distribution limit refusals Protocol version 14 refusals that flows already in DET can hit get dedicated, actionable messages, each keeping the SDK error as its source: - an identity banned or suspended (until when) on a moderated contract; - a gas sponsor short of credits, a gas payer the document type does not offer, and mixed gas payers in one batch; - pre-programmed token distributions of one time over the limit. An overflowing shielded note total is logged at warn: it means corrupt or hostile sync data, not routine noise. Tests cover contracts saved at protocol 12 loading unchanged at 13 and 14, and contracts saved at 14 decoding at 13 and in full again at 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): keep one system contract set per protocol version A lookup at another version, as the proof verifier makes at a response's version, swapped out the app's set, so each such lookup reloaded the system contracts and the next app read reloaded them again. Each version now keeps its own set; the app's reads keep the set they last got for a failed reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(platform): confirm only a verified protocol version without the epoch When the epoch cannot be read, the proved DPNS fallback confirmed the SDK's version, which starts at the network's upstream minimum (14 on devnet), as the network's. It now confirms the version of the responses the SDK verified, and nothing before any. Restores the completed-withdrawal status list with the reason sending FAILED to a protocol 13 network is safe, and its test, now comparing the protocol 13 schema with the latest one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): erase the secp256k1 signing key after use The derived key DET signs with is copied into secp256k1's own type, which keeps its bytes after use. Wrap it so it is erased on drop, as the derived key it comes from would be; signatures stay byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(protocol): guard a contested name built with the contest fund at protocol 13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(ui): say plainly what the app cannot edit or sign yet The new refusals sent users to another document editor or token client. They now say the app cannot edit this field type, sign this action or change this token setting yet, in one wording, and the shielded setting refusal sits with the token contract errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * chore: keep AGENTS.md and the marketplace comment as on v1.0-dev Also corrects the platform compatibility fixtures README: no code reads e3cd7cf.sql any more; it is the V001-V018 checksum reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): gate non-transferable tokens on protocol 14 like the rest Capability::NonTransferableTokens opens from protocol version 14 through known_protocol_version_at_least, like every other protocol capability, instead of probing the token configuration format version (which feature_gate.rs itself warns against). The token creator's local refusal and disabled-checkbox hint reuse TaskError::NonTransferableTokenNotSupported's text instead of copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(test): prove the protocol version the headless refresh learns The protocol version fallback takes only a version the SDK verified, and a mock expectation's metadata is never recorded as verified, so the three headless refresh tests saw the version stay unconfirmed. The mock now has the SDK accept the version from metadata treated as proved, as after a live network's signed response, and a new test pins that a response the SDK never verified leaves the version unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 transition encoding tests The SDK picks each transition's encoding from the platform version DET passes in, so these tests checked dpp's version tables rather than DET. The mainnet start version and the contest fund cap stay covered by the platform_info and fee_estimation tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): read the network's protocol version from the SDK The SDK at this pin already tracks the version the network has proven: it records the version of every response whose proof and quorum signature it verified, and a rebuilt connection is a new SDK that starts from nothing. DET's own copy, raised from proved epochs and DPNS reads and reset on every rebuild, duplicated that state. The app now reads the current SDK's verified version; capabilities still stay closed before a version is proven and for one this build does not define, and network info shows the proven number or says none is confirmed. Proved epochs still set the fee multiplier, in epoch order and only on the current connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): set the fee multiplier from each proved epoch read A connection rebuild never changes the chain, the multiplier changes once per epoch and feeds only fee estimates, so ordering epoch reads and dropping those begun before a rebuild guarded against nothing worth the machinery. A proved epoch read sets the multiplier directly again; an unavailable epoch still keeps the last known value and labels it as such. A rebuild still reads the epoch, so the new SDK proves the network's version again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs(context): say why proved epochs need no ordering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 client tables snapshot A released protocol's tables and each network's minimum version are upstream's to keep fixed; DET's start is covered by platform_version_starts_at_the_network_minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): decode saved contracts at the proof verifier's version The proof verifier asks for contracts at the version it verifies with, which can be newer than the SDK's. System contracts were already served at that version; a saved user contract was decoded at the SDK's version instead, dropping newer-protocol settings such as action fees. The fallback now decodes it at the version asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): report a failed signed-message envelope instead of panicking Building the recoverable-signature envelope returns an error upstream; it is now reported as the existing message-signing failure, with the detail logged, instead of aborting the signing path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * style: drop blank lines left by the removed secp256k1 context Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): prove protocol versions through the SDK in the non-transferable tests #1114 removed DET's protocol version copy. The tests prove versions through the SDK, which only raises them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): keep token action forms under their heading and add a Create Token shortcut The shared token action scaffold (mint, burn, freeze, unfreeze, destroy frozen funds, pause, resume) placed its "Advanced Options" checkbox in a bare right-to-left layout inside the top-down central panel. egui gives such a layout all remaining height and centres the checkbox vertically in it, so the form started at the bottom of the window. The checkbox now shares the heading's row, as on the transfer, claim, purchase, set price and update config screens. My Tokens gains a "Create Token" toolbar button that switches to the Token Creator through a new typed DesiredAppAction::SetMainScreen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): never hide or silently flip the transferability choice A choice to make a token non-transferable could be made in Advanced mode, stay hidden in Simple mode, and be signed without the confirmation saying so. And whenever the network's support was not confirmed yet, the creator silently flipped the choice back to transferable on that frame. - The "Holders can send this token to other identities" checkbox is shown in Simple mode too, so nothing hidden is submitted. - The choice is kept while the network does not (yet) accept non-transferable tokens; allowing transfers again stays possible. The existing NonTransferableTokenNotSupported reason shows next to the checkbox and blocks "Create Token" and "Register Token Contract" (with the reason next to and on hover over the blocked button). The backend still refuses it too. - The confirmation states what gets signed: "Holders can send this token to other identities." or "Holders cannot send this token to other identities. This cannot be changed later." - The Simple-mode hint below "Create Token" is now one complete sentence per case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q --------- Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…1119) * build(deps)!: update Platform to v5.1-dev 063589bf Pin dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and platform-wallet-storage to dashpay/platform v5.1-dev 063589bf (5.0.0-rc.8). The lockfile moves only the Platform packages. The upstream V019 wallet-storage migration adds a nullable asset-lock operation id; V001-V018 are unchanged. The compatibility bridge gets the 033ecae destination snapshot it compares against, and the pin guard records the new revision with an unchanged migration fingerprint. BREAKING CHANGE: the wallet storage upgrade to V019 is forward only. An older build cannot open upgraded storage; going back needs a copy of the data directory taken before the upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor: adapt to the rust-dashcore cryptography API The new rust-dashcore wraps secp256k1 keys in EcdsaSecretKey and EcdsaPublicKey, returns secret bytes as Zeroizing, and drops the Secp256k1 context argument. Signers, single-key wallets, DashPay derivation, address and QR handling, migrations and their tests follow the new types. Signing stays on the non-grinding dpp::secp256k1 path, and a parity test pins the BLS signature bytes the previous SDK made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix: adapt to protocol version 14 upstream types Handle the dpp and SDK types the new pin adds, keeping today's behaviour: - Document replace keeps moderated_at and moderated_by; new documents start without them. - The document editor refuses typed-array fields instead of dropping their contents, and keeps referenced key ids as numbers. - Shielded token events show read-only in group actions, and the shielded pool token settings are refused before anything is signed. - Contested document creation states the protocol's base contest fund, so the SDK never auto-quotes a larger one. - Masternode vote reads use ResourceVoteWithCount, the SDK's new vote type; the vote count is not used yet. - New query fields, wallet events, wallet error variants and asset-lock funding modes are handled where the SDK now requires them. - Entropy-only document ids are documented as placeholders from protocol 14, and deferred upstream features link to their issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(sdk): follow the network's protocol version The SDK was pinned to the protocol 13 table, so it could not build any protocol 14 transition or follow the versioned identity lookup. It now starts at upstream's per-network minimum and ratchets to what proven responses report. - System contracts are cached per protocol version and served through accessors. The context provider serves them at the version the proof verifier asks for and fails rather than serve another version's. - A proved epoch sets the fee multiplier and raises the protocol version. An older epoch than the adopted one is ignored. - Rebuilding the connection resets the protocol version, fee multiplier and adopted epoch under one lock before the new SDK is published, and drops reads begun on the old connection. - Capabilities read the network's version through a helper that stays closed for a version this build does not define. - Contest timing reads the live version; retired vote schedules keep the protocol 13 notice window they were created under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(platform): guard the protocol 13 tables and transitions Compare the protocol 13 client tables with a recorded snapshot, so an upstream change to them is reviewed, and check that keys and documents DET builds on a protocol 13 network use encodings protocol 13 decodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain protocol 14 refusals that existing actions can hit Map the refusals the new protocol adds to flows DET already offers to dedicated TaskError variants: a full username contest, a vote choice the contest does not allow, a name someone else asked for first, a token that cannot be moved, a changed immutable document field, a reference to a document type that cannot be deleted, and a moderators' fee on a contract without moderation. Names supplied by the node stay in the typed source only, never in the message. Token operations that fail inside the wallet runtime keep their SDK cause, so they are classified like any SDK error; an unclassified one names the operation that did not complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs: record the Platform v5.1-dev bump and protocol tracking Add a dated design note for the pin, the protocol version sources, the connection state rules and the protocol 13 guards, and point AGENTS.md at From<SdkError> for TaskError as the SDK error reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * feat(tokens): create and claim once-per-identity token distributions Protocol version 14 adds a once-per-identity distribution: every identity may claim a fixed amount of a token exactly once. - The token creator offers the distribution with the amount each identity can claim, gated on a new OncePerIdentityDistribution capability. Without it the rules stay version 0, the format older networks accept. The creator and the backend both refuse it on a network that does not accept it, before anything is signed. The registration estimate prices every term, including the distribution's extra fee, from the fee table of the network's confirmed protocol version. - The Claim screen and My Tokens show the distribution. The claim confirmation names the distribution (and, for this one, the amount), and confirming sends exactly the claim that was shown. - A successful claim records an advisory hint per identity and token, at the proved claim's block time. The Claim screen shows it without ever blocking a claim, and dismissing it is saved through a backend task. A node's unproven "already claimed" refusal is never recorded. A claim that succeeded but could not be recorded is reported as made, so the user is not invited to claim again. - Platform's refusals (already claimed, invalid amount) map to dedicated, actionable errors. - A protocol 13 guard checks the distribution is never silently dropped when encoded for protocol 13. - User story TOK-019. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain moderation, gas sponsorship and distribution limit refusals Protocol version 14 refusals that flows already in DET can hit get dedicated, actionable messages, each keeping the SDK error as its source: - an identity banned or suspended (until when) on a moderated contract; - a gas sponsor short of credits, a gas payer the document type does not offer, and mixed gas payers in one batch; - pre-programmed token distributions of one time over the limit. An overflowing shielded note total is logged at warn: it means corrupt or hostile sync data, not routine noise. Tests cover contracts saved at protocol 12 loading unchanged at 13 and 14, and contracts saved at 14 decoding at 13 and in full again at 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): keep one system contract set per protocol version A lookup at another version, as the proof verifier makes at a response's version, swapped out the app's set, so each such lookup reloaded the system contracts and the next app read reloaded them again. Each version now keeps its own set; the app's reads keep the set they last got for a failed reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(platform): confirm only a verified protocol version without the epoch When the epoch cannot be read, the proved DPNS fallback confirmed the SDK's version, which starts at the network's upstream minimum (14 on devnet), as the network's. It now confirms the version of the responses the SDK verified, and nothing before any. Restores the completed-withdrawal status list with the reason sending FAILED to a protocol 13 network is safe, and its test, now comparing the protocol 13 schema with the latest one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): erase the secp256k1 signing key after use The derived key DET signs with is copied into secp256k1's own type, which keeps its bytes after use. Wrap it so it is erased on drop, as the derived key it comes from would be; signatures stay byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(protocol): guard a contested name built with the contest fund at protocol 13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(ui): say plainly what the app cannot edit or sign yet The new refusals sent users to another document editor or token client. They now say the app cannot edit this field type, sign this action or change this token setting yet, in one wording, and the shielded setting refusal sits with the token contract errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * chore: keep AGENTS.md and the marketplace comment as on v1.0-dev Also corrects the platform compatibility fixtures README: no code reads e3cd7cf.sql any more; it is the V001-V018 checksum reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): stop retrying a refused once-per-identity claim After the network refuses a second once-per-identity claim, the Claim screen turns Claim off for that distribution while it is open and says why, so a retry is not charged again. The refusal is unproven node output, so it is never saved as the claim hint. The token creator's registration estimate moves into model::fee_estimation, the local refusal and the disabled-checkbox hint reuse TaskError::TokenOncePerIdentityNotSupported's text, and the claim reuses its token id instead of computing it twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): word the once-per-identity refusal like the non-transferable one Both refusals describe the same situation, a network below protocol 14, so they now open the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(test): prove the protocol version the headless refresh learns The protocol version fallback takes only a version the SDK verified, and a mock expectation's metadata is never recorded as verified, so the three headless refresh tests saw the version stay unconfirmed. The mock now has the SDK accept the version from metadata treated as proved, as after a live network's signed response, and a new test pins that a response the SDK never verified leaves the version unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 transition encoding tests The SDK picks each transition's encoding from the platform version DET passes in, so these tests checked dpp's version tables rather than DET. The mainnet start version and the contest fund cap stay covered by the platform_info and fee_estimation tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): read the network's protocol version from the SDK The SDK at this pin already tracks the version the network has proven: it records the version of every response whose proof and quorum signature it verified, and a rebuilt connection is a new SDK that starts from nothing. DET's own copy, raised from proved epochs and DPNS reads and reset on every rebuild, duplicated that state. The app now reads the current SDK's verified version; capabilities still stay closed before a version is proven and for one this build does not define, and network info shows the proven number or says none is confirmed. Proved epochs still set the fee multiplier, in epoch order and only on the current connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): set the fee multiplier from each proved epoch read A connection rebuild never changes the chain, the multiplier changes once per epoch and feeds only fee estimates, so ordering epoch reads and dropping those begun before a rebuild guarded against nothing worth the machinery. A proved epoch read sets the multiplier directly again; an unavailable epoch still keeps the last known value and labels it as such. A rebuild still reads the epoch, so the new SDK proves the network's version again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs(context): say why proved epochs need no ordering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 client tables snapshot A released protocol's tables and each network's minimum version are upstream's to keep fixed; DET's start is covered by platform_version_starts_at_the_network_minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): decode saved contracts at the proof verifier's version The proof verifier asks for contracts at the version it verifies with, which can be newer than the SDK's. System contracts were already served at that version; a saved user contract was decoded at the SDK's version instead, dropping newer-protocol settings such as action fees. The fallback now decodes it at the version asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): report a failed signed-message envelope instead of panicking Building the recoverable-signature envelope returns an error upstream; it is now reported as the existing message-signing failure, with the detail logged, instead of aborting the signing path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * style: drop blank lines left by the removed secp256k1 context Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): read the protocol version from the SDK after the Platform bump merge #1114 removed DET's protocol version copy. The token registration fee estimate reads the SDK's version, and the once-per-identity tests prove versions through the SDK, which only raises them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q --------- Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… it shows (#1130) * build(deps)!: update Platform to v5.1-dev 063589bf Pin dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and platform-wallet-storage to dashpay/platform v5.1-dev 063589bf (5.0.0-rc.8). The lockfile moves only the Platform packages. The upstream V019 wallet-storage migration adds a nullable asset-lock operation id; V001-V018 are unchanged. The compatibility bridge gets the 033ecae destination snapshot it compares against, and the pin guard records the new revision with an unchanged migration fingerprint. BREAKING CHANGE: the wallet storage upgrade to V019 is forward only. An older build cannot open upgraded storage; going back needs a copy of the data directory taken before the upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor: adapt to the rust-dashcore cryptography API The new rust-dashcore wraps secp256k1 keys in EcdsaSecretKey and EcdsaPublicKey, returns secret bytes as Zeroizing, and drops the Secp256k1 context argument. Signers, single-key wallets, DashPay derivation, address and QR handling, migrations and their tests follow the new types. Signing stays on the non-grinding dpp::secp256k1 path, and a parity test pins the BLS signature bytes the previous SDK made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix: adapt to protocol version 14 upstream types Handle the dpp and SDK types the new pin adds, keeping today's behaviour: - Document replace keeps moderated_at and moderated_by; new documents start without them. - The document editor refuses typed-array fields instead of dropping their contents, and keeps referenced key ids as numbers. - Shielded token events show read-only in group actions, and the shielded pool token settings are refused before anything is signed. - Contested document creation states the protocol's base contest fund, so the SDK never auto-quotes a larger one. - Masternode vote reads use ResourceVoteWithCount, the SDK's new vote type; the vote count is not used yet. - New query fields, wallet events, wallet error variants and asset-lock funding modes are handled where the SDK now requires them. - Entropy-only document ids are documented as placeholders from protocol 14, and deferred upstream features link to their issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(sdk): follow the network's protocol version The SDK was pinned to the protocol 13 table, so it could not build any protocol 14 transition or follow the versioned identity lookup. It now starts at upstream's per-network minimum and ratchets to what proven responses report. - System contracts are cached per protocol version and served through accessors. The context provider serves them at the version the proof verifier asks for and fails rather than serve another version's. - A proved epoch sets the fee multiplier and raises the protocol version. An older epoch than the adopted one is ignored. - Rebuilding the connection resets the protocol version, fee multiplier and adopted epoch under one lock before the new SDK is published, and drops reads begun on the old connection. - Capabilities read the network's version through a helper that stays closed for a version this build does not define. - Contest timing reads the live version; retired vote schedules keep the protocol 13 notice window they were created under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(platform): guard the protocol 13 tables and transitions Compare the protocol 13 client tables with a recorded snapshot, so an upstream change to them is reviewed, and check that keys and documents DET builds on a protocol 13 network use encodings protocol 13 decodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain protocol 14 refusals that existing actions can hit Map the refusals the new protocol adds to flows DET already offers to dedicated TaskError variants: a full username contest, a vote choice the contest does not allow, a name someone else asked for first, a token that cannot be moved, a changed immutable document field, a reference to a document type that cannot be deleted, and a moderators' fee on a contract without moderation. Names supplied by the node stay in the typed source only, never in the message. Token operations that fail inside the wallet runtime keep their SDK cause, so they are classified like any SDK error; an unclassified one names the operation that did not complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs: record the Platform v5.1-dev bump and protocol tracking Add a dated design note for the pin, the protocol version sources, the connection state rules and the protocol 13 guards, and point AGENTS.md at From<SdkError> for TaskError as the SDK error reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * feat(tokens): create non-transferable tokens and stop offering their transfer Protocol version 14 lets a token configuration make a token non-transferable, and Platform refuses every transfer of such a token. - My Tokens no longer offers Transfer for a token that cannot be transferred; the disabled button says why. - The token creator offers "Holders can send this token to other identities", on by default. Turning it off uses upstream TokenConfiguration::set_transferable, which moves to a version 1 configuration only for a non-transferable token, so a transferable token keeps the version 0 format older networks accept. - The option is gated on a new NonTransferableTokens capability: the connected protocol version must decode version 1 token configurations. The creator and the backend both refuse a non-transferable token on a network that does not, before anything is signed. - Platform's refusal of a tradeable non-transferable token maps to a dedicated, actionable error. - User story TOK-020. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(errors): explain moderation, gas sponsorship and distribution limit refusals Protocol version 14 refusals that flows already in DET can hit get dedicated, actionable messages, each keeping the SDK error as its source: - an identity banned or suspended (until when) on a moderated contract; - a gas sponsor short of credits, a gas payer the document type does not offer, and mixed gas payers in one batch; - pre-programmed token distributions of one time over the limit. An overflowing shielded note total is logged at warn: it means corrupt or hostile sync data, not routine noise. Tests cover contracts saved at protocol 12 loading unchanged at 13 and 14, and contracts saved at 14 decoding at 13 and in full again at 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): keep one system contract set per protocol version A lookup at another version, as the proof verifier makes at a response's version, swapped out the app's set, so each such lookup reloaded the system contracts and the next app read reloaded them again. Each version now keeps its own set; the app's reads keep the set they last got for a failed reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(platform): confirm only a verified protocol version without the epoch When the epoch cannot be read, the proved DPNS fallback confirmed the SDK's version, which starts at the network's upstream minimum (14 on devnet), as the network's. It now confirms the version of the responses the SDK verified, and nothing before any. Restores the completed-withdrawal status list with the reason sending FAILED to a protocol 13 network is safe, and its test, now comparing the protocol 13 schema with the latest one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): erase the secp256k1 signing key after use The derived key DET signs with is copied into secp256k1's own type, which keeps its bytes after use. Wrap it so it is erased on drop, as the derived key it comes from would be; signatures stay byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test(protocol): guard a contested name built with the contest fund at protocol 13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(ui): say plainly what the app cannot edit or sign yet The new refusals sent users to another document editor or token client. They now say the app cannot edit this field type, sign this action or change this token setting yet, in one wording, and the shielded setting refusal sits with the token contract errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * chore: keep AGENTS.md and the marketplace comment as on v1.0-dev Also corrects the platform compatibility fixtures README: no code reads e3cd7cf.sql any more; it is the V001-V018 checksum reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): gate non-transferable tokens on protocol 14 like the rest Capability::NonTransferableTokens opens from protocol version 14 through known_protocol_version_at_least, like every other protocol capability, instead of probing the token configuration format version (which feature_gate.rs itself warns against). The token creator's local refusal and disabled-checkbox hint reuse TaskError::NonTransferableTokenNotSupported's text instead of copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(test): prove the protocol version the headless refresh learns The protocol version fallback takes only a version the SDK verified, and a mock expectation's metadata is never recorded as verified, so the three headless refresh tests saw the version stay unconfirmed. The mock now has the SDK accept the version from metadata treated as proved, as after a live network's signed response, and a new test pins that a response the SDK never verified leaves the version unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 transition encoding tests The SDK picks each transition's encoding from the platform version DET passes in, so these tests checked dpp's version tables rather than DET. The mainnet start version and the contest fund cap stay covered by the platform_info and fee_estimation tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): read the network's protocol version from the SDK The SDK at this pin already tracks the version the network has proven: it records the version of every response whose proof and quorum signature it verified, and a rebuilt connection is a new SDK that starts from nothing. DET's own copy, raised from proved epochs and DPNS reads and reset on every rebuild, duplicated that state. The app now reads the current SDK's verified version; capabilities still stay closed before a version is proven and for one this build does not define, and network info shows the proven number or says none is confirmed. Proved epochs still set the fee multiplier, in epoch order and only on the current connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * refactor(context): set the fee multiplier from each proved epoch read A connection rebuild never changes the chain, the multiplier changes once per epoch and feeds only fee estimates, so ordering epoch reads and dropping those begun before a rebuild guarded against nothing worth the machinery. A proved epoch read sets the multiplier directly again; an unavailable epoch still keeps the last known value and labels it as such. A rebuild still reads the epoch, so the new SDK proves the network's version again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * docs(context): say why proved epochs need no ordering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * test: drop the protocol 13 client tables snapshot A released protocol's tables and each network's minimum version are upstream's to keep fixed; DET's start is covered by platform_version_starts_at_the_network_minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(context): decode saved contracts at the proof verifier's version The proof verifier asks for contracts at the version it verifies with, which can be newer than the SDK's. System contracts were already served at that version; a saved user contract was decoded at the SDK's version instead, dropping newer-protocol settings such as action fees. The fallback now decodes it at the version asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(wallet): report a failed signed-message envelope instead of panicking Building the recoverable-signature envelope returns an error upstream; it is now reported as the existing message-signing failure, with the detail logged, instead of aborting the signing path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * style: drop blank lines left by the removed secp256k1 context Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): prove protocol versions through the SDK in the non-transferable tests #1114 removed DET's protocol version copy. The tests prove versions through the SDK, which only raises them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): build exactly the preset the Token Creator shows Leaving the Token Creator (subscreen tab, left panel, or "Back" after a successful creation) reset every action rule to "no one" but kept the previously chosen preset on screen. Coming back, the creator still showed "All Allowed" and let the user create the token, which was then registered with no actions allowed at all - permanently, since a token's rules can only be changed by whoever the rules authorize. - One preset-to-rules mapping (`PresetRules`) now both applies a preset and checks that the rules on screen still match it. - The shown preset is reconciled against the rules every frame, so a reset form shows "Select a preset..." and an Advanced-mode rule edit shows "Custom" instead of a preset that will not be built. - The form reset also clears the preset, the cached build arguments and the cached confirmation dialog, and restores the defaults it missed (transfers to frozen identities, minting to the contract owner, distribution unit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): keep the Token Creator form across navigation Leaving the Token Creator to do something else (top up the identity, check My Tokens) and coming back used to wipe the whole form. The form, the chosen preset and its rules now survive navigation; the creator starts over only after a finished creation or a network switch (its identity belongs to the previous network). The preset selector now has three explicit states: "Select a preset..." for a creator where no preset or rule was chosen yet (Simple mode keeps "Create Token" disabled), the preset's name while the rules match it, and "Custom" as soon as they do not. "Custom" is shown in both Simple and Advanced mode, is a valid choice to create the token from, and picking a preset again re-applies its rules. The "Create Token" hint is now a complete sentence per case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): require a preset choice before registering in Advanced mode Advanced mode's "Register Token Contract" now stays blocked until a preset or individually chosen ("Custom") rules are picked, the same as Simple mode's "Create Token", and shows the same "Select a token preset to continue." hint. An untouched creator therefore never registers its all-"no one" starting rules by accident. The navigation kittest now checks the "Create Token" gate through its hint: the primary-button helper does not mark a blocked button as disabled for accessibility, so the previous check could not fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): say next to the create buttons why they are blocked The reason "Create Token" or "Register Token Contract" is blocked is now a visible hint right next to the button, and the same text is its hover tooltip (`disabled_tooltip`), so it no longer depends on hovering. - Simple mode, no preset yet: "Choose a preset to create the token." - Advanced mode, no preset yet: "Choose a preset, or Custom to use the rules below." - Simple mode still names a missing token name or initial supply first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): presets build Platform's full preset configuration The Token Creator presets now take every value from Platform's own `TokenConfigurationPreset::token_configuration_v0` (with direct pricing) instead of a hand-written mapping, which had drifted: - Minting may choose the destination identity (`minting_allow_choosing_destination`) was never turned on; Platform's presets turn it on, so "All Allowed" now lets the owner mint to a chosen identity. - Marketplace trade-mode and direct-purchase-pricing change rules used the "advanced" rules; Platform uses the "basic" ones. This only changes "Minting and Burning", whose owner can now manage both. The choosing-destination switch counts when matching rules to a preset, so turning it off after picking a preset shows "Custom". New tokens still go to the contract owner by default, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): never hide or silently flip the transferability choice A choice to make a token non-transferable could be made in Advanced mode, stay hidden in Simple mode, and be signed without the confirmation saying so. And whenever the network's support was not confirmed yet, the creator silently flipped the choice back to transferable on that frame. - The "Holders can send this token to other identities" checkbox is shown in Simple mode too, so nothing hidden is submitted. - The choice is kept while the network does not (yet) accept non-transferable tokens; allowing transfers again stays possible. The existing NonTransferableTokenNotSupported reason shows next to the checkbox and blocks "Create Token" and "Register Token Contract" (with the reason next to and on hover over the blocked button). The backend still refuses it too. - The confirmation states what gets signed: "Holders can send this token to other identities." or "Holders cannot send this token to other identities. This cannot be changed later." - The Simple-mode hint below "Create Token" is now one complete sentence per case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * perf(tokens): derive each preset's rules once, not every frame The preset selector reconciles against the rules every frame, and deriving a preset's rules builds Platform's whole token configuration. The creator's presets and its starting rules are now derived once (`LazyLock`) and compared by reference; applying a preset is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): close the wallet unlock popup on a network switch The Token Creator's network-switch reset dropped the selected wallet but left the wallet unlock popup open, so it came back for the next wallet the user selected on the new network. The reset now closes it, which also clears its passphrase dialog state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): ignore a registration result from before a network switch A token registration sent on one network could finish after a switch and, with the Token Creator in view, show its success screen (or mark it failed) on the new network. The creator now accepts a registration's success or failure only while it is waiting for one; the network-switch reset clears that, so a late result is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q * fix(tokens): close the contract JSON popup when the creator resets Advanced mode's "View JSON" popup survived the Token Creator reset, so after a network switch (or a finished creation) it could still show the contract built from the previous form. The reset now closes it and drops its text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q --------- Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
TL;DR: Moves Dash Evo Tool to the current Platform release candidate so it keeps working on mainnet (protocol 13) and on testnet, which has already moved to protocol 14. Existing wallets and identities carry over. No new features.
User story
As a wallet user, I want to keep using my existing wallets and identities on mainnet and testnet after the Platform upgrade.
Scenario
Actual behavior
Testnet runs protocol 14. The app is pinned to protocol 13, so it cannot follow the network: identity lookup and transactions use the old format.
Expected behavior
The app starts at the lowest protocol version the network still runs, learns the real version from signed network answers, and uses that version's format. Mainnet keeps working as before.
Detailed discussion
Dependency pin
dash-sdk,rs-sdk-trusted-context-provider,platform-walletandplatform-wallet-storageare pinned to Platform v5.1-dev063589bf0adbe1a8823a943cee95385b423b0e3f(5.0.0-rc.8).check-pin-ancestry.shpasses.Cargo.lockmoves only Platform packages and their dependencies. That includes the new rust-dashcore cryptography stack:secp256k10.33,blst0.3.17 andzeroize1.9 come in;blsfulandelliptic-curveleave.platform_compatibility/fixtures/033ecae.sql.API adaptations (needed to compile)
Zeroizingsecret bytes, noSecp256k1context argument. Signatures stay byte-identical: RFC 6979 nonces as before, recoverable message signatures keep their header byte, and a test pins the BLS signature bytes through the identity signer.DetSignererases the secp256k1 key it derives when it is dropped.moderated_at/moderated_byfields. The editor refuses the new typed-array field type instead of silently dropping its contents.ResourceVoteWithCount.TokenOperationKind); only shielded operations go through that runtime today.ChainTruncatedevent is handled. An unverified local quorum is reported as a quorum-source problem (quorum_lookup_error), so DAPI nodes are not blamed for it.Following the network's protocol version
AppContext::platform_version()reads the SDK's current version.proven_protocol_version()reads the version from verified metadata and isNoneuntil a proof arrives.known_protocol_version_at_least) stay closed until a version is proven, and for a version this build does not define.metadata_height_toleranceblocks below the highest height it has seen (StaleNodeError::Height) and bans that address. A protocol change while the app is running needs a restart.Dedicated messages for new protocol refusals
New
TaskErrorvariants with actionable messages:Names supplied by the node stay in the typed error source and never appear in the message.
Mainnet compatibility
Upstream dashpay/platform#5515 is in this pin. Until a version that serves V1 is proven, the SDK sends the V0 non-unique identity lookup, which protocol 13 nodes answer with the two-proof response. Proof verification stays strict.
A read-only probe on 2026-10-23 at Platform
132ae31, which has the same SDK proof path, verified full proofs and quorum signatures on mainnet (V0) and testnet (V0 and V1). DET's own end-to-end discovery on mainnet, using quorum keys from SPV, was not run.Existing data
Behaviour changes on existing flows
Not in this PR
Protocol 14 features build on this PR:
TODO(...)markers point at features DET does not offer yet: DashPay invitations (#1104), the DPNS marketplace (#1103) and shielded identity transfers (#1105).Known limitations
DetSigner. The other signing sites (message signing, key info screen, DashPay encryption and auto-accept proof) still hold a plainsecp256k1::SecretKeycopy, as before this PR.dash-pkcat two base-sdk revisions, andrust-bitcoinfrom git. Advisory scanners do not cover them.Testing
CI at
8a18bffpasses:cargo fmt --check;The tests added here cover:
No live funded tests or GUI network flows were run.
🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code
https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
PR Hygiene ·
749f8bdCargo.lock,Cargo.toml,docs/ai-design/2026-10-24-platform-v5.1-dev-bump/README.mdand 116 more) — approved by lklimekWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.