feat(frost): register the cgo engine as the interactive signing provider (gated)#4096
Merged
mswilkison merged 2 commits intoJun 20, 2026
Conversation
…der (gated) The cgo buildTaggedTBTCSignerEngine satisfies interactiveSigningEngine but was intentionally NOT registered as the interactive provider, deferred until the blame/evidence bridge + stable ROAST session-key plumbing landed. Those have landed (PR2b-2 + the share-blame wiring, and the roastSessionID plumbing), so register it: registerBuildTaggedNativeFROSTSigningEngine now also calls RegisterInteractiveSigningEngineProvider with a factory returning a fresh cgo bridge handle. This is dev-behind-tags, not a production enablement. Registration alone changes nothing for an operator: the executor still requires the default-off KEEP_CORE_FROST_INTERACTIVE_SIGNING_ENABLED opt-in (read per call), so the interactive path stays dormant until explicitly enabled on a cgo build, and the coarse path remains the fallback. The frost-secp256k1-tr external audit gates the threshold-ECDSA -> FROST CUTOVER in production (turning that opt-in on for real wallets), NOT this registration. Extends the existing cgo registration test to assert the interactive provider is installed (and returns the cgo engine type) after registration. Validated: default + frost_native build/vet unaffected (the file is cgo-tagged); cgo build/vet + the registration test run green; gofmt clean. 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 |
…old) Codex review fold on #4096. Registering the cgo engine as the interactive provider made registerBuildTaggedNativeFROSTSigningEngine mutate a package-global provider, and that function runs from the default FFI registration path. Several tests trigger that path, so TestRegisterInteractiveSigningEngineProvider - which asserted "no provider yet" up front - failed under -shuffle / a focused -run when one of them ran first (reproduced: it saw a leaked *buildTaggedTBTCSignerEngine). Codex suggested resetting the provider in the default-registration cleanup; that alone is insufficient (verified: another default-registration test leaks it under a different interleaving). The robust fix is for the asserting test to establish its own precondition: it now resets the interactive provider up front, so it is order-independent regardless of which tests ran before it. Also reset it in TestRegisterNativeExecutionFFISigningPrimitiveForBuild_UsesDefaultProvider's cleanup (symmetric with its existing FFI executor/provider resets), so the test that mutates the global also tidies it. Verified: 10 -shuffle seeds of the cgo Register/Interactive tests pass (was an order-dependent FAIL before); the original repro order passes; non-cgo frost_native unaffected; cgo build/vet + gofmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
054f51b
into
feat/frost-schnorr-migration-scaffold
15 of 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
The cgo
buildTaggedTBTCSignerEnginesatisfiesinteractiveSigningEnginebut was intentionally not registered as the interactive provider — deferred until the blame/evidence bridge + stable ROAST session-key plumbing landed. Those have now landed (PR2b-2 + the share-blame wiring, and theroastSessionIDplumbing in #4082), so this registers it:registerBuildTaggedNativeFROSTSigningEnginenow also callsRegisterInteractiveSigningEngineProviderwith a factory returning a fresh cgo bridge handle.Not a production enablement
This is dev-behind-tags. Registration alone changes nothing for an operator:
KEEP_CORE_FROST_INTERACTIVE_SIGNING_ENABLEDopt-in (read per call), so the interactive path stays dormant until explicitly enabled, and the coarse path remains the fallback.frost_native && frost_tbtc_signer && cgobuild.frost-secp256k1-trexternal audit gates the threshold-ECDSA → FROST cutover in production (turning that opt-in on for real wallets), not this registration.So this removes the "no provider by construction" deferral now that its stated prerequisites are met, leaving the explicit default-off opt-in as the runtime gate.
Tests
Extends the existing cgo registration test (
TestRegisterBuildTaggedTBTCSignerEngine) to assert the interactive provider is installed and returns the cgo engine type after registration.Validated: default +
frost_nativebuild/vet unaffected (the changed file is cgo-tagged); cgo build/vet + the registration test run green; gofmt clean. The standardclient-*CI does not build the cgo tags, so this is validated locally.🤖 Generated with Claude Code