Commit 73fabaf
fix(tbtc/signer): bind the taproot root into the completion marker (re-review)
Codex re-review (P1, valid): attempt_id is derived from session/message/attempt#/
coordinator/included - NOT the taproot root. So the message-bound completion marker
(attempt_id@message_digest) still collided across taproot tweaks: a completion
aggregated for one root (or key-path None) recorded the same marker the Round2 gate
checks for a live seat opened with a different root, wrongly preempting that seat's
Round2 (and zeroizing it) even though the signatures differ per tweak.
Bind the canonical taproot root into the marker too -
interactive_aggregated_marker(attempt_id, message_digest, taproot_root) =
"{attempt_id}@{message_digest}@{root}" (root = hex, or "keypath" for None, which
cannot collide with a 64-hex root). interactive_aggregate writes it from the root it
aggregated under; the Round2 gate recomputes it from the root THIS member opened
with. The completion marker now binds the full signing-task identity (attempt + msg
+ root); the legacy bare-id fallback is unchanged.
Test interactive_round2_completion_marker_binds_taproot_root: a completion recorded
for a different root does not preempt a key-path member's Round2, while the same-root
completion does. All 296 lib tests pass; cargo fmt clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6b2e2d0 commit 73fabaf
2 files changed
Lines changed: 132 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
49 | 58 | | |
50 | 59 | | |
51 | 60 | | |
| |||
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
| |||
507 | 518 | | |
508 | 519 | | |
509 | 520 | | |
510 | | - | |
| 521 | + | |
511 | 522 | | |
512 | 523 | | |
513 | 524 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
524 | 537 | | |
525 | 538 | | |
526 | 539 | | |
| |||
721 | 734 | | |
722 | 735 | | |
723 | 736 | | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | 737 | | |
730 | 738 | | |
731 | 739 | | |
732 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
733 | 751 | | |
734 | 752 | | |
735 | 753 | | |
| |||
758 | 776 | | |
759 | 777 | | |
760 | 778 | | |
| 779 | + | |
761 | 780 | | |
762 | 781 | | |
763 | 782 | | |
| |||
870 | 889 | | |
871 | 890 | | |
872 | 891 | | |
| 892 | + | |
873 | 893 | | |
874 | 894 | | |
875 | 895 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11993 | 11993 | | |
11994 | 11994 | | |
11995 | 11995 | | |
| 11996 | + | |
| 11997 | + | |
| 11998 | + | |
| 11999 | + | |
| 12000 | + | |
| 12001 | + | |
| 12002 | + | |
| 12003 | + | |
| 12004 | + | |
| 12005 | + | |
| 12006 | + | |
| 12007 | + | |
| 12008 | + | |
| 12009 | + | |
| 12010 | + | |
| 12011 | + | |
| 12012 | + | |
| 12013 | + | |
| 12014 | + | |
| 12015 | + | |
| 12016 | + | |
| 12017 | + | |
| 12018 | + | |
| 12019 | + | |
| 12020 | + | |
| 12021 | + | |
| 12022 | + | |
| 12023 | + | |
| 12024 | + | |
| 12025 | + | |
| 12026 | + | |
| 12027 | + | |
| 12028 | + | |
| 12029 | + | |
| 12030 | + | |
| 12031 | + | |
| 12032 | + | |
| 12033 | + | |
| 12034 | + | |
| 12035 | + | |
| 12036 | + | |
| 12037 | + | |
| 12038 | + | |
| 12039 | + | |
| 12040 | + | |
| 12041 | + | |
| 12042 | + | |
| 12043 | + | |
| 12044 | + | |
| 12045 | + | |
| 12046 | + | |
| 12047 | + | |
| 12048 | + | |
| 12049 | + | |
| 12050 | + | |
| 12051 | + | |
| 12052 | + | |
| 12053 | + | |
| 12054 | + | |
| 12055 | + | |
| 12056 | + | |
| 12057 | + | |
| 12058 | + | |
| 12059 | + | |
| 12060 | + | |
| 12061 | + | |
| 12062 | + | |
| 12063 | + | |
| 12064 | + | |
| 12065 | + | |
| 12066 | + | |
| 12067 | + | |
| 12068 | + | |
| 12069 | + | |
| 12070 | + | |
| 12071 | + | |
| 12072 | + | |
| 12073 | + | |
| 12074 | + | |
| 12075 | + | |
| 12076 | + | |
| 12077 | + | |
| 12078 | + | |
| 12079 | + | |
| 12080 | + | |
| 12081 | + | |
| 12082 | + | |
| 12083 | + | |
| 12084 | + | |
| 12085 | + | |
| 12086 | + | |
| 12087 | + | |
| 12088 | + | |
| 12089 | + | |
11996 | 12090 | | |
11997 | 12091 | | |
11998 | 12092 | | |
| |||
0 commit comments