Skip to content

feat(frost): register the cgo engine as the interactive signing provider (gated)#4096

Merged
mswilkison merged 2 commits into
feat/frost-schnorr-migration-scaffoldfrom
feat/frost-7.3-cgo-interactive-provider
Jun 20, 2026
Merged

feat(frost): register the cgo engine as the interactive signing provider (gated)#4096
mswilkison merged 2 commits into
feat/frost-schnorr-migration-scaffoldfrom
feat/frost-7.3-cgo-interactive-provider

Conversation

@mswilkison

Copy link
Copy Markdown
Contributor

What

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 now landed (PR2b-2 + the share-blame wiring, and the roastSessionID plumbing in #4082), so this registers it: registerBuildTaggedNativeFROSTSigningEngine now also calls RegisterInteractiveSigningEngineProvider with a factory returning a fresh cgo bridge handle.

Not a production enablement

This is dev-behind-tags. 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, and the coarse path remains the fallback.
  • It's only compiled into the frost_native && frost_tbtc_signer && cgo build.
  • 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.

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_native build/vet unaffected (the changed file is cgo-tagged); cgo build/vet + the registration test run green; gofmt clean. The standard client-* CI does not build the cgo tags, so this is validated locally.

🤖 Generated with Claude Code

…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>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5802c9f7-77eb-41d2-b05c-7942945a4df0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/frost-7.3-cgo-interactive-provider

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…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>
@mswilkison mswilkison merged commit 054f51b into feat/frost-schnorr-migration-scaffold Jun 20, 2026
15 of 16 checks passed
@mswilkison mswilkison deleted the feat/frost-7.3-cgo-interactive-provider branch June 20, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant