Repository navigation
fix: omit unrelated co-signer balances from group burn proofs - #5324
Conversation
Return verified signer power/status with no token balance for non-proposer group burns in the shared client verifier used by v0 and v1. Preserve proposer balances (including zero), history results, and the signer root used by owner-credit and quorum/app-hash verification. Document Option/undefined semantics and test SDK, WASM, and wallet FFI forwarding, including closed co-signers returning empty balances JSON. No prover, proof format, protocol table, or consensus execution changes. Test would have caught this in CI: ✖ before fix, ✔ after. Funded and absent closers failed in both generations on 1742775: Some(50) instead of None, and IncorrectProof after a successful burn. The same regressions pass after the fix; 11 focused Drive and 9 status tests pass, along with 6 native consumer tests. Remaining compile/CI verification is tracked in the draft PR.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
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 changes update grouped token burn proof results so co-signers can have no reported balance while proposer balances remain available. SDK, FFI, and WASM conversions preserve the distinction between an absent balance and zero. A separate test checks vote signature verification against the supplied state root. ChangesVote state-root verification
Grouped token burn proof results
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~40 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The described proof results preserve the distinction between an absent co-signer balance and zero across the client interfaces. No issue identified here prevents merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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 |
|
✅ Final review complete — no blockers (commit b79c8cf) · triage: normal · Phase 2 only (queue backlog) |
Documentation only; no behavior change, so a red/green regression test is not applicable.
Documentation and test module placement only; no behavior change, so an additional red/green regression test is not applicable.
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 2 only (queue backlog)
The shared v0/v1 client verifier correctly returns authenticated group status and power without an unrelated co-signer token balance, while preserving proposer balances—including zero—and existing owner-credit and Tenderdash root binding. The in-place change does not alter consensus execution or proof generation, and regression coverage exercises both verifier generations and downstream Rust, WASM, and wallet FFI conversions; no in-scope defects were found. This assessment is static only: tests were not run, and the supplied CI snapshot still shows queued/pending checks, skipped build/test suites, and failed PR-title checks.
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: ffi-engineer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 6: 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 client proof-result interpretation and cross-language balance conversion with substantial regression coverage, but does not make large or intricate changes to consensus, funds movement, or cryptographic verification. - Phase 1 reviewers: not run (skipped for throughput: 16 PRs queued, above the 10 limit)
- 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— ffi-engineer (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
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
Bots are done — your move: post |
|
Seems fine |
Basic explanation
What this does: Group-burn co-signers receive verified action status and power with no remaining token balance; proposers keep their verified balance, including zero.
Value: Clients stop displaying an unrelated co-signer balance or reporting a verification error solely because the closing co-signer owns no tokens.
Risks: Low: this is client proof interpretation only. Client binaries need updating; node execution, proof bytes and consensus are unchanged.
Issue being fixed or feature implemented
A no-history group burn debits the proposer, but the existing proof also queries the current signer. Returning that balance to a non-proposer labels an unrelated account balance as the burn result; requiring it after closure fails when that co-signer has no token balance.
What was done?
Nonefor token balance. Proposer, standalone and history paths retain their existing behavior.Option/ WASMundefinedand wallet FFI empty-balances JSON semantics; cover actual consumer conversion arms and JS getters.In-place changes to shipped generations
verify_state_transition_was_executed_with_proof/v0contains the shared body used by verifier v0 (protocol tables through PV13) and v1 (PV14). Production block validation and execution never call this client verifier, so changing its optional result/error cannot change transition acceptance, fees, stored state, consensus roots or replay at any protocol version. This follows the client-verifier exception used in #5314; protocol selection and proof generation are untouched.How Has This Been Tested?
On macOS/arm64 with sccache retained and two Cargo jobs:
1742775f6163: both v0/v1 funded co-signers returnedSome(50)instead ofNone, and absent closing co-signers returnedIncorrectProof; using the final committed 11-test file: six behavioral failures, five passing controls. The restored fix then passed all 11; the test-file SHA256 was identical in both runs.cargo test -p drive --lib group_burn --jobs 2: 11 passed, none ignored. Covers both verifier dispatch paths, A=10/B=50-or-absent/burn=3, exact signer/stored roots, ledger balances/supply, active/mixed groups, proposer 7 and zero, history/standalone controls, wrong action/group/signer and owner-credit root mismatch.cargo test -p drive --lib verify::group::verify_action_signers_total_power::v0::status_tests --jobs 2: 9 passed, none ignored.cargo test -p dash-sdk -p wasm-sdk -p platform-wallet-ffi --lib group_burn --jobs 2: 6 passed, none ignored; Rust Option, WASM native conversion, closed co-signer empty JSON and proposer zero.cargo test -p drive-proof-verifier --lib should_reject_a_verified_result_root --jobs 2: 1 passed; valid signed-root control rejects an altered app hash.cargo check -p drive --no-default-features --features verify --jobs 2: passed.group_burn_wasm_testsusingwasm-bindgen-test-runner: 3 passed, none ignored. Actual JS getters returnundefinedfor a closed co-signer, BigInt 7/0 for proposers, and wasm-dpp2 forwards no raw balance. Target C compiler was Homebrew LLVM; sccache stayed enabled.cargo clippy -p drive -p drive-proof-verifier -p dash-sdk -p wasm-sdk -p platform-wallet-ffi --all-features --all-targets --jobs 2 -- -D warnings: passed.cargo fmt --all --checkandgit diff --check: passed.Final-SHA paired Opus review approved
b79c8cfdd2with no unresolved must-fix findings and verified the repeatable red/green evidence. Thepastaclaw approved the same head, CodeRabbit completed its full review with no actionable comments, and the final refresh found zero unresolved review threads.Selected CI passed on
b79c8cfdd25332ac5341aca9f7516c72364588cb: Tests attempt 3 completed successfully, including Rust nextest (18,660 passed; 1,381 skipped), Swift SDK build/tests, JS/WASM/Evo tests, functional tests, Dashmate E2E and both browser shards. Kotlin attempt 3 also passed its native build, unit tests and emulator FFI smoke. The prior Rust job timed out compiling; the coordinator's one timeout retry passed without source or workflow changes.Workflow conditions skipped Rust-wallet tests, ARM64 image validation, Evo SDK lint, shielded tests, doctests, full chain simulations and coverage phases; these are not reported as passes. Ivan's personal review/hygiene gate and the required FFI code-owner approval remain open. Direct Rust verification and wasm-dpp2 JS forwarding are covered above. The existing wasm-drive-verify group-result display is
Unknownwith no balance field; extending that API is outside this fix.Breaking Changes
None in protocol or API shape. Updated clients intentionally receive no co-signer token balance for active and closed group burns; this does not mean zero or failed execution.
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 ·
b79c8cf/self-reviewedrs-drive— you own itrs-platform-wallet-ffi(packages/rs-platform-wallet-ffi/src/tokens/burn.rs) — HashEngineering or ZocoLini or llbartekll or romchornyirust-sdk— you own itjs-wasm-sdk— you own itWhen 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