FROST/ROAST readiness branch#3866
Draft
mswilkison wants to merge 240 commits into
Draft
Conversation
added 26 commits
February 20, 2026 09:30
Stacked on feat/frost-schnorr-migration-scaffold. Adds Taproot tweak helpers and per-input merkle-root metadata for tweaked P2TR key-path inputs, routes wallet signing through root-aware FROST/tbtc-signer requests, and verifies native aggregates against the tweaked output key. Also adds Taproot-native, refund-preserving deposit sweep support: Bridge/WalletProposalValidator bindings for TaprootDepositRevealed and validateTaprootDepositSweepProposal, Taproot refund script and merkle-root derivation, proposal generation that separates legacy and Taproot deposits, Taproot sweep assembly with per-input merkle roots, P2TR wallet main UTXO/change outputs, and Electrum script-based P2TR wallet UTXO discovery. Verification: go test ./pkg/bitcoin ./pkg/tbtc ./pkg/tbtcpg ./pkg/chain/ethereum; go test ./pkg/...; go test -tags frost_native ./pkg/frost/signing ./pkg/tbtc -run 'TestMessageDigestFromBigInt|TestBuildTaggedLegacyCompatibleNativeExecutionFFISigningPrimitive_Sign_NativeFROSTPath|TestExecuteBuildTaggedTBTCSignerBootstrapCoarseRound|TestWalletTransactionExecutor_SignTransaction|TestSigningExecutor'; go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/frost/signing.
## Summary - route tBTC operator recognition, authorization, and sortition-pool checks through the FROST wallet registry when FROST authorization is configured - use the FROST sortition pool for pool/reward/chaosnet status in FROST mode - update generated FROST bindings and DKG result conversion types for the current contract ABI ## Why The local FROST testnet run showed that allowlisted operators could be provisioned on-chain, but keep-core still needed to use the FROST authorization source and sortition pool instead of the legacy ECDSA/staking path for operator lifecycle checks. ## Validation - `go test ./pkg/chain/ethereum ./pkg/tbtc`
## Summary - register the build-tagged tbtc-signer bridge as the native FROST DKG engine and the full native FROST signing engine - add Go request/response adapters for the new interactive Rust ABI from #4011 - keep old/missing signer builds fail-closed through `ErrNativeCryptographyUnavailable` - disable legacy ECDSA DKG execution when the configured pre-parameters pool size is zero, so FROST-only local/testnet runs do not require an unused ECDSA preparams pipeline - reject Schnorr/FROST signing executors for non-Taproot transaction inputs before threshold signing begins - add registration coverage plus an optional linked-dylib smoke test that runs DKG, signing, aggregation, and BIP340 verification when the Rust symbols are present ## Stack - base: #4010 - requires Rust signer ABI: #4011 ## Testnet rehearsal note The local FROST testnet reached threshold signing for a real revealed Bitcoin testnet deposit and produced a native aggregate signature. The action then failed while applying the signature because the deposit sweep input was a legacy P2WSH deposit output requiring ECDSA semantics, not a Taproot key-path wallet input. This PR now fails closed earlier for that class of mismatch: a Schnorr/FROST signing executor will not sign non-P2TR transaction inputs. This does not make legacy deposits sweepable by FROST; it prevents wasting a threshold signing round and producing a misleading invalid-signature failure. ## Validation - `go test -tags 'frost_native frost_tbtc_signer' ./pkg/frost/signing` - `CGO_LDFLAGS='-L/private/tmp/keep-core-pr4005-worktree/pkg/tbtc/signer/target/debug -lfrost_tbtc' DYLD_LIBRARY_PATH=/private/tmp/keep-core-pr4005-worktree/pkg/tbtc/signer/target/debug go test -tags 'frost_native frost_tbtc_signer' ./pkg/frost/signing -run TestBuildTaggedTBTCSignerInteractiveFROSTBridge_WithLinkedSigner -count=1 -v` - `KEEP_CORE_FROST_TBTC_SIGNER_ACCEPT_SCAFFOLD_KEY_GROUP=true go test -tags 'frost_native frost_tbtc_signer' ./pkg/tbtc` - `go test ./pkg/tbtc -run 'TestWalletTransactionExecutor_SignTransaction_RejectsSchnorrForLegacyInputsBeforeSigning|TestWalletTransactionExecutor_SignTransaction_RejectsMixedTaprootAndLegacyInputsBeforeSigning|TestWalletTransactionExecutor_SignTransaction_AddsTaprootKeyPathWitness|TestDkgExecutor_DisablesECDSAPreParamsWhenPoolSizeZero'` - `go test -tags frost_native ./pkg/tbtc -run 'TestWalletTransactionExecutor_SignTransaction_RejectsSchnorrForLegacyInputsBeforeSigning|TestWalletTransactionExecutor_SignTransaction_RejectsMixedTaprootAndLegacyInputsBeforeSigning|TestWalletTransactionExecutor_SignTransaction_AddsTaprootKeyPathWitness|TestDkgExecutor_DisablesECDSAPreParamsWhenPoolSizeZero|TestCalculateWalletIDForSigner_FrostUniFFIV2UsesXOnlyOutputKey'` Note: without `KEEP_CORE_FROST_TBTC_SIGNER_ACCEPT_SCAFFOLD_KEY_GROUP=true`, the broad `pkg/tbtc` run fails on existing scaffold-era legacy private-key-share fixtures, not on this bridge registration change.
## Summary - stop the frost_tbtc_signer build from registering the tbtc-signer bridge as the generic UniFFI FROST DKG/signing engine - ensure new FROST DKG prefers coarse frost-tbtc-signer-v1 material if a tbtc-signer engine is available - add regression coverage so fresh FROST DKG cannot emit frost-uniffi-v2 material in the tbtc-signer stack ## Why The private testnet E2E reached Taproot deposit sweep signing with a wallet generated as frost-uniffi-v2. That material cannot produce Taproot-tweaked signatures, so real Taproot deposits would be stuck at sweep signing. The production FROST rollout should only generate tbtc-signer-backed FROST wallet material. ## Tests - go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/frost/signing -run 'TestRegisterBuildTaggedTBTCSignerEngine|TestBuildTaggedTBTCSignerInteractiveFROSTBridge_WithLinkedSigner' - go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/tbtc -run 'TestExecuteFrostDKG_PrefersTBTCSignerMaterial|TestOutputKeyFromTBTCSignerDKGResult' - go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/frost/signing - KEEP_CORE_FROST_TBTC_SIGNER_ACCEPT_SCAFFOLD_KEY_GROUP=true go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/tbtc
## Summary - Require the tbtc-signer engine for FROST DKG output and stop falling back to the generic UniFFI FROST DKG path - Reject unsupported `frost-uniffi-v2` signer material before signing, group-key extraction, Taproot output-key extraction, and FROST wallet-ID derivation - Remove the UniFFI FROST wrapper adapters/tests while keeping the tbtc-signer ABI smoke coverage and legacy `frost-uniffi-v1` ECDSA compatibility ## Rationale `frost-uniffi-v2` is not a production compatibility format. It cannot produce Taproot-tweaked signatures, so a FROST wallet using it can accept Taproot deposits that are effectively unsweepable. This PR fails closed before new FROST wallet material or BTC deposits can be created on that unsupported path. ## Tests - `go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/frost/signing` - `KEEP_CORE_FROST_TBTC_SIGNER_ACCEPT_SCAFFOLD_KEY_GROUP=true go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/tbtc` - `go test -tags 'frost_native frost_tbtc_signer frost_roast_retry cgo' ./pkg/frost/signing` Stacked on #4020.
## Summary - remove the unregistered generic native FROST signing and DKG protocol orchestration - keep the supported tbtc-signer coarse path and its ROAST/attempt-context round contribution flow intact - retarget attempt-context and overflow tests to the surviving tbtc-signer contribution messages - drop obsolete generic native DKG startup/unmarshaller registration ## Validation - go test ./pkg/frost/signing - go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/frost/signing - go test -tags 'frost_native frost_tbtc_signer frost_roast_retry cgo' ./pkg/frost/signing - KEEP_CORE_FROST_TBTC_SIGNER_ACCEPT_SCAFFOLD_KEY_GROUP=true go test -tags 'frost_native frost_tbtc_signer cgo' ./pkg/tbtc
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.
Current State (as of 2026-05-17)
This draft PR is the umbrella readiness branch for
feat/frost-schnorr-migration-scaffold.It is being kept current with
mainso it can become a direct merge target if the FROST/ROAST stack is approved for activation.It remains in draft until the remaining phase-gate, governance, and cross-repository readiness items are closed.
Canonical Status Sources
docs/frost-migration/external-repository-tracking.md(intlabs-xyz/tbtc)docs/reviews/frost-roast-production-readiness-2026-05-16.md(intlabs-xyz/tbtc)Latest Refresh
maininto this branch.frost_native.Remaining Cross-Repo Closure Items
Notes