bifrost/p2p: move TSS round constants to a leaf package so x/thorchain/memo builds without tss-lib-private
🔎 Visual review of823c3434: explainer, review flags and prompts to ask an AI about the change
Why
x/thorchain/types imports bifrost/p2p/messages only for the TSS round-name constants in tss_round_normalizer.go. messages also imports tss-lib-private (for WireMessage.Routing), so every package above types, including x/thorchain/memo, transitively depends on a module that is not public.
That blocks outside fuzzing and verification tools from building the memo parser. The trigger is enrolling THORNode in OSS Verify (Theorem's formal verification of fuzz targets, as described in Anthropic's formal verification post). OSS Verify clones the repo and fetches modules anonymously, and tss-lib-private returns 404 to anonymous requests. FuzzParseMemo is the most valuable target and can't be built today.
What
- Move
bifrost/p2p/messages/TssPhaseMessages.gounchanged into a new leaf package,bifrost/p2p/tssrounds, which imports nothing. The const block is kept as it is, so theiotavalues ofAlgodon't move. messageskeeps type and const aliases and the sameValidTssKeysignRoundsmap, so no Bifrost call site changes.x/thorchain/types(normalizer and two tests) importstssroundsinstead ofmessages.- The FROST-evidence test stays in
messages, becauseFrostBlameRound*lives there. - New
x/thorchain/memo/memo_deps_test.gofails iftss-libcomes back into the memo parser's imports.
Risk: low
There's no behavior change: the constant values and the map contents are identical. x/thorchain/types is consensus code, but only the import path changes. There are no state, proto, gas or event changes, so no migration or regression fixtures are involved.
Verification
go list -deps ./x/thorchain/memo ./x/thorchain/types | grep tss-lib-privatereturns nothing (it found 2 ondevelop).memo_deps_test.gopasses on this branch and fails ondevelop.make lintis clean.go vet -tags=mocknet ./...reports no compile errors.go test -tags=mocknetpasses for./bifrost/p2p/...,./bifrost/tss/...,./x/thorchain/types/...,./x/thorchain/memo/...and./x/thorchain.- The memo parser fuzz target, built from this commit inside OSS Verify's Go toolchain image (Go 1.27.1, static riscv64,
-trimpath, empty module cache, no credentials), builds and exits 0 on all 40 seed memos underqemu-riscv64.