feat(confidential)!: make revoke_spender proofless - #854
Draft
brozorec wants to merge 1 commit into
Draft
Conversation
Revocation folds the escrowed allowance commitment back into the owner's spendable commitment by homomorphic addition, exactly like merge (DESIGN §7.4). The escrowed amount was range-proven when the delegation was created and re-bounded on every spender transfer, and the next spend re-bounds the result, so the RevokeSpender circuit proved nothing the protocol did not already know. The auditor stays in sync because it can now derive the allowance blinding from the escrowed dvk_i (S14 / O_a9). BREAKING CHANGE: revoke_spender drops its `data` argument, the RevokeSpender event carries `(a_tilde, allowance_salt)` instead of the checkpoint fields, `on_revoke_spender` loses its payload, and CircuitType::RevokeSpender is removed.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 2/3. Base:
feat/conf-token-auditor-escrow(#853). Followed by clawback.What
Deletes the
RevokeSpendercircuit. Revocation becomes a homomorphic fold:C_spend += C_a, then delete the delegation entry.circuits/revoke_spender/and its VK removed (−1144 lines)revoke_spender(e, owner, spender)— nodata, no proofRevokeSpenderPayload/RevokeSpenderDatadroppedRevokeSpenderevent reshapes to(a_tilde, allowance_salt)on_revoke_spenderloses its payload argumentCircuitType::RevokeSpenderremoved, vacating discriminant 5Why the proof was redundant
The fold is pure homomorphic addition, exactly like
merge(DESIGN §7.4): nothing is re-randomized, no private value is asserted. The escrowed amount was range-proven when the delegation was created and re-bounded on every spender transfer, and the next spend re-bounds the result. The circuit proved nothing the protocol did not already know.The auditor stays in sync because #853 hands it
dvk_i(S14/O_a9), from which it derivesr_a = derive_allow_r(dvk_i, σ_a). Folding an allowance the auditor cannot open would desync its accumulator permanently — that is the dependency on #853, and the reason this PR cannot land first.The event carries
a_tildeandallowance_saltbecause the fold deletes the entry that held them and no other event carries either:SetSpenderemits neither, andSpenderTransferemits the salt it consumed, not the one it wrote. Both are public storage values, so emitting them discloses nothing new.This PR vacates
CircuitType::RevokeSpender = 5; PR 3 reissues 5 asClawback. A post-change token pointed at a pre-change verifier registry would fetch the retired circuit's key under discriminant 5, and nothing in the verifier can detect the mismatch.Clawback = 6costs nothing — the enum is not dense-packed and no on-chain value is saved by filling the hole. Recommend taking the free win rather than documenting the hazard. Flagging here because this PR is where the discriminant is freed.Checks
nargo test134 passed ·cargo test -p stellar-tokens713 passed ·cargo +nightly fmt --checkclean ·cargo clippy --all-targetsclean ·constraints.baselineregenerated