Skip to content

fix(tbtcpg): size FROST wallet fees as P2TR#4153

Merged
mswilkison merged 1 commit into
feat/frost-schnorr-migration-scaffoldfrom
fix/frost-fee-shape-review-2026-07-13
Jul 13, 2026
Merged

fix(tbtcpg): size FROST wallet fees as P2TR#4153
mswilkison merged 1 commit into
feat/frost-schnorr-migration-scaffoldfrom
fix/frost-fee-shape-review-2026-07-13

Conversation

@mswilkison

Copy link
Copy Markdown
Contributor

Stack: 2/2, based on #4152 (which is based on #3866).

Addresses both fee-estimation findings from the activation review:

  • redemption proposals resolve the wallet's canonical script and size the main input and change output with the P2TR shape for FROST wallets;
  • moved-funds sweep proposals resolve the actual moved-funds prevout plus the target wallet output script, including the optional main-UTXO input.

The existing exported estimators remain available as legacy P2WPKH compatibility wrappers. New script-aware variants cover P2TR callers.

Regression tests pin the one-vbyte differences: 251 vs 250 vB for redemption and 111 vs 110 vB for a fresh moved-funds sweep. They also cover two-input sweeps, fee caps, proposal wiring, and legacy compatibility.

Verified with go test for pkg/tbtcpg under default and frost_native builds, plus go vet.

Resolve the redeeming and moved-funds wallet scripts before proposal fee estimation so P2TR inputs and outputs are sized accurately. Keep the legacy estimator entry points as P2WPKH compatibility wrappers.
@coderabbitai

coderabbitai Bot commented Jul 13, 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: 19ec638e-4b05-4236-9867-de7970faf300

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 fix/frost-fee-shape-review-2026-07-13

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.

mswilkison added a commit that referenced this pull request Jul 13, 2026
Stack: 1/2, based on #3866. Downstream: #4153.

Addresses the runtime-safety findings from the activation review:

- keep persisted legacy tECDSA shares on the legacy bridge in the cgo
FROST build;
- refuse distributed FROST DKG unless both opt-ins, the ROAST transition
producer, and the interactive engine are ready;
- start ROAST channel receiving only after the first subscriber is
installed.

Regression coverage includes a persisted legacy signer round trip,
missing ROAST env/build gates, synchronous receive-on-subscribe
delivery, and the full activation build-tag selection.

Verified with default, frost_native, frost_native+frost_roast_retry,
frost_native+frost_tbtc_signer, and full activation-tag focused suites,
plus the runner-bus race test.
Base automatically changed from fix/frost-runtime-review-2026-07-13 to feat/frost-schnorr-migration-scaffold July 13, 2026 17:20
@mswilkison mswilkison merged commit 30f0e65 into feat/frost-schnorr-migration-scaffold Jul 13, 2026
17 checks passed
@mswilkison mswilkison deleted the fix/frost-fee-shape-review-2026-07-13 branch July 13, 2026 17:20
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