Commit 49fdcbc
fix(tbtc/signer): free finalized non-signing siblings on aggregate (re-review)
Codex re-review (P2, valid): when a multi-seat attempt aggregates with a threshold
subset that EXCLUDES a local member which opened/Round1'd the same attempt + root,
that member never calls Round2 (it is not a signer), so the Round2 completion gate
never runs for it - its interactive_signing entry (nonces, key, message) and its
live-member capacity slot stayed resident until the 1h TTL or an explicit abort.
interactive_aggregate's success path now frees the LOCAL siblings finalized by the
completion: after persisting the marker, remove + zeroize every interactive_signing
entry on (attempt_id, taproot root) - the signers' entries were already removed at
their Round2, and a sibling on a DIFFERENT root is a distinct signing task and is
left untouched. The Round2 completion gate stays as the defense for a sibling that
RE-OPENS the finalized attempt and tries to sign.
Test interactive_round2_refused_after_aggregate_for_unsigned_sibling now asserts the
non-signing sibling is freed at aggregation, then re-opens it and confirms the gate
still refuses its Round2. All 296 lib tests pass; cargo fmt clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 73fabaf commit 49fdcbc
2 files changed
Lines changed: 50 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
918 | 943 | | |
919 | 944 | | |
920 | 945 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11755 | 11755 | | |
11756 | 11756 | | |
11757 | 11757 | | |
11758 | | - | |
| 11758 | + | |
| 11759 | + | |
11759 | 11760 | | |
11760 | 11761 | | |
11761 | 11762 | | |
| |||
11829 | 11830 | | |
11830 | 11831 | | |
11831 | 11832 | | |
11832 | | - | |
11833 | | - | |
11834 | | - | |
| 11833 | + | |
| 11834 | + | |
| 11835 | + | |
| 11836 | + | |
| 11837 | + | |
| 11838 | + | |
| 11839 | + | |
| 11840 | + | |
| 11841 | + | |
| 11842 | + | |
| 11843 | + | |
| 11844 | + | |
| 11845 | + | |
| 11846 | + | |
| 11847 | + | |
| 11848 | + | |
| 11849 | + | |
| 11850 | + | |
| 11851 | + | |
| 11852 | + | |
| 11853 | + | |
| 11854 | + | |
11835 | 11855 | | |
11836 | 11856 | | |
11837 | 11857 | | |
| |||
11841 | 11861 | | |
11842 | 11862 | | |
11843 | 11863 | | |
11844 | | - | |
| 11864 | + | |
11845 | 11865 | | |
11846 | 11866 | | |
11847 | 11867 | | |
| |||
0 commit comments