mirror of
https://github.com/luxfi/coronad.git
synced 2026-10-30 16:59:09 +00:00
github.com/luxfi/coronad existed only as loose files: no .git, no history, no
remote. Invisible to any sweep that looks for a .git directory, and an rm -rf
would have destroyed it unrecoverably.
Includes two dependency repairs.
1. It did not build: "unknown revision v1.16.98" — the v1.16.x line was DELETED
from github.com/luxfi/geth. The requirement is baked into published modules
(crypto/constants/warp pin the dead tag, some also `exclude` the
alternative), so requiring crypto v1.20.2 / constants v1.6.2 / warp v1.24.1
is what escapes it.
2. Dropped two replace directives pointing at absolute paths on one disk:
replace github.com/luxfi/corona => /Users/z/work/lux/corona
replace github.com/luxfi/warp => /Users/z/work/lux/warp
Those would have made this module resolvable ONLY on this machine — CI or
any other checkout could never build it. They were also unnecessary: the
published versions the `require` lines already name (corona v0.10.4) build
and test clean without them.
Verified: go build ./... exits 0, go test ./... 1 ok / 0 fail.
The compiled coronad binary is ignored rather than committed.
NOTE: no remote — luxfi/coronad does not exist on GitHub. Still one copy.
40 lines
1.9 KiB
Go
40 lines
1.9 KiB
Go
// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package coronad
|
|
|
|
import "github.com/luxfi/corona/threshold"
|
|
|
|
// Transport is the committee round-transport: it carries the two broadcast
|
|
// rounds of the Corona signing protocol among the participating members. Each
|
|
// round is an all-gather — a member publishes its own message and receives the
|
|
// full set (its own included), blocking until every participant has published.
|
|
//
|
|
// The transport carries only PUBLIC protocol messages (Round1Data = masked
|
|
// commitments + MACs; Round2Data = z partials). It never carries a secret
|
|
// share — that is the structural reason the signing protocol is no-reconstruct.
|
|
//
|
|
// A Transport instance is SESSION-SCOPED: it is used for exactly one signing
|
|
// session (one Round1 all-gather followed by one Round2 all-gather). Build a
|
|
// fresh one per session via a TransportFactory.
|
|
type Transport interface {
|
|
// Round1 publishes self's Round1Data and returns the collected Round1Data
|
|
// from every participant, keyed by PartyID. Blocks until the full
|
|
// participant set has published, or returns a non-nil error if the session
|
|
// was aborted.
|
|
Round1(self int, out *threshold.Round1Data) (map[int]*threshold.Round1Data, error)
|
|
|
|
// Round2 is the symmetric all-gather for Round2Data.
|
|
Round2(self int, out *threshold.Round2Data) (map[int]*threshold.Round2Data, error)
|
|
|
|
// Abort tears the session transport down with err, releasing any members
|
|
// blocked in Round1/Round2 with that error. Idempotent. Called by the
|
|
// session when any member fails, so a single fault cannot deadlock the
|
|
// remaining members at a barrier.
|
|
Abort(err error)
|
|
}
|
|
|
|
// TransportFactory builds a fresh session-scoped Transport for the given
|
|
// participant set. Loopback is the in-process implementation.
|
|
type TransportFactory func(participants []int) Transport
|