docs(platform): distinguish current-state proofs, stored receipts and execution result text - #4938
DCG-Claude wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: dashpay/platform/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
📖 Book Preview built successfully. Download the preview from the workflow artifacts. Updated at 2026-09-29T12:51:42.052Z |
|
✅ Final review complete — Phase 1 only — no blockers (commit 7430053) · triage: trivial |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final review — Phase 1 only (trivial change)
Verified the supplied findings against head 7140931. This documentation-only change has two actionable precision gaps: the public wait results do not expose the guarantee tag, and the hash-based JavaScript wait returns an unverified status without being labeled accordingly. No blocking issues were confirmed; overlapping findings were consolidated.
🟡 2 suggestion(s)
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (agent: phase1-reviewer, role: architecture-layering); reviewer 3: glm-5.3-flash (agent: phase1-reviewer, role: rust-quality); reviewer 4: glm-5.3-flash (agent: phase1-reviewer, role: security-auditor); final verifier: gpt-6-astra (agent: astra-gate-verifier, role: final-verifier)
- Triage:
trivialbygpt-6-astra(effort low) — The diff changes only book documentation and Rust doc comments, clarifying proof and receipt guarantees and correcting API examples without altering executable behavior, wire formats, or protocol rules. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer,glm-5.3-flash— architecture-layering (completed, effort high); agentphase1-reviewer,glm-5.3-flash— rust-quality (completed, effort high); agentphase1-reviewer,glm-5.3-flash— security-auditor (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 93% left, weekly 50% left; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 1% left, 5h 100% left) - Fresh verifier:
gpt-6-astra— final-verifier; agentastra-gate-verifier - Phase 2 reviewers: not run (triage rated this change trivial); this review comments and never approves
🤖 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 `book/src/sdk/results-receipts-and-proofs.md`:
- [SUGGESTION] book/src/sdk/results-receipts-and-proofs.md:185-190: Distinguish internally verified tags from public wait return values
These rows describe the public wait results as tagged, but the adapters consume the guarantee tag before returning. In packages/rs-sdk/src/platform/transition/broadcast.rs:196-222, the strict path calls require_execution_proved and converts the inner result to T, while the affected-state path calls outcome.into_result() before conversion. The JavaScript methods likewise return the untagged StateTransitionProofResultType through the WASM converter. Consequently, an affected-state caller cannot inspect the returned value to determine whether verification established ExecutionProved or only AffectedState. Describe the rows in terms of guarantees accepted by each method, and clarify that the tag is internal today. The statement at line 54 that the SDK expresses the snapshot distinction in the type needs the same qualification.
In `book/src/evo-sdk/state-transitions.md`:
- [SUGGESTION] book/src/evo-sdk/state-transitions.md:137-138: Label the hash-based wait result as an unverified node report
This example places waitForStateTransitionResult beside the proof-verifying waits without explaining its different trust guarantee. The facade delegates to packages/wasm-sdk/src/queries/system.rs:1512-1579, which requests a response with prove: self.prove() but maps any Proof variant directly to SUCCESS without verifying the proof or quorum signature. Its status therefore represents an unverified node report, not verified execution evidence. Add that distinction here and include the hash-based method in the new chapter's API mapping table so readers do not mistake this wait for either verified wait pair.
Out-of-scope follow-up suggestions (2)
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.
- Hash-based WASM wait reports SUCCESS without verifying the returned proof — packages/wasm-sdk/src/queries/system.rs:1512-1579 maps a raw Proof response to SUCCESS without cryptographic verification. This is a concrete trust-boundary concern for callers treating that status as confirmed execution, but the implementation predates this documentation-only PR. The in-scope documentation finding labels the existing behavior; changing that behavior belongs in separate client work.
- Follow-up: Track a separate client-results task to define and enforce the hash-based wait's trust contract, either verifying appropriate execution evidence or explicitly exposing the status as unverified.
- wasm broadcastAndWait flattens ExecutionNotProved into a generic error — Confirmed the generic error conversion at packages/wasm-sdk/src/state_transitions/broadcast.rs:165-168, but this behavior is pre-existing and outside the documentation change. The new text says the method rejects with an execution-not-proved error; it does not promise a specific JavaScript error kind, and the generic wrapper retains the underlying error text. Error-kind parity is adjacent client cleanup rather than an exceptional follow-up for this review.
- Follow-up: Consider creating a separate issue or author/maintainer-requested PR for this.
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final review — Phase 1 only (trivial change)
The follow-up documentation accurately distinguishes unverified hash-based status reports from proof-verified waits and explains that guarantee tags are consumed internally before wait results are returned. Both prior findings are fixed, and no new in-scope issues remain.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: gemini-3.8-flash-high (agent: phase1-reviewer, role: general); reviewer 2: gemini-3.8-flash-high (agent: phase1-reviewer, role: architecture-layering); final verifier: gpt-6-astra (agent: astra-gate-verifier, role: final-verifier)
- Triage:
trivialbygpt-6-astra(effort low) — The diff is documentation-only, consisting of book content and Rustdoc comments with no behavior, consensus, cryptographic, networking, storage, or other critical-surface changes. - Phase 1 reviewers:
gemini-3.8-flash-high— general (completed, effort high); agentphase1-reviewer,gemini-3.8-flash-high— architecture-layering (completed, effort high); agentphase1-reviewer - Phase 1 model:
gemini-3.8-flash-high— antigravity quota: weekly 96% left, 5h 83% left - Fresh verifier:
gpt-6-astra— final-verifier; agentastra-gate-verifier - Phase 2 reviewers: not run (triage rated this change trivial); this review comments and never approves
🤖 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.
|
/self-reviewed f560be2 |
|
@coderabbitai review No review for |
… execution result text Add the book chapter "Results, Receipts and Proofs" that names the three result classes a client can hold after a contract call or query (unproven execution-result text, stored receipt, current-state proof), places them alongside the existing ExecutionProved versus AffectedState guarantee tag, states the confirmed receipt policy (enabled by default, contract may disable, contract-defined retention, no invented expiry, code retention independent), lists the reasons a receipt can be absent, the outcome classes a client must keep apart, which API returns which class today, and the requirements the receipt, ABI and client tasks implement against. Update the put-operations chapter with the affected-state wait pair and the outcome tag, expand the evo-sdk waiting section with the strict and snapshot waits, and anchor the vocabulary in the rustdoc of StateTransitionProofOutcome, BroadcastStateTransition, FetchUnproved and FromUnproved. Closing the dangling code fence on FromUnproved removes one pre-existing rustdoc warning. No code, wire or version change. Refs #4692, refs #4626 (section 6.6, Q32). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The public wait pairs return the untagged inner result: the strict pair rejects AffectedState before conversion and the snapshot pair discards the tag, so the guarantee a caller holds is fixed by the method it chose, not by a field on the value. Say so in the chapter and the evo-sdk waiting section, and add the hash-based waitForStateTransitionResult to the API table as an unverified node report, since it counts any proof in the response as success without checking it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
f560be2 to
ab68520
Compare
|
Rebased onto the current Upstream turned
Local gate: rustfmt on the four touched Rust files, clippy on
|
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final review — Phase 1 only (trivial change)
The documentation-only change accurately incorporates the two prior review fixes: the guarantee tag is described as internal to verifier results and consumed by wait adapters, and the hash-based JavaScript wait is clearly identified as an unverified node report. One in-scope documentation accuracy issue remains: the new guarantee-family mapping broadly classifies document creates and shields without documenting the indexOnly and shielded-family exceptions present in the verifier classifier.
🟡 1 suggestion(s)
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (agent: phase1-reviewer, role: architecture-layering); reviewer 3: glm-5.3-flash (agent: phase1-reviewer, role: rust-quality); final verifier: gpt-6-astra (agent: astra-gate-verifier, role: final-verifier)
- Triage:
trivialbygpt-6-astra(effort low) — The diff adds and corrects book documentation and Rust doc comments only, with no changes to executable behavior, wire formats, consensus rules, or proof verification. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer,glm-5.3-flash— architecture-layering (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 82% left, weekly 87% left; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 13% left, 5h 100% left) - Fresh verifier:
gpt-6-astra— final-verifier; agentastra-gate-verifier - Phase 2 reviewers: not run (triage rated this change trivial); this review comments and never approves
🤖 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 `book/src/sdk/results-receipts-and-proofs.md`:
- [SUGGESTION] book/src/sdk/results-receipts-and-proofs.md:46-54: Make the guarantee-family mapping match the verifier classifier
The chapter presents document creates as `ExecutionProved` and shields as `AffectedState`, but both statements are too broad for the classifier that determines the actual guarantee. Creates and deletes of `indexOnly` document types are classified as `AffectedState` because their proofs carry neither the document id, entropy, nor nonce. Shielded transitions are also split: `Unshield`, `ShieldedTransfer`, and `ShieldedWithdrawal` are `ExecutionProved`, while `Shield`, `ShieldFromAssetLock`, `ShieldFromIdentity`, `IdentityCreateFromShieldedPool`, and `IdentityTopUpFromShieldedPool` are `AffectedState`. The chapter is the shared reference linked by the other waiting-method documentation, so readers could otherwise expect strict waits for these families to succeed when the SDK returns `Error::ExecutionNotProved`. Either enumerate the complete mapping or explicitly label the lists as examples and identify `state_transition_proof_binds_execution` as the authoritative exhaustive classifier.
The chapter listed document creates as ExecutionProved and shields as AffectedState, which is too broad: creates and deletes on indexOnly document types are AffectedState, and the shielded families split (Unshield, ShieldedTransfer and ShieldedWithdrawal bind the Orchard actions, the other five prove only the consumed outpoint, nullifier or balance). Label the lists as examples, name the exhaustive classifier state_transition_proof_binds_execution as the authority, spell out the two rulings that are easy to misjudge, and qualify the two sibling passages the same way. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final review — Phase 1 only (trivial change)
The documentation-only PR is internally consistent with the current SDK, verifier, and WASM implementations. The three prior findings are fixed: the classifier is identified as authoritative, public wait methods are described as consuming internal guarantee tags, and the hash-based wait is clearly labeled as an unverified node report.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (agent: phase1-reviewer, role: architecture-layering); final verifier: gpt-6-astra (agent: astra-gate-verifier, role: final-verifier)
- Triage:
trivialbygpt-6-astra(effort low) — The diff changes only book documentation and Rust doc comments, clarifying proof guarantees and receipt policy without changing executable behavior, wire formats, or consensus rules. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer,glm-5.3-flash— architecture-layering (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 93% left, weekly 84% left; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 13% left, 5h 100% left) - Fresh verifier:
gpt-6-astra— final-verifier; agentastra-gate-verifier - Phase 2 reviewers: not run (triage rated this change trivial); this review comments and never approves
🤖 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.
|
/self-reviewed 7430053 |
|
@coderabbitai review No review for |
|
Ready for review — files with no dedicated owner: QuantumExplorer or shumkov · |
Issue being fixed or feature implemented
Part of the smart-contract plan in #4626 (section 6.6, owner decision Q32), workstream 50-PROOFS. Task R06-11.
A contract call response can carry the guest's returned bytes or error text, a stored receipt, response metadata and a GroveDB proof in one message. Nothing in the repository said which of those a client may treat as proven, so the receipt, ABI and client tasks had no shared vocabulary to implement against, and a client could advertise a result as a proof of execution merely because the same response included a valid state proof. The receipt policy the owner confirmed (enabled by default, contract-controlled retention, no invented expiry, code retention independent) was also recorded only in the issue.
Refs #4692
What was done?
Documentation only. No code, wire or version change; every
.rsedit is a doc comment.book/src/sdk/results-receipts-and-proofs.md. It names the three result classes (unproven execution-result text, stored receipt, current-state proof) with what each is bound to and what a client may and may not conclude; places them alongside the existingExecutionProvedversusAffectedStateguarantee (theStateTransitionProofGuaranteecarried byStateTransitionProofOutcome) and the strict and affected-state wait pairs; states what a receipt proves and does not; records the Q32 receipt policy as binding; lists the reasons a receipt can be absent and why absence is never "call failed"; tabulates the outcome classes a client must keep apart; maps today's Rust SDK, proof verifier and JavaScript SDK APIs to the class they return; and closes with a requirement checklist naming the implementing tasks (R08-04, R10-03, R12-09, R10-06, R13-03, R13-11, R09-08, R10-07).book/src/SUMMARY.md: one entry under Rust SDK after Put Operations.book/src/sdk/put-operations.md: theBroadcastStateTransitionlisting now includeswait_for_affected_stateandbroadcast_and_wait_for_affected_state, the use-case list covers all five methods and the_with_metadatatwins, the wait example matches the real code (the tagged outcome goes throughrequire_execution_provedbefore conversion), a paragraph explains the two tags, and the error list gainsExecutionNotProved.book/src/evo-sdk/state-transitions.md: the waiting section now showswaitForStateTransitionResult,waitForResponseandwaitForAffectedState(the previous example called awaitForResultmethod that does not exist on the facade) and explains strict versus snapshot waits.StateTransitionProofOutcomeinpackages/rs-dpp/src/state_transition/proof_result.rs(how a receipt relates to the two tags), theBroadcastStateTransitiontrait inpackages/rs-sdk/src/platform/transition/broadcast.rs(previously undocumented; the two pairs and their guarantees),FetchUnprovedinpackages/rs-sdk/src/platform/fetch_unproved.rsandFromUnprovedinpackages/rs-drive-proof-verifier/src/unproved.rs(both return unproven execution-result text and must not be persisted as verified state). TheFromUnprovededit also closes a dangling code fence that rustdoc already warned about, so the warning count for the three crates drops by one.Nothing under
wasm-sdk,js-evo-sdksource,rs-sdk-ffi, Swift or Kotlin was touched; R13-11 owns parity there.How Has This Been Tested?
Book:
The only mdbook warning is the missing mermaid preprocessor, which CI installs. Every relative link in the new chapter and the two edited chapters resolves to a rendered page.
Rust (all with a private
CARGO_TARGET_DIR, exit codes captured to/tmp/r06-11/*.exit):Results (exit codes in
/tmp/r06-11/*.exit):cargo fmt --all --checkcargo clippyondpp,drive-proof-verifier,dash-sdkcargo check --workspace --all-targetscargo docon the three cratesFromUnprovedremoves "Rust code block is empty"); no warning in a touched filecargo test -p dash-sdk --lib broadcaststrict_wait_rejects_affected_state_outcomescargo test -p dpp --doc proof_resultThe verify-only cut of
drivewas not run because nothing underpackages/rs-drive/src/verifychanged. No full package suite was run locally.Breaking Changes
None. No type, signature, wire format, version table or feature changes.
Decisions taken (provisional values)
ExecutionOutcome,StoredReceiptandVerifiedStateResultused in the chapter are the proofs-and-clients draft's proposed names. The chapter says so; R10-03 and R10-06 allocate the real types and may rename them.ExecutionProved; receipts disabled gives at bestAffectedState) is a working interpretation for R10-06, stated as such. The confirmed part is the invariant: no path returnsExecutionProvedwithout a proof that binds the invocation.v5.0-devand the shapes are allocated to R08-04 (A07) and R10-03 (A18). Adding them here would collide with those PRs.Checklist:
For repository code-owners and collaborators only
Dash-Tasks: R06-11
🤖 Posted autonomously by DashVM (Claude Fable 5.1) on behalf of pasta.
🤖 Generated with Claude Code
Automated reviewer consensus (Fable 5.1 implementer, GPT-6 Astra reviewer)
Reviewer consensus
Review consensus
notednotedPR Hygiene ·
7430053book/src/SUMMARY.md,book/src/evo-sdk/state-transitions.md,book/src/sdk/put-operations.mdand 2 more) — QuantumExplorer or shumkovdpp(packages/rs-dpp/src/state_transition/proof_result.rs) — QuantumExplorer or shumkovrust-sdk(packages/rs-sdk/src/platform/fetch_unproved.rs,packages/rs-sdk/src/platform/transition/broadcast.rs) — lklimek or shumkovWhen every box is checked the
PR Hygienecheck passes and this can merge.