Repository navigation
Conversation
Spent nullifiers identify consumed notes, not the requested outputs. Unshield adds a current balance snapshot; the withdrawal document binds the destination but not the requested amount or change outputs. Retain the authenticated results and roots while withdrawing the unsupported execution guarantee for all three credit spend families. Test would have caught this in CI: ✖ before fix, ✔ after. Three genuine GroveDB-proof guarantee assertions failed as ExecutionProved instead of AffectedState on protocol versions 12, 13 and latest before the fix. The same assertions pass after it; the public verifier suite passes 75 tests with zero ignored. Unspent and malformed proof refusals and an unrelated ExecutionProved positive control remain intact. The in-place verifier correction affects client classification only; consensus execution, version tables, queries and wire bytes are unchanged. BREAKING CHANGE: strict execution waits reject Unshield, ShieldedTransfer and ShieldedWithdrawal outcomes. Affected-state waits retain the verified data as a snapshot, without claiming this specific request executed. Closes #5243
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe proof classifier now treats Unshield, ShieldedTransfer, and ShieldedWithdrawal proofs as evidence of affected state, not proof of a specific execution. Tests cover these classifications and proof validation. The Rust and WASM SDK documentation describes the same guarantee. ChangesShielded credit proof guarantees
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: 🔵 Low · up to Strict SDK waits for unshield, shielded transfer and shielded withdrawal now return ExecutionNotProved, including for historical proofs. The change is documented and intentional. Client owners should switch to affected-state waits where they need this behavior. A strict-wait error does not mean the broadcast failed. The change is mergeable. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit 0df7d9f) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
At head 3a16d68, the shared classifier correctly downgrades the three shielded credit-spend families without changing proof checks, authenticated results, or consensus execution. One documentation suggestion remains: the SDK's strict-wait family list omits the newly rejected families; the additional classifier-table test request is redundant with the new proof-based regression tests. Verification was static only; Rust workspace tests and PR Hygiene were still pending in the supplied CI snapshot.
🟡 1 suggestion(s)
1 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Document shielded credit spends in the strict-wait API
packages/rs-sdk/src/platform/transition/broadcast.rs:46-50
The classifier now returns AffectedState for Unshield, ShieldedTransfer, and ShieldedWithdrawal, and wait_for_response_with_metadata passes those outcomes through require_execution_proved, which returns ExecutionNotProved. This public documentation lists the families requiring affected-state waits but omits all three newly reclassified families, leaving users without the migration guidance at the API they call. Add the three names here and to the parallel strict-wait explanation in packages/wasm-sdk/src/state_transitions/broadcast.rs:238-244. The related example lists in packages/js-evo-sdk/src/state-transitions/facade.ts:36-39, packages/rs-dpp/src/state_transition/proof_result.rs:244-246, and packages/rs-drive-proof-verifier/src/proof.rs:1532-1534 can be updated consistently; those illustrative lists are not themselves exhaustive contracts.
/// only authenticate the affected state (balance top-ups, credit
/// transfers and withdrawals, address funds movements, shields,
/// shielded credit spends (Unshield, ShieldedTransfer, and
/// ShieldedWithdrawal), no-history token operations, key limits
/// updates, contract updates, contract moderation and fee claims,
/// and creates and deletes of indexOnly documents), this returns
source: glm-5.3-flash (phase1-reviewer: general, rust-quality)
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (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:
lowbygpt-6.1-sol(effort low) — The production change is a contained three-arm classification correction with extensive regression tests, leaving proof verification, consensus, storage and wire formats unchanged. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer,glm-5.3-flash— rust-quality (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 99% left, weekly 98% left; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 15% left, 5h 100% left) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort medium); 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 `packages/rs-sdk/src/platform/transition/broadcast.rs`:
- [SUGGESTION] packages/rs-sdk/src/platform/transition/broadcast.rs:46-50: Document shielded credit spends in the strict-wait API
The classifier now returns AffectedState for Unshield, ShieldedTransfer, and ShieldedWithdrawal, and wait_for_response_with_metadata passes those outcomes through require_execution_proved, which returns ExecutionNotProved. This public documentation lists the families requiring affected-state waits but omits all three newly reclassified families, leaving users without the migration guidance at the API they call. Add the three names here and to the parallel strict-wait explanation in packages/wasm-sdk/src/state_transitions/broadcast.rs:238-244. The related example lists in packages/js-evo-sdk/src/state-transitions/facade.ts:36-39, packages/rs-dpp/src/state_transition/proof_result.rs:244-246, and packages/rs-drive-proof-verifier/src/proof.rs:1532-1534 can be updated consistently; those illustrative lists are not themselves exhaustive contracts.
|
Bots are done — your move: post |
Document Unshield, ShieldedTransfer, and ShieldedWithdrawal at the Rust and WASM strict-wait APIs so callers can select affected-state waits after the proof classification correction. Documentation only; no behavior change, so RED/GREEN tests are omitted. Formatting and whitespace checks pass, and all non-documentation source is unchanged.
|
Addressed the strict-wait documentation suggestion in The preceding Rust CI job exceeded its 90-minute limit during the shielded phase. Clippy, feature-cut checks, and non-shielded tests passed; the cancelled shielded phase is not counted as passing. The push starts a fresh CI run. |
|
Waiting for bot review — coderabbitai ✓ · 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
Independently reviewed the complete PR diff at the exact head and found no in-scope defects. The shared classifier correctly downgrades Unshield, ShieldedTransfer, and ShieldedWithdrawal to AffectedState across both verifier generations without changing proof checks, authenticated results, or consensus behavior; the genuine-proof counterexamples and updated Rust/WASM documentation support the intended compatibility change. This was a static review with no local builds or tests: the supplied CI snapshot reports Rust workspace tests passing, while the main Test Suite, browser shard 1, and PR Hygiene remain pending.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(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); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — The diff changes a contained client-side proof guarantee classification and adds substantial regression tests, but does not make large or intricate changes to consensus, funds movement, cryptography, or proof verification mechanics. - 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 below 15% reserve: weekly 15% left, 5h 100% left),glm-5.3-flash(not used above high effort; tier asks max) - 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 high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (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 |
Basic explanation
What this does: Reports shielded credit spend proofs as authenticated state, rather than confirmation that the exact requested payment executed. Keeps all verified data.
Value: Wallets and SDK consumers no longer receive an execution guarantee that these proofs cannot establish.
Risks: Intentional client compatibility change: strict execution waits now refuse these outcomes. Consensus and proof formats are unchanged. Tests use local state proofs without expensive Orchard proof generation or network calls.
Issue being fixed or feature implemented
Closes #5243. Spent-note markers do not identify the requested outputs. Unshield adds a current address balance; withdrawal adds a destination-bound document, but verification does not bind the requested amount or change outputs. These are affected-state proofs.
What was done?
AffectedStateforUnshield,ShieldedTransferandShieldedWithdrawal, preserving queries, proof checks, authenticated results and errors.ExecutionProved.In-place changes to shipped generations
The shared verifier classification is client-side and does not execute or validate blocks. Correcting it across historical client versions cannot modify consensus: execution, storage, proof generation, version tables and wire bytes are unchanged. Both verifier generations use this classifier.
How Has This Been Tested?
cargo test -p drive --lib verify::state_transition::verify_state_transition_was_executed_with_proof: 75 passed, 0 failed, 0 ignored, including all five new tests.cargo check -p drive --lib --no-default-features --features verify: passed.cargo fmt -p drive -- --checkandgit diff --check: passed.cargo clippy -p drive --lib --tests -- -D warnings: passed.Breaking Changes
Strict SDK
wait_for_response/broadcast_and_waitcalls returnExecutionNotProvedfor these three families, including historical proofs. Usewait_for_affected_state/broadcast_and_wait_for_affected_state(JavaScript:waitForAffectedState/broadcastAndWaitForAffectedState) when authenticated snapshots are sufficient. These results do not prove that the submitted request executed; a strict wait error does not imply the broadcast failed. No wire or consensus change.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
PR Hygiene ·
0df7d9f/self-reviewedWhen 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