Skip to content

fix(tbtc): separate FROST parameters and retry DKG events#4144

Merged
mswilkison merged 1 commit into
feat/frost-schnorr-migration-scaffoldfrom
fix/pr3866-dkg-review
Jul 12, 2026
Merged

fix(tbtc): separate FROST parameters and retry DKG events#4144
mswilkison merged 1 commit into
feat/frost-schnorr-migration-scaffoldfrom
fix/pr3866-dkg-review

Conversation

@mswilkison

@mswilkison mswilkison commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Stack 1 of 3 on top of #3866. Followed by #4145 and #4146.

Addresses the FROST DKG configuration and coordinator findings from the latest review:

  • load groupSize, activeThreshold, and groupThreshold from FrostDkgValidator independently of the legacy ECDSA validator
  • use the FROST parameters for DKG execution, result signing, readiness, signer registration, recovery lookback, wallet signing, and inactivity executors
  • replace eager seven-day FROST event deduplication with atomic in-progress leases that are released after transient failures and completed only after work is handled or safely scheduled
  • when a stale DkgStarted replay resolves a newer event, complete the stale lease and acquire a fresh lease for the newer seed before membership or DKG execution
  • guard nil native DKG parameters and treat build-level native unavailability as terminal for the current process while keeping runtime-changeable gates retryable
  • stop result approval immediately when the parent context is canceled

Startup now intentionally fails if FrostWalletRegistry is enabled without a configured FrostDkgValidator, because the node cannot safely infer the independent FROST thresholds.

Verification:

  • go test ./pkg/tbtc ./pkg/chain/ethereum
  • focused default and frost_native coordinator/parameter tests
  • focused race tests and go vet
  • stale-to-latest seed regressions covering concurrent, completed, and transient-failure cases

The next stack layer, #4145, routes heartbeat, inactivity, and closure handling through the wallet's scheme-specific registry.

@coderabbitai

coderabbitai Bot commented Jul 11, 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: 2445bf4d-a91d-426a-8904-1f4f2b648b9e

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/pr3866-dkg-review

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 mswilkison force-pushed the fix/pr3866-dkg-review branch from 52b8ee5 to 5abaa92 Compare July 11, 2026 20:03
@mswilkison mswilkison merged commit a3d96ee into feat/frost-schnorr-migration-scaffold Jul 12, 2026
18 checks passed
@mswilkison mswilkison deleted the fix/pr3866-dkg-review branch July 12, 2026 22:23
mswilkison added a commit that referenced this pull request Jul 12, 2026
## Stack

2 of 3. Depends on #4144, is followed by #4146, and targets
`fix/pr3866-dkg-review`.

## What changed

- route FROST inactivity claims through FrostWalletRegistry and
FrostSortitionPool, including the FROST claim hash and operator IDs
- keep legacy heartbeat stake and registration checks bound to the ECDSA
registry during dual-stack migration
- subscribe to and recover recent FROST wallet-closure and
inactivity-claim events through cancellation-aware delivery; in-flight
log filters stop on unsubscribe
- confirm wallet closure and remove signer material against the wallet's
signing scheme
- make closure deduplication scheme-scoped, retryable after failures,
and safe when a replay arrives during active handling
- remove the obsolete eager ECDSA-only closure helper and align
local-chain FROST registration behavior with production

## Verification

- `go test ./pkg/tbtc ./pkg/chain/ethereum`
- `go test -tags=frost_native ./pkg/tbtc ./pkg/chain/ethereum`
- focused `-race` tests for wallet-closure deduplication and FROST
inactivity event delivery
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