Repository navigation
fix(platform)!: the token marketplace starts with protocol version 16, not 15 - #5910
Conversation
…ot 15 The order transitions of the token marketplace moved to the next release, and they change the stored form of `TokenTradeMode::Tradeable`. Protocol version 15 would have admitted the mode with nothing able to trade the token, and every contract storing it would hold a form the next release cannot read. `TOKEN_TRADE_MODE_TRADEABLE_INITIAL_PROTOCOL_VERSION` (16) now gates the mode on contract create, contract update and a trade mode configuration update: below it they are refused unpaid as not active (10603). `TOKEN_MARKETPLACE_INITIAL_PROTOCOL_VERSION` stays 15 and keeps selecting the escrow trees and the token market contract, which stay empty at 15. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ Final review complete — no blockers (commit f50fcfa) · triage: critical |
|
📖 Book Preview built successfully. Download the preview from the workflow artifacts. Updated at 2026-11-13T23:46:27.485Z |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The PR correctly separates protocol-15 marketplace state from protocol-16 tradeable-token admission, and the available Rust and Swift CI checks pass. One blocking compatibility issue remains: released protocol versions 14 and earlier now return a different serialized activation error payload; the synthetic protocol-16 test helper also needs a guard or exact-version lookup before future tables land.
🔴 1 blocking | 🟡 1 suggestion(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — This is a cross-cutting consensus and persisted-serialization compatibility change that modifies protocol-version activation gates and the accepted representation of token marketplace state in rs-dpp and rs-drive-abci. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- 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— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs`:
- [BLOCKING] packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs:190-196: Preserve the historical activation error for protocol versions below 15
This changes `StateTransitionNotActiveError.required_protocol_version` from 15 to 16 for protocol version 14 and every earlier released version. The same change exists in the batch `is_allowed` gate at `packages/rs-drive-abci/src/execution/validation/state_transition/processor/traits/is_allowed.rs:174-205`. Although the transition remains unpaid and does not alter the state root, the error is platform-serialized and returned to clients through validation responses, so historical protocol behavior is no longer identical. Preserve the old required version for protocol versions below `TOKEN_MARKETPLACE_INITIAL_PROTOCOL_VERSION`, and report 16 only for protocol 15; add tests covering both serialized error payloads through contract validation and batch validation.
- [SUGGESTION] packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs:1236-1240: Prevent synthetic protocol-16 tests from silently using a later version's tables
`protocol_version_admitting_tradeable()` clones `PlatformVersion::latest()` and changes only its numeric protocol version to 16. This is intentional while protocol-16 tables are absent, but once a later protocol version becomes latest, these tests will exercise that later version's format, fee, and feature tables while claiming to test protocol 16. The same helper is duplicated in `is_allowed.rs`. Make the helper use `PlatformVersion::get(16)` when the real table exists, or fail loudly once protocol 16 is added, so the temporary fallback cannot silently become a false protocol-16 test.
|
Your move: thepastaclaw requested changes on this head; dismiss the review or push a fix; thepastaclaw left review threads unresolved; resolve them. |
…ables once they exist The stand-in (the latest tables under the number 16) is now only the fallback while protocol version 16 has no tables, so the tests cannot end up running a later version's tables under that number. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Your move: thepastaclaw left review threads unresolved; resolve them. |
|
Your move: thepastaclaw left review threads unresolved; resolve them. |
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 2 only (queue backlog)
The activation split correctly keeps marketplace state at protocol 15 while admitting tradeable tokens only from protocol 16. The historical activation-error finding is withdrawn because tradeable mode was introduced after the stable v5.0 release, so no shipped protocol-14 implementation emitted the former required-version-15 payload. One test should construct its acceptance fixture with the same protocol-16 tables used for validation. Rust workspace tests pass; remaining SDK, JavaScript, WASM, Docker, and hygiene checks are still pending, with no failed code checks reported.
🟡 1 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Review provenance
Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — This is a cross-cutting consensus and persisted-state compatibility change in token validation and protocol-version activation gates, affecting which state transitions are admitted and preventing an incompatible serialized trade-mode representation from being stored. - Phase 1 reviewers: not run (skipped for throughput: 13 PRs queued, above the 10 limit)
- Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- 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— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `packages/rs-drive-abci/src/execution/validation/state_transition/processor/traits/is_allowed.rs`:
- [SUGGESTION] packages/rs-drive-abci/src/execution/validation/state_transition/processor/traits/is_allowed.rs:966-970: Build the protocol-16 acceptance fixture with protocol-16 tables
This test validates with `protocol_version_admitting_tradeable()` but constructs the contract with `PlatformVersion::latest()`. The helper correctly selects the exact protocol-16 table once it exists, whereas `latest()` will eventually select a later protocol version. Because fixture construction and platform-versioned conversion use the supplied version, a later table could make this test depend on unrelated serialization or limits while it claims to test protocol 16. Store the admitting version in a local variable and pass that same value to both construction and validation.
| let result = contract_create_with_trade_mode( | ||
| TokenTradeMode::Tradeable, | ||
| PlatformVersion::latest(), | ||
| ) | ||
| .validate_is_allowed(&protocol_version_admitting_tradeable()) |
There was a problem hiding this comment.
✅ Resolved at
f50fcfa4; see the replies below.
🟡 Suggestion: Build the protocol-16 acceptance fixture with protocol-16 tables
This test validates with protocol_version_admitting_tradeable() but constructs the contract with PlatformVersion::latest(). The helper correctly selects the exact protocol-16 table once it exists, whereas latest() will eventually select a later protocol version. Because fixture construction and platform-versioned conversion use the supplied version, a later table could make this test depend on unrelated serialization or limits while it claims to test protocol 16. Store the admitting version in a local variable and pass that same value to both construction and validation.
| let result = contract_create_with_trade_mode( | |
| TokenTradeMode::Tradeable, | |
| PlatformVersion::latest(), | |
| ) | |
| .validate_is_allowed(&protocol_version_admitting_tradeable()) | |
| let platform_version = protocol_version_admitting_tradeable(); | |
| let result = contract_create_with_trade_mode( | |
| TokenTradeMode::Tradeable, | |
| &platform_version, | |
| ) | |
| .validate_is_allowed(&platform_version) | |
| .expect("should not error"); |
source: gpt-6.1-sol (phase2-reviewer: rust-quality)
There was a problem hiding this comment.
Done in 92d40fb: the test keeps the admitting version in a local and passes it to both the fixture and the validation. The helper returns version 16 when it has tables and the marketplace test version until then.
There was a problem hiding this comment.
Resolved (re-reviewed at f50fcfa4): The current test stores the admitting platform version once and passes that same version to both contract construction and validation, so it no longer mixes protocol-16 validation with latest-version fixture tables.
|
Bots are done — your move: post |
One constant, TOKEN_MARKETPLACE_INITIAL_PROTOCOL_VERSION = 16, decides the whole marketplace; the separate tradeable constant is gone. Protocol version 15 no longer creates the escrow trees or the token market contract, at genesis or on the upgrade, and its tables select none of the marketplace: create_initial_state_structure 4, calculate_total_tokens_balance 1, the escrow methods None, token_market 0, and the estimators the escrow needed back at their previous versions. The marketplace code stays and is selected by no protocol version. The test version TEST_PLATFORM_V5 selects it on top of protocol version 15's tables, and the escrow, genesis, binding and contract tests run under it. Fee and state pins of protocol version 15 return to their values from before the token market contract joined the genesis contracts tree. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
🌳 GroveDB structure This pull request changes the described GroveDB structure. Open it in the structure viewer: new nodes glow, removed ones stay as ghosts, and the tour walks through each change. Changed (7 nodes)
Compared |
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
…sion; history proof pins follow protocol version 15's state The tests of what the token marketplace's first version admits use that version's tables once they exist and the marketplace test version until then, for the fixture and for the validation alike. The non-history root and proof pins of protocol version 15 move with its genesis state, which no longer holds the token market contract. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
…ontracts tree The rule-free restore's processing fee returns to its value from before the token market contract joined the genesis contracts tree. Two comments on unchanged pins name the decision proposals contract alone again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The marketplace activation move is consistent at protocol 16, and the previously raised fixture-version findings are fixed. Two non-blocking issues remain: two test comments incorrectly say protocol 15 creates marketplace state, and a second mock-version registry initializer can omit TEST_PLATFORM_V5 depending on test initialization order. CI has no reported failures on this head, although workspace tests and several suites remain pending.
💬 1 nitpick(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Follow-up candidates (optional) (1)
New non-blocking observations on code unchanged since the last full review. No inline threads are opened for them and later reviews do not repeat them: fix forward or track separately if they are worth it.
🟡 Suggestion: Keep all mock-version registries in sync with TEST_PLATFORM_V5
packages/rs-platform-version/src/version/system_limits/mod.rs:631-632
The new TEST_PLATFORM_V5 is included in DEFAULT_PLATFORM_TEST_VERSIONS, but this test can initialize the process-global PLATFORM_TEST_VERSIONS OnceLock first with only TEST_PLATFORM_V2 through TEST_PLATFORM_V4. In that order, later protocol-16 acceptance tests that resolve TEST_PROTOCOL_VERSION_5 cannot find it, making test behavior depend on initialization order. Initialize this registry with the same four mock versions as the default registry.
let versions = PLATFORM_TEST_VERSIONS.get_or_init(|| {
vec![
TEST_PLATFORM_V2,
TEST_PLATFORM_V3,
TEST_PLATFORM_V4,
crate::version::mocks::v5_test::TEST_PLATFORM_V5,
]
});
source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering, platform-versioning)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — This is a large, intricate change to protocol-version dispatch and persisted genesis/upgrade state structures, directly affecting consensus rules and storage compatibility in the rs-drive-abci and platform-version tables. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Code unchanged since the last final review (
b14fcc58): 1 new suggestion(s) listed as follow-up candidates, not posted inline - 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— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `packages/rs-drive-abci/src/execution/validation/state_transition/processor/traits/is_allowed.rs`:
- [NITPICK] packages/rs-drive-abci/src/execution/validation/state_transition/processor/traits/is_allowed.rs:818-820: Correct protocol-15 marketplace-state test comments
The helper comment says protocol 15 decodes Tradeable and creates the marketplace state, but this change explicitly makes protocol 15 create neither escrow trees nor the token market contract. The same stale description appears in the DPP test at packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs:1252-1253. Update both comments to say that protocol 15 decodes the mode but creates none of the marketplace state.
|
Bots are done — your move: post |
…on/processor/traits/is_allowed.rs Co-authored-by: Lil Claw <pasta+claw@dashboost.org>
….1-dev Two doc comment lines in `is_allowed.rs` came in unindented with #5910, so the format step of the Rust tests fails for every pull request on `v5.1-dev`. Formatted with `cargo fmt --all`; no other change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Basic explanation
What this does: The token marketplace lets a token's holders sell it to each other on Platform. Two of its building blocks were already merged for protocol version 15, and the rest moved to the next release (5.2). This PR moves the whole marketplace to protocol version 16: version 15 no longer creates anything for it and refuses a token marked "tradeable".
Value: 5.1 ships with no half-built marketplace in its state. 5.2 stays free to change how the escrow, the market contract and the tradeable mode are stored, with nothing from 5.1 to migrate. In particular 5.2 changes how the tradeable mode is stored (it gains a minimum fill amount), so a contract that stored it under 5.1 would have been unreadable.
Risks: Medium in size, low for released networks. Protocol version 15 is not released, and nothing changes at protocol version 14 or earlier. At version 15 the genesis state, the state after the upgrade, and fees that depend on the shape of the contracts tree change back to what they were before the marketplace was merged, so every pin of those moves. The marketplace code stays in the tree, selected by no protocol version, and is tested under a test-only version.
Issue being fixed or feature implemented
#5524 (tradeable tokens) and #5526 (escrow trees and the token market contract) are merged at protocol version 15. The order transitions that use them (#5529 to #5532) now target 5.2. Shipping 5.1 as it was would:
TokenTradeMode::Tradeableas a unit variant ([1]), which feat(platform)!: token marketplace listings (PV15) #5529 changes toTradeable { min_fill }([1, min_fill]) under the same tag.What was done?
TOKEN_MARKETPLACE_INITIAL_PROTOCOL_VERSIONis 16 and decides everything: the genesis registration of the token market contract, the system contract cache, the SDK context providers,TokenConfiguration::validate_trade_modeand the batchis_allowedgate.DRIVE_VERSION_V10goes back tocreate_initial_state_structure4,DRIVE_TOKEN_METHOD_VERSIONS_V2(calculate_total_tokens_balance1, escrow methodsNone), and the previous versions of the four estimators the escrow needed (for_balances,for_token_balances, the contract fee pot and the prefunded balance estimations).SYSTEM_DATA_CONTRACT_VERSIONS_V4hastoken_market: 0.create_initial_state_structure5,DRIVE_TOKEN_METHOD_VERSIONS_V3, the escrow methods, the estimator versions, the token market contract v1.TEST_PLATFORM_V5(mock versions) is protocol version 15's tables plus the selections above. The escrow, genesis, data trigger binding, market order, cache and contract tests run under it. It documents what protocol version 16's tables take over.bindings3, which version 15 needs for DashPay v3. It also lists the rejects of a replace or delete of a token market order; they match the token market contract's id only, so nothing reaches them before that contract exists.grovedb-structure.jsonis regenerated. The stored contract fixture for version 15 loses its token market line.v15.rsnotes 5 and 17, the book's token marketplace chapter, the token market contract README, and the doc comments that named version 15.Before and after, at protocol version 15
[Tokens, TOKEN_ORDER_ESCROW_KEY],[PreFundedSpecializedBalances, PREFUNDED_BALANCES_FOR_TOKEN_ORDERS]and the token market contractAE6yYq65VdfGCg2MSyV9vV7cWGiFWjbwBuy7THesDh4e"tradeMode": "Tradeable"StateTransitionNotActiveError(10603),TokenTradeModeTradeable, required version 16TokenConfigUpdatewithMarketplaceTradeMode(Tradeable)TokenConfigUpdateMarketplaceTradeModeTradeable, required version 16At protocol version 14 and earlier a tradeable token is refused unpaid with 10603 before and after. The error's
required_protocol_versionreads 16 where it read 15.Public interface changes
platform-versionfeature_initial_protocol_versions::TOKEN_MARKETPLACE_INITIAL_PROTOCOL_VERSIONchanges value from 15 to 16. It now also answers "may a token be tradeable?".mock-versions):mocks::v5_test::TEST_PLATFORM_V5andTEST_PROTOCOL_VERSION_5, registered in the default mock versions.PLATFORM_V15selects different numbers:drive.methods.initialization.create_initial_state_structure4 (was 5),drive.methods.token=DRIVE_TOKEN_METHOD_VERSIONS_V2(was V3),for_balances0,for_token_balances0,add_estimation_costs_for_contract_fee_pot_update0,estimated_cost_for_prefunded_specialized_balance_update1,system_data_contracts.token_market0 (was 1).dpp/data-contractsload_system_data_contract(SystemDataContract::TokenMarket, ..)returns an error at protocol version 15 (it loaded the contract). It loads under a version whose tables settoken_market: 1.TokenConfiguration::validate_trade_mode,validate_marketplace_rulesandvalidate_token_configurationsreturnStateTransitionNotActiveErrorfor a tradeable token at protocol version 15, withrequired_protocol_version16.TokenTradeModeis unchanged: same variants, same bincode tags, same JSON.driveDrive::create_initial_state_structureat protocol version 15 creates no escrow tree. Everyorder_escrowmethod returnsVersionNotActiveat 15.SystemDataContracts::find_by_idreturnsNonefor the token market id at 15.Drive::insert_token_order_escrow_treesstays public for the upgrade to 16.rs-sdk-trusted-context-providerSDKs (wasm-dpp2, Swift, Kotlin)
TokenTradeMode.Tradeable()and.tradeablestill exist and parse; a network at protocol version 15 refuses a contract or update that uses them.In-place changes to shipped generations
TokenConfiguration::validate_trade_mode(dpp, unversioned) and the batch arm ofis_allowedcompare against a constant that moved from 15 to 16. For every released protocol version (14 and earlier) the answer is the same: a tradeable token is refused unpaid. Only the error'srequired_protocol_versionfield differs, in a refusal that keeps the transition out of the block. No release ever reported 15: v5.0.0 has onlyNotTradeableand cannot decode the mode.create_genesis_statev1, the system contract cache and the SDK providers compare against the same constant. Released versions are all below both 15 and 16, so they register and serve no token market contract before and after.transition_to_version_15loses two steps. Protocol version 15 is unreleased.How Has This Been Tested?
Targeted runs, all passing:
cargo test -p drive --lib -- order_escrow structure::tests cache::system_contracts calculate_total_tokens_balance(35), plus thetoken,balance,fee_pot,prefunded_specialized_balances,estimated_layersandinitializationfilters earlier in the work.cargo test -p dpp --lib -- system_data_contracts associated_token total_tokens_balance(727) and--test stored_contract_compatibility(3).cargo test -p drive-abci --lib -- create_genesis_state data_triggers::bindings token_market perform_events_on_first_block token_marketplace_gate non_transferable contract_structure batch::tests::token::burn batch::tests::token::direct_selling nullifier_batch_guard batch::tests::document::commit_reveal batch::tests::document::dpns(289).cargo test -p rs-sdk-trusted-context-provider -p token-market-contract -p data-contracts.cargo check --testson every touched crate.Tests added or changed:
is_allowed, and end to end in check_tx and in a block.Not run: the full suites (pins outside the modules above may still need updating; CI will show them), clippy, and the Swift and JS suites.
Breaking Changes
Consensus at protocol version 15 (unreleased): the genesis state and the state after the upgrade no longer hold the escrow trees or the token market contract, fees that depend on the contracts tree's shape change, and a contract or
TokenConfigUpdatethat makes a token tradeable is refused. A devnet already running an earlier build of protocol version 15 is not compatible with this one and needs a reset.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
f50fcfa/self-reviewedsystem-contracts— you own itdpp— you own itrs-drive-abci— you own itrs-drive— you own itswift-sdk(packages/swift-sdk/Sources/SwiftDashSDK/Persistence/Types/TokenTypes.swift,packages/swift-sdk/SwiftTests/SwiftDashSDKTests/DataContractParserTradeModeTests.swift) — llbartekll or romchornyiWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit