Draft: FROST/XMR keygen presence, tx-verify, and keygen-failure reporting
⛔ Blocked by: sidecar FrostTxExists/FrostVaultOutputs port. The production sidecarFrostAdapterdoes not yet implementFrostTxExists/FrostVaultOutputs, so prod FROST keysign skips tx-existence and vault-output verification (accessed via optional type-assert). Those methods needAllOutputsContext/TxExistsContext+ theOutputstypes and a ctx GET helper, which live in the heavily-diverged monero/sidecar subsystem — to be folded with the C6/monero-sidecar work. Do NOT merge until that port lands (huginn threads [4][5] kept open).
Parity cluster (stacked on the refund-funding branch). Brings the bifrost/go-tss FROST and XMR keygen work forward. The bulk is a faithful port of code already running on mainnet; the only hand-written parts are the reconciliation seams below.
What this ports
- FROST DKG presence announcement (
frost_keygen_presence.go, new p2p message type + per-peer admission limit). - Scheduled XMR tx verification (
frost_tx_verify.go). - XMR keygen-failure reporting: admission-absence recording, retained terminal failure reported inside the result window, failure-report broadcast gating (
keygen_xmr_failure.go,keygen_retry.go, signer wiring insign.go). - Keysign panic recovery in the ecdsa/eddsa batch-signing goroutines.
common.XMRAddressPublicKeyshelper;CustomKeygenResult.AbsentMembers;HaltKeygenFailureReportingmimir string only.
Reconciliation seams (reviewers please check)
This branch sits on top of develop work that post-dates the shipped source, so three areas were hand-merged rather than taken verbatim. @zlyzol — the first one touches your keygen-recovery sim:
frost_keygen.go: kept the xmr-keygen-recovery simulation hunks (comment + the test-only round-3 timeout log) on top of the shipped DKG rework, instead of the older jail-sim wording.keygen_retry.go: keptkeygenCurrentHeightreading the uncached THORChain height; did not revert it to the cached getter the shipped source used.sign.go: kept the public keysign-error-keep branches (ErrTxPending/ErrNotSelectedForKeysignretain-pending) and theblockHeight = max(blockHeight, height)signing-halt guard; only the XMR-keygen-failure hunks were taken. Leader rotation (keysign_leader_rotation.go,keysign.go) is left untouched.
Deliberately excluded (needs its own decision)
The shipped source also gates a THORNode-side keygen-failure penalty skip on the HaltKeygenFailureReporting mimir (a consensus handler). That consensus change is not in this MR — only the bifrost arm (the mimir string + the signer's own report gating) is here. The consensus arm belongs in a separate, non-stacked change.
Known inherited red
bifrost/p2p test compile is currently broken on the parity stack because MockThorchainBridge lacks GetObservedTxVoterUncached (introduced upstream in the stack, not here). Tracking separately; not caused by this branch.
Builds clean mainnet+mocknet; go vet clean on signer and go-tss/tss; gofumpt clean.