Repository navigation
chore: merge v5.1-dev into v5.2-dev - #6283
Conversation
…, proved with the seed (#5905) Co-authored-by: pasta <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
…protocol version 15 (#5945) Co-authored-by: Claude Opus 5.5 <[email protected]>
…ct shielded address (#5901) Co-authored-by: Claude Fable 5.2 <[email protected]>
…its summed property (#5956) Co-authored-by: Claude Fable 5.2 <[email protected]>
…dropped it (#5923) Co-authored-by: Claude Fable 5.2 <[email protected]>
…per-contact shielded address (#5902) Co-authored-by: Claude Fable 5.2 <[email protected]>
…5955) Co-authored-by: Claude Fable 5.2 <[email protected]>
…otocol version 15 (#5964) Co-authored-by: Claude Opus 5.5 <[email protected]>
…dresses (#5970) Co-authored-by: Claude Fable 5.2 <[email protected]>
…w vN (#5973) Co-authored-by: Claude Opus 5.5 <[email protected]>
…PV15) (#5944) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
…account itself (#5971) Co-authored-by: Claude Fable 5.2 <[email protected]>
…an argument (#5655) Co-authored-by: Claude Opus 5.5 <[email protected]>
…ft readable (#5654) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: pasta <[email protected]> Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
…d their fee bundle (PV15) (#5969) Co-authored-by: Claude Opus 5.5 <[email protected]>
#5915) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Lukasz Klimek <[email protected]> Co-authored-by: Codex (gpt-6-astra) <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
… a valid preorder (PV15) (#5978) Co-authored-by: Claude Opus 5.5 <[email protected]>
…rty passes 2^27 (PV15) (#5987) Co-authored-by: Claude Fable 5.2 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
…5990) Co-authored-by: Claude Opus 5.5 <[email protected]>
…sion from the cache (#5993) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
) Co-authored-by: Claude Fable 5.2 <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
|
✅ Final review complete — no blockers (commit 3984eee) · triage: critical |
|
📖 Book Preview built successfully. Download the preview from the workflow artifacts. Updated at 2026-11-25T12:27:16.948Z |
|
📜 System contracts This pull request adds or changes system contract document schemas. The contract viewer diagrams each one, and a comparison marks what is added, changed and removed, with the update rule each change meets.
Compared |
|
🌳 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 |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Changes requested: 2 blockers
- The default wallet build cannot resolve
Future—packages/rs-platform-wallet/src/wallet/platform_wallet.rs:4-5(new; not shown inline, see below)
Impact: Consumers buildingplatform-walletwith its default features cannot compile the crate, even if they never use shielded operations. - The Swift migration test fails on the merged schema’s fourth new entity —
packages/swift-sdk/SwiftTests/SwiftDashSDKTests/DashModelMigrationTests.swift:646-647(new; not shown inline, see below)
Impact: Anyone running the Swift SDK migration suite on this head gets an assertion failure even when the schema is correct.
This merge brings the v5.1-dev history into v5.2-dev, combining the wallet and mobile SDK changes while retaining protocol 16 and the target branch’s sync lifecycle tests. No code check had failed at the time of review: the Swift frozen-schema check passed, the full Swift test suite was not reported, and Rust workspace, wasm32, Kotlin, JS, and image builds or tests were still pending.
🔴 2 blocking | 🟡 4 suggestion(s)
6 finding(s) not shown inline (GitHub refused the PR diff as too large)
🔴 Blocking: The default wallet build cannot resolve Future
Impact: Consumers building platform-wallet with its default features cannot compile the crate, even if they never use shielded operations.
packages/rs-platform-wallet/src/wallet/platform_wallet.rs:4-5
The default build fails to resolve both Future bounds in top_up_identity_with. The merge retains the target branch’s unconditional address top-up helper but takes the incoming branch’s #[cfg(feature = "shielded")] on its only Future import. The crate uses Rust 2021, which does not import Future through the prelude, and the default bls and eddsa features do not enable shielded. Restore the unconditional import and check the default-feature build; an all-features check masks this error.
use std::future::Future;
source: gpt-6.2-astra (phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
🔴 Blocking: The Swift migration test fails on the merged schema’s fourth new entity
Impact: Anyone running the Swift SDK migration suite on this head gets an assertion failure even when the schema is correct.
packages/swift-sdk/SwiftTests/SwiftDashSDKTests/DashModelMigrationTests.swift:646-647
The V4-to-V5 test expects exactly three added entities, but the merged V5 schema adds four. The incoming test’s three-name set matched v5.1-dev; the merged DashModelContainer.modelTypes also retains PersistentLockedOutpoint from v5.2-dev, and frozen V4 does not include it. Add the fourth name and keep the exact-set assertion so the test still catches unintended schema changes.
["PersistentDashpayPaymentAddresses", "PersistentLockedOutpoint",
"PersistentPrivateContactRequestsPosition", "PersistentPrivateShieldedAddress"])
source: gpt-6.2-astra (phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
🟡 Suggestion: Clear disconnects the sync view when Swift refuses the reset before calling Rust
Impact: An example-app user who taps Clear while a shielded payment is in flight can lose live sync updates until rebind, even though the native wallet remains bound and no rows were cleared.
packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Services/ShieldedService.swift:1011-1015
A refused Clear cancels the app’s sync subscriptions, marks the service unbound, and increments localStateClearCount. A payment such as shieldedTokenTransfer holds withAdmittedNativeOperation; the v5.2-dev guard therefore throws invalidHandle before platform_wallet_manager_shielded_clear runs, as the admission test demonstrates for a shielded spend. The incoming app handler exempts only Rust’s shieldedOperationInProgress error from afterResetAttempt(). Give the pre-call refusal a distinct typed outcome and handle it without teardown, while retaining cleanup when Rust did attempt the reset. Test the manager-to-service refusal path rather than injecting only the native error.
source: gpt-6.2-astra (phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
🟡 Suggestion: Identity refresh throws a store error that the mobile APIs say is only logged
Impact: When a proved identity refresh cannot be stored locally, Swift and Kotlin callers receive an error, and both Update Key Limits example screens tell users to wait for network connectivity instead.
packages/rs-platform-wallet-ffi/src/wallet.rs:35-38
Reconnecting cannot fix a local persistence failure. The merged IdentityWallet::refresh_identity uses the target branch’s FoldStoreFailure::Return, leaving the cached identity unchanged when the store fails so a retry still includes the key changes. The C export and both mobile wrappers propagate the error, but their incoming documentation still promises that it is only logged. Update all three contracts and have the example screens report the underlying refresh failure without attributing every error to connectivity. Keep the Rust store-and-publish ordering.
source: gpt-6.2-astra (phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
🟡 Suggestion: The nine shielded settlement cases no longer check protocol 15 results
Impact: A change to protocol 15 fees, nonces, or settled state roots can pass these tests if the protocol 16 results stay the same.
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/shielded/nullifier_batch_guard.rs:2238-2247
The merge replaces the nine settled-state hashes recorded at 544efd7ec7 with protocol 16 hashes. The fixtures and processor use PlatformVersion::latest(), and the unchanged validation hashes do not cover the committed root or the final execution result. Run the characterization with version-matched fixtures and execution at both protocol 15 and latest, retaining the incoming protocol 15 references. The sponsored-payment fee test in this file already shows how to run the processor at both versions.
source: gpt-6.2-astra (phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
🟡 Suggestion: A manual token sync cannot report which reads succeeded in its own pass
Impact: Rust callers waiting for a pass after changing the watch list get true both when all balances were proved and when all reads failed.
packages/rs-platform-wallet/src/manager/identity_sync.rs:779-784
A caller that needs fresh results has to choose between waiting for a pass that sees its new registrations and receiving the pass summary. The merge makes SyncAttempt::Ran carry that summary, but the waiting path discards it; reading the cache afterward cannot distinguish a fresh proof from an unchanged value after a read failure. Expose the summary on the waiting Rust path with a distinct no-pass result. The FFI can keep its documented pass-ran contract.
source: gpt-6.2-astra (phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-astra (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.2-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.2-astra (agent: phase2-reviewer, role: ffi-engineer); reviewer 5: gpt-6.2-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.2-astra (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.2-astra (agent: phase2-reviewer, role: security-auditor); reviewer 8: gpt-6.2-astra (agent: phase2-reviewer, role: tenderdash-consensus-security); reviewer 9: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.2-sol(effort low) — This intricate merge changes persisted wallet compatibility by renumbering V022__core_transaction_accounting.rs and V023__core_locked_outpoints.rs, and reconciles funds-movement logic in wallet/shielded/operations.rs, including transfer_once_claimed. - 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(lane 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.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-astra— general (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— ffi-engineer (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— tenderdash-consensus-security (completed, effort high); 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-platform-wallet/src/wallet/platform_wallet.rs`:
- [BLOCKING] packages/rs-platform-wallet/src/wallet/platform_wallet.rs:4-5: The default wallet build cannot resolve `Future`
Impact: Consumers building `platform-wallet` with its default features cannot compile the crate, even if they never use shielded operations.
The default build fails to resolve both `Future` bounds in `top_up_identity_with`. The merge retains the target branch’s unconditional address top-up helper but takes the incoming branch’s `#[cfg(feature = "shielded")]` on its only `Future` import. The crate uses Rust 2021, which does not import `Future` through the prelude, and the default `bls` and `eddsa` features do not enable `shielded`. Restore the unconditional import and check the default-feature build; an all-features check masks this error.
In `packages/swift-sdk/SwiftTests/SwiftDashSDKTests/DashModelMigrationTests.swift`:
- [BLOCKING] packages/swift-sdk/SwiftTests/SwiftDashSDKTests/DashModelMigrationTests.swift:646-647: The Swift migration test fails on the merged schema’s fourth new entity
Impact: Anyone running the Swift SDK migration suite on this head gets an assertion failure even when the schema is correct.
The V4-to-V5 test expects exactly three added entities, but the merged V5 schema adds four. The incoming test’s three-name set matched v5.1-dev; the merged `DashModelContainer.modelTypes` also retains `PersistentLockedOutpoint` from v5.2-dev, and frozen V4 does not include it. Add the fourth name and keep the exact-set assertion so the test still catches unintended schema changes.
In `packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Services/ShieldedService.swift`:
- [SUGGESTION] packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Services/ShieldedService.swift:1011-1015: Clear disconnects the sync view when Swift refuses the reset before calling Rust
Impact: An example-app user who taps Clear while a shielded payment is in flight can lose live sync updates until rebind, even though the native wallet remains bound and no rows were cleared.
A refused Clear cancels the app’s sync subscriptions, marks the service unbound, and increments `localStateClearCount`. A payment such as `shieldedTokenTransfer` holds `withAdmittedNativeOperation`; the v5.2-dev guard therefore throws `invalidHandle` before `platform_wallet_manager_shielded_clear` runs, as the admission test demonstrates for a shielded spend. The incoming app handler exempts only Rust’s `shieldedOperationInProgress` error from `afterResetAttempt()`. Give the pre-call refusal a distinct typed outcome and handle it without teardown, while retaining cleanup when Rust did attempt the reset. Test the manager-to-service refusal path rather than injecting only the native error.
In `packages/rs-platform-wallet-ffi/src/wallet.rs`:
- [SUGGESTION] packages/rs-platform-wallet-ffi/src/wallet.rs:35-38: Identity refresh throws a store error that the mobile APIs say is only logged
Impact: When a proved identity refresh cannot be stored locally, Swift and Kotlin callers receive an error, and both Update Key Limits example screens tell users to wait for network connectivity instead.
Reconnecting cannot fix a local persistence failure. The merged `IdentityWallet::refresh_identity` uses the target branch’s `FoldStoreFailure::Return`, leaving the cached identity unchanged when the store fails so a retry still includes the key changes. The C export and both mobile wrappers propagate the error, but their incoming documentation still promises that it is only logged. Update all three contracts and have the example screens report the underlying refresh failure without attributing every error to connectivity. Keep the Rust store-and-publish ordering.
In `packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/shielded/nullifier_batch_guard.rs`:
- [SUGGESTION] packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/shielded/nullifier_batch_guard.rs:2238-2247: The nine shielded settlement cases no longer check protocol 15 results
Impact: A change to protocol 15 fees, nonces, or settled state roots can pass these tests if the protocol 16 results stay the same.
The merge replaces the nine settled-state hashes recorded at `544efd7ec7` with protocol 16 hashes. The fixtures and processor use `PlatformVersion::latest()`, and the unchanged validation hashes do not cover the committed root or the final execution result. Run the characterization with version-matched fixtures and execution at both protocol 15 and latest, retaining the incoming protocol 15 references. The sponsored-payment fee test in this file already shows how to run the processor at both versions.
In `packages/rs-platform-wallet/src/manager/identity_sync.rs`:
- [SUGGESTION] packages/rs-platform-wallet/src/manager/identity_sync.rs:779-784: A manual token sync cannot report which reads succeeded in its own pass
Impact: Rust callers waiting for a pass after changing the watch list get `true` both when all balances were proved and when all reads failed.
A caller that needs fresh results has to choose between waiting for a pass that sees its new registrations and receiving the pass summary. The merge makes `SyncAttempt::Ran` carry that summary, but the waiting path discards it; reading the cache afterward cannot distinguish a fresh proof from an unchanged value after a read failure. Expose the summary on the waiting Rust path with a distinct no-pass result. The FFI can keep its documented pass-ran contract.
Out-of-scope follow-up suggestions (1)
These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.
- Dashmate’s existing Tenderdash image migration skips configs stamped
5.1.0— The upstreamv5.1.0-dev.1release itself wrote format5.1.0with the stock Tenderdash dev.2 image. The unchanged v5.1-dev upgrade treats that stored format as newer than its target and leaves the image alone. Those nodes miss the same-round vote redelivery fix in dashpay/tenderdash#1599 and can remain susceptible to a consensus stall after ordinary vote loss.- Follow-up: Fix the upgrade on v5.1-dev with a forward migration that advances the stock dev.2 image without replacing operator-selected images, test it against the actual
v5.1.0-dev.1stamp, and carry the fix forward in a later merge.
- Follow-up: Fix the upgrade on v5.1-dev with a forward migration that advances the stock dev.2 image without replacing operator-selected images, test it against the actual
|
Your move: thepastaclaw requested changes on this head; dismiss the review or push a fix. |
…itself Found by review of the v5.1-dev merge: - platform-wallet: `std::future::Future` is imported without the shielded feature again. v5.2-dev's address top-up helper uses it in every build; the merge had taken v5.1-dev's feature gate on the import, so the default feature set did not compile. - swift-sdk: the V4 to V5 schema test names all four entities V5 adds. It listed v5.1-dev's three; the merged schema also has v5.2-dev's PersistentLockedOutpoint. - swift-sdk: `clearShielded` refused by this manager's own admission gate (an async native operation in flight) throws `shieldedOperationInProgress`, the error Rust gives for an operation in flight, instead of `invalidHandle`. The example app from v5.1-dev keeps its binding and subscriptions on that error only, so with v5.2-dev's gate a refused Clear tore them down although nothing had changed. - Identity refresh docs (C export, Swift, Kotlin) said a failed store is only logged. On the merged tree it is returned, as v5.2-dev made it; the two Update Key Limits screens no longer tell the user to wait for the network on every refresh failure. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Review of Fixed
Not changed in this pull request
The Dashmate note is on |
|
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
New on this head: The follow-up restores the default-feature Rust import, updates the Swift V5 migration assertion, and makes Clear report an admitted native operation as a typed refusal. It also updates the identity refresh documentation and retry messages. GitHub reported no failed code checks on this head; the Kotlin emulator build and tests and NPM release build validation were still pending.
🟡 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.
1 finding(s) not shown inline (GitHub refused the PR diff as too large)
🟡 Suggestion: The C refresh docs promise saved key rows even when the host has no key callback
Impact: A C client that leaves the identity-key callback unset can receive success after a refresh but have no row for a newly discovered key to restore after restart.
packages/rs-platform-wallet-ffi/src/wallet.rs:36-39
A successful refresh does not guarantee that the host wrote the changed key rows. Manager creation accepts a callback table without on_persist_identity_keys_fn, and FFIPersister::store skips key upserts in that case without reporting an error. The wallet then publishes the refreshed copy and the C export returns success. Keep the explanation of reported store failures, but distinguish an updated wallet cache from a confirmed host write.
/// to the host's persister when it provides an identity-key callback. A
/// reported store failure is returned (`PlatformWalletError::PersisterStore`)
/// before the wallet's copy changes, so a retry still includes those keys.
/// Success means the wallet applied the refresh without a reported store error;
/// it does not guarantee that the host saved the rows.
source: gpt-6.2-astra (phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor, tenderdash-consensus-security)
Review provenance
Source: reviewer 1: gpt-6.2-astra (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.2-astra (agent: phase2-reviewer, role: ffi-engineer); reviewer 4: gpt-6.2-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.2-astra (agent: phase2-reviewer, role: rust-quality); reviewer 6: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 7: gpt-6.2-astra (agent: phase2-reviewer, role: security-auditor); reviewer 8: gpt-6.2-astra (agent: phase2-reviewer, role: tenderdash-consensus-security); reviewer 9: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.2-sol(effort low) — This intricate merge changes both wallet spend handling inwallet/shielded/operations.rsand SQLite migration sequencing inmigrations/V021__profile_address_encoding.rsand the renumbered V022/V023 migrations. - 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(lane 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.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-astra— general (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— ffi-engineer (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— tenderdash-consensus-security (completed, effort high); 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-platform-wallet-ffi/src/wallet.rs`:
- [SUGGESTION] packages/rs-platform-wallet-ffi/src/wallet.rs:36-39: The C refresh docs promise saved key rows even when the host has no key callback
Impact: A C client that leaves the identity-key callback unset can receive success after a refresh but have no row for a newly discovered key to restore after restart.
A successful refresh does not guarantee that the host wrote the changed key rows. Manager creation accepts a callback table without `on_persist_identity_keys_fn`, and `FFIPersister::store` skips key upserts in that case without reporting an error. The wallet then publishes the refreshed copy and the C export returns success. Keep the explanation of reported store failures, but distinguish an updated wallet cache from a confirmed host write.
v5.2-dev gained #6143 (a failed local key write no longer fails an accepted identity registration). Two files conflicted: an import list in invitation.rs (both imports kept) and the doc comment of shielded_identity_create_from_pool, which keeps #6143's wording on finding the identity again and v5.1-dev's paragraph on admission. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ost saved the key rows The host's identity-key callback is optional: without it the key rows are not written and no store error is reported. The C export's doc now says success means no reported store error, not a confirmed host write. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Re-review of |
|
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
New on this head: This head merges the v5.2-dev fix that lets an accepted identity registration complete even if local bookkeeping fails, and clarifies that a successful C identity refresh does not confirm the host saved the key rows. At the time of review, GitHub showed no failed checks; runner selection, runner-contract tests, and Ubuntu generation were still pending.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: gpt-6.2-astra (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.2-astra (agent: phase2-reviewer, role: ffi-engineer); reviewer 4: gpt-6.2-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.2-astra (agent: phase2-reviewer, role: rust-quality); reviewer 6: gpt-6.2-astra (agent: phase2-reviewer, role: security-auditor); reviewer 7: gpt-6.2-astra (agent: phase2-reviewer, role: tenderdash-consensus-security); reviewer 8: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 9: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.2-sol(effort low) — The merge changes shielded funds-movement logic inpackages/rs-platform-wallet/src/wallet/shielded/operations.rsand renumbers SQLite migrations V021–V023, making existing 5.2 development databases incompatible. - 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(lane 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.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-astra— general (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— ffi-engineer (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.2-astra— tenderdash-consensus-security (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
|
Bots are done — your move: post |
…cycle-boundary The base now carries v5.1-dev's shielded Clear design (#6283): the host deletes its rows after Clear returns, a clear generation counter and per-wallet binding checks catch what slips through, and the wallet entry points take the coordinator as a parameter. This branch keeps one mechanism, its own: - The manager owns the coordinator and Clear wipes the host inside the admission. `clear_generation`, `operation_guard`, the wallet's `ShieldedBinding` checks, `admit_shielded_spend`, `admit_shielded_payment`, `admit_single_flight_shielded_spend` and `shield_turn` are not kept. - The base's refusal (`ShieldedOperationInProgress`, FFI code 84) is the one this branch already had. The coordinator lock behind it takes the base's name, `operation_admission`, and its `clear_in_progress()` flag. - Every entry point the base added (token pool purchase, transfer and unshield, shielded tips, tip address preparation, private document create, the profile write) takes `lock_for_shielded_operation` and the admission like the others, without a coordinator parameter. A wallet not bound again since a Clear is refused with `ShieldedNotBound`, decided by its registration. - FFI and JNI: the exports keep the base's C signatures. The JNI bridge overrides carry both sides' slots. - Kotlin and Swift: the row deletion after Clear, Kotlin's `PendingHostWipe` and its ledger hold around Clear, and Swift's `hasAdmittedNativeOp` preflight are not kept; Rust wipes the host and decides whether a Clear may run. Tests that pinned a mechanism not kept were rewritten to pin this design's guarantee, or removed where the scenario cannot occur (a second coordinator for one wallet, a queued shield-class spend handing its gate back). Co-Authored-By: Claude Fable 5.2 <[email protected]>
Basic explanation
What this does: Brings everything merged into
v5.1-devsince 17 November (149 commits, up to544efd7ec7, which includes the 5.1.0-rc.1 release) intov5.2-dev. The two branches had drifted apart: 34 files conflicted, and some 5.1 code no longer compiled against changes 5.2 had made. This PR resolves both.Value: 5.2 work builds on the current 5.1 code again: the protocol version 15 changes, GroveDB 7.0.0, and the wallet, Swift and Kotlin work of the last week. Every later sync is small again, and the roughly 50 pull requests open against
v5.2-devkeep their history, because this is a merge and not a rebase.Risks: Medium, and limited to 5.2. No shipped behaviour changes and no consensus rule is added. The risk is a wrong resolution in the wallet code, where both branches changed the same functions; see "Where to look" below. Two things other 5.2 work has to know about: the wallet storage migrations
v5.2-devadded are renumbered (below), and open pull requests againstv5.2-devwill need a merge ofv5.2-devonce this lands.Important
Merge this with "Create a merge commit", not "Squash and merge". A squash drops the link to
v5.1-dev, the merge base stays at 17 November, and the same 34 conflicts return at the next sync.Issue being fixed or feature implemented
v5.1-devandv5.2-devdiverged after the last sync (#5952, 17 November): 149 commits only onv5.1-dev, 39 only onv5.2-dev.What was done?
v5.1-devis merged intov5.2-dev. Most conflicts were both branches adding lines next to each other and keep both sides. The ones that needed a decision:Dependencies
5a39eaaf), fromv5.1-dev.v5.2-devpins (f0ddfd45, 0.47.0). It contains every fix of thev0.46.1releasev5.1-devuses, so nothing is lost.5.1.0-rc.1, as onv5.1-dev. Movingv5.2-devto a 5.2 prerelease is left to the release process, as in chore: merge v5.1-dev into v5.2-dev #5952.Wallet storage migrations are renumbered
Both branches added a SQLite migration numbered V021.
v5.2-devv5.1-dev, released in 5.1.0-rc.1)The 5.1 migration keeps its number because it is in a published prerelease. The rename covers the migration files, the
v022backfill module and its hook,rewind_v022, the tests,SCHEMA.mdand the two fingerprints insqlite_schema_pinning.rs.Effect: a wallet database created by a
v5.2-devdevelopment build has V021 recorded with another checksum and will not open with a build of this branch; it has to be recreated. Databases from any 5.1 release are unaffected. An open pull request againstv5.2-devthat adds a migration has to take the next free number, V024.Wallet result codes
No number collides:
v5.2-devholds 80 (ErrorIdentityLookupFailed),v5.1-devholds 83 to 87. Both sets are kept in Rust, Swift and Kotlin, andERROR_CODE_REGISTRY.mdlists both.Both branches added Kotlin's
IdentityBalanceUnavailable(code 58). It is now one class and reportsisRetryable == true, asv5.2-devhad it and as the Rust and Swift documentation of the code say. Onv5.1-devit was not marked retryable.Wallet code both branches changed
wallet/shielded/operations.rs):v5.1-devrestructured this file (token pool spends, private documents, tips), so Git's line matching was unreliable. The result is thev5.1-devfile with eachv5.2-devchange applied to it and checked function by function. The recorded-anchor cache (perf(platform-wallet)!: reuse a recent recorded-anchor set on the shielded spend path #5280) covers the same five spend paths as before; intransfer, whose bodyv5.1-devmoved intotransfer_once_claimed, the cache is passed along. The proved-balance refusal of an identity shield andfetch_recorded_anchor_set, which both branches added, are kept once.manager/identity_sync.rs):v5.2-devmade a pass return its summary;v5.1-devadded a pass attempt that says busy, closed or ran. The attempt now carries the summary when it ran.loading.rs): an identity removed while its fetch was in flight is reported as not found (v5.1-dev), and a failed store is handled as the caller asked (v5.2-dev).v5.1-devadded runs before the broadcast, which takes the settings argumentv5.2-devadded.v5.1-devand the pending state for an unconfirmed address top-up fromv5.2-devare both kept.mock_manager_over); two tests with the same name were told apart.Swift: a Clear refused while an operation is in flight
PlatformWalletManager.clearShielded()has two refusals for an operation in flight: Rust's own (fromv5.1-dev,shieldedOperationInProgress) and this manager's admission gate for an async native operation such as a shielded spend (fromv5.2-dev, which threwinvalidHandle). The gate now throwsshieldedOperationInProgresstoo.invalidHandle, and the example app fromv5.1-devtreated that as a reset Rust had attempted: it dropped its binding and sync subscriptions although nothing had changed.A caller that matched
invalidHandlefor this case onv5.2-devhas to matchshieldedOperationInProgress. Shutdown in progress still throwsinvalidHandle.Identity refresh reports a failed store
refresh_identityreturns a failed store (asv5.2-devmade it) where the docs taken fromv5.1-devsaid it was only logged. The C export, Swift and Kotlin docs say so now, and the two Update Key Limits screens no longer tell the user to wait for the network on every refresh failure.5.1 code adapted to 5.2
Code that merged without a conflict but did not compile, all in tests:
Result,next_receive_addresswith one argument.broadcast_funded_asset_lock_tracked, the anchor cache argument of the top-up spend, thestate_before_blockfield of the wait response (feat(platform): prove the state before and after the block of a state transition #6038).Protocol version 16
The version tables merged without a conflict.
PLATFORM_V16takes every table it does not name fromPLATFORM_V15, so the protocol version 15 changes made onv5.1-devreach 16 as designed.Values pinned at the latest version that both branches had re-pinned were taken again on the merged tree:
nullifier_batch_guard.rs: the state root and the nine settled-state hashes. The nine validation hashes are those ofv5.1-dev, unchanged.restore_constraints.rs: the rule-free restore fee is 1,493,040 at protocol version 16 and 1,443,040 at 15.v5.1-devraised it by 160, and the token market contract of 16 adds 50,000 as before.signed-responses.json) is regenerated at protocol version 16; two runs were byte-identical.Generated files
PARITY_SUMMARY.mdis regenerated from the merged manifest (56 capabilities: 54 fromv5.1-devplus the 2v5.2-devadded). Swift'sschema-models.jsonandDashSchemaV5list the entities of both branches.Second merge commit
v5.2-devgained #6162 while this was in progress. It is merged in as a second commit: two test modules where both sides appended tests, and one test fixture.Where to look
A review of the whole diff is not practical (it is the 5.1 diff). The hand-made part is
git diff 544efd7ec7 HEAD -- packages/rs-platform-wallet packages/rs-platform-wallet-ffi packages/rs-platform-wallet-storageread againstv5.2-dev, and above allwallet/shielded/operations.rsandmanager/identity_sync.rs.How Has This Been Tested?
Locally on macOS, on the merged tree:
cargo check --workspace --all-targets --all-features: clean.platform-walletandplatform-wallet-ffialso with default features (the first review found the default build broken by a feature-gated import; fixed).cargo clippy --all-targets --all-features -- --no-deps -D warningsonplatform-wallet,platform-wallet-ffi,drive-abci,drive-proof-verifier: clean.platform-wallet-storageis clean for the library; its test target has one unused import that only macOS reports (it is used under a Linux-only test) and thatv5.2-devhas too.cargo fmt --all -- --check: clean.platform-wallet: 1,070 tests of the shielded, identity sync, core bridge, platform address, asset lock and loading modules, then the 288 sync manager tests after test(platform-wallet): pin sync coordinator lifecycle behaviour #6162.platform-wallet-ffi: 176 tests of the error, shielded send, identity sync, balance history and top-up modules.platform-wallet-storage: the whole crate (it is small and holds the migrations). All pass exceptshould_open_under_insecure_ancestor_reached_through_parent_symlink_and_warn, which compares a path that macOS reports as/private/var/...; its file is identical tov5.2-dev.drive-abci:nullifier_batch_guard,restore_constraints, the shielded token tests,query::document_historyand the protocol upgrade events.drive: document history verification, ranked queries, document deletes, the order escrow,deterministic_root_hashand the structure tests that comparegrovedb-structure.jsonwith a real database.dpp: stored contract compatibility, system data contracts, document validation v2, the shielded builder.platform-version: all.wasm-sdk: the 229 library tests, which read the regenerated fixture.:sdk:compileDebugKotlin,:app:compileDebugKotlinand the 44 tests ofDashSdkErrorTest.freeze_schema_models.py --checkand--check-inventory, and a syntax parse of the eleven Swift files both branches changed.scripts/check_sdk_parity_manifest.py.Not run locally, left to CI: the full Rust suites, the Swift build and tests (they need the xcframework), the Kotlin instrumented tests and the JS suites. Pinned values in tests I did not run may still need re-pinning for protocol version 16; I will fix what CI reports.
Breaking Changes
Those of the merged
v5.1-devcommits. None of them is new here.For work on
v5.2-devonly: the wallet storage migrations V021 and V022 ofv5.2-devare now V022 and V023 (see above).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 ·
3984eee/self-reviewedclaude— you own itgithub(.github/actions/docker/action.yaml,.github/actions/nodejs/action.yaml,.github/actions/npm-release-build/action.yamland 15 more) — ktechmidas or shumkovsdk-parity— you own itdashmate(packages/dashmate/configs/defaults/getBaseConfigFactory.js,packages/dashmate/configs/defaults/tenderdash-seeds.json,packages/dashmate/configs/getConfigFileMigrationsFactory.jsand 17 more) — ktechmidas or shumkovsystem-contracts— you own itjs-wasm-sdk(packages/js-dash-sdk/package.json,packages/js-evo-sdk/README.md,packages/js-evo-sdk/package.jsonand 21 more) — shumkovkotlin-sdk(packages/kotlin-sdk/KotlinExampleApp/TEST_PLAN.md,packages/kotlin-sdk/KotlinExampleApp/app/build.gradle.kts,packages/kotlin-sdk/KotlinExampleApp/app/src/main/java/org/dashfoundation/example/MainActivity.ktand 342 more) — HashEngineeringdpp— you own itrs-drive-abci— you own itrs-drive— you own itrs-platform-wallet-ffi(packages/rs-platform-wallet-ffi/Cargo.toml,packages/rs-platform-wallet-ffi/ERROR_CODE_REGISTRY.md,packages/rs-platform-wallet-ffi/src/asset_lock/built_callback.rsand 38 more) — HashEngineering or ZocoLini or llbartekll or romchornyiwallet-storage(packages/rs-platform-wallet-storage/README.md,packages/rs-platform-wallet-storage/SCHEMA.md,packages/rs-platform-wallet-storage/migrations/V021__core_transaction_accounting.rsand 27 more) — lklimekrs-platform-wallet(packages/rs-platform-wallet/Cargo.toml,packages/rs-platform-wallet/README.md,packages/rs-platform-wallet/src/changeset/flush_ledger.rsand 92 more) — HashEngineering or ZocoLini or llbartekll or romchornyirust-sdk-ffi(packages/rs-sdk-ffi/src/address/queries/address_funds_elements.rs,packages/rs-sdk-ffi/src/address/queries/branch_state.rs,packages/rs-sdk-ffi/src/address/queries/mod.rsand 35 more) — lklimek or shumkovrust-sdk(packages/rs-sdk/src/core/transaction.rs,packages/rs-sdk/src/error.rs,packages/rs-sdk/src/mock/requests.rsand 61 more) — lklimek or shumkovswift-sdk(packages/swift-sdk/Sources/SwiftDashSDK/Address/Addresses.swift,packages/swift-sdk/Sources/SwiftDashSDK/ContractModeration/ContractModeration.swift,packages/swift-sdk/Sources/SwiftDashSDK/ContractModeration/SDK+ContractModeration.swiftand 246 more) — 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.