Phase 7.3 PR1b: interactive_aggregate cgo bridge + candidate-culprit typed error#4073
Merged
mswilkison merged 1 commit intoJun 16, 2026
Conversation
…typed error Completes the interactive engine bridge (PR1 = #4072 was open/round1/round2/abort). InteractiveAggregate aggregates the responsive subset's shares for an attempt into the BIP-340 signature; the engine resolves verifying material from the session's own DKG state (no public key package crosses the FFI). The one non-mechanical piece: on a share-verification failure the engine returns the CANDIDATE CULPRITS in the error payload (ErrorResponse.candidate_culprits, u16 Go member ids, omitted for other errors), but the Go error envelope was code/message only. So: - add candidate_culprits to buildTaggedTBTCSignerErrorResponse + buildTaggedTBTCSignerStructuredError (additive; empty for every other error, so no behavior change elsewhere); - add a typed InteractiveAggregateShareVerificationError{SessionID, AttemptID, CandidateCulprits, Message}; InteractiveAggregate maps the aggregate_share_verification_failed code to it (session/attempt filled from the caller's request, which the payload doesn't echo). The runner errors.As it and feeds the culprits to the envelope-bound f+1 blame adjudication. The culprits are documented as PURE-CRYPTO candidates, NOT authoritative blame (a coordinator that aggregated honest shares against a substituted package/root would make honest shares appear here) - consistent with the engine + #4062. ADDITIVE: method on the concrete engine only (interface not widened; no fakes touched - repo-wide frost_native vet clean). Carries the wire u16 ids; PR3 converts u16 -> group.MemberIndex. Tests: payload builder (fields, rejections) + decoder (success/malformed) + interpretInteractiveAggregateError (share-verification -> typed error with culprits; other error -> passthrough preserving ErrNativeBridgeOperationFailed) + error-payload culprit extraction. Builds clean under default / frost_native / cgo; signing suite + repo-wide frost_native vet + gofmt green. (client-* CI does not build the cgo tags; validated locally.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
d0edfef
into
feat/frost-schnorr-migration-scaffold
16 checks passed
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.
What
Completes the interactive engine bridge (PR1 #4072 added open/round1/round2/abort).
InteractiveAggregateaggregates the responsive subset's signature shares for an attempt into the BIP-340 signature — the engine resolves verifying material from the session's own DKG state, so no public key package crosses the FFI.The one non-mechanical piece: surfacing candidate culprits
On a share-verification failure the engine returns the candidate culprits in the error payload (
ErrorResponse.candidate_culprits— u16 Go member ids, omitted for other errors), but the Go error envelope wascode/messageonly. So:candidate_culpritstobuildTaggedTBTCSignerErrorResponse+buildTaggedTBTCSignerStructuredError(additive — empty for every other error, no behavior change elsewhere);InteractiveAggregateShareVerificationError{SessionID, AttemptID, CandidateCulprits, Message};InteractiveAggregatemaps theaggregate_share_verification_failedcode to it (session/attempt filled from the caller's request, which the payload doesn't echo). The PR3 runner willerrors.Asit and feed the culprits to the envelope-bound f+1 blame adjudication.The culprits are documented as pure-crypto candidates, NOT authoritative blame — a coordinator that aggregated honest shares against a substituted package/root would make honest shares appear here (consistent with the engine + #4062). They're carried as the wire
[]uint16; PR3 convertsu16 → group.MemberIndex(range-checked) at the orchestration boundary.Scope / blast radius
NativeTBTCSignerEngineinterface is not widened, so no fakes change (confirmed via repo-widego vet -tags frost_native ./...).Tests
Payload builder (fields, rejections incl. empty session/attempt/package/shares/share-data) + decoder (success / malformed JSON) +
interpretInteractiveAggregateError(share-verification → typed error carrying culprits + session/attempt; any other error → passthrough preservingErrNativeBridgeOperationFailed) + the error-payload culprit extraction (and that non-culprit errors decode to an empty list).Validation
client-*CI does not build these cgo-tagged files. Validated locally: default / frost_native / frost_native+frost_tbtc_signer+cgo builds, signing suite, repo-widefrost_nativevet, gofmt — all green.Next (Phase 7.3)
Coordinator.MarkSucceeded+ an explicit active-attempt object → the in-process runner (happy + sad/blame path, fake bus) → realpkg/nettransport → executor integration → t-of-included finalize → delete the transitional coarse path.🤖 Generated with Claude Code