Commit 8ede7c2
fix(vapp): soft-revert on insufficient balance (#221)
* fix(vapp): soft-revert clear on insufficient balance instead of panicking
* fix(vapp): extend soft-revert to transfer/withdraw/delegate and fix punishment or_default
* fix(vapp): use get().ok_or on clear prover lookup to avoid default leaf
* style(vapp): apply stable rustfmt to satisfy ci
* test(vapp): cover ProverDelegatedSignerMismatch with real delegation
`test_clear_delegated_signer_mismatch` now short-circuits on
`ProverDoesNotExist` after the `get().ok_or(..)` prover lookup change,
so the delegated-signer panic path is uncovered. Add a sibling test
that registers the prover, installs a delegate via `Delegate`, and
submits a Clear whose bid is signed by the original (now non-delegated)
key — forcing the handler past the existence check and into the
signer comparison.
---------
Co-authored-by: fakedev9999 <taehoon@succinct.xyz>1 parent 48f60ee commit 8ede7c2
9 files changed
Lines changed: 541 additions & 196 deletions
File tree
- crates/vapp
- src
- tests
- programs/vapp/stf/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
10 | 54 | | |
11 | 55 | | |
12 | 56 | | |
| |||
Large diffs are not rendered by default.
0 commit comments