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.
47 lines
1.7 KiB
Go
47 lines
1.7 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"
|
|
|
|
"github.com/luxfi/lattice/v7/ring"
|
|
)
|
|
|
|
// Member is one committee member's signing identity: its 0-indexed committee
|
|
// position and its OWN secret key share. A Member never holds another member's
|
|
// secret share — this is the unit that makes the SigningSession no-reconstruct.
|
|
type Member struct {
|
|
index int
|
|
share *threshold.KeyShare
|
|
}
|
|
|
|
// Index is the member's 0-indexed committee position. The member's Shamir share
|
|
// lives at evaluation point Index+1 (corona's 1-indexed Shamir convention).
|
|
func (m *Member) Index() int { return m.index }
|
|
|
|
// sessionSigner builds a kernel Signer for this member for ONE session, with
|
|
// the supplied active-set Lagrange coefficient swapped in.
|
|
//
|
|
// The coefficient is PUBLIC (a Lagrange basis value over the participant set),
|
|
// not secret. The member's secret SkShare, pairwise Seeds and MACKeys are
|
|
// carried by reference into the per-session KeyShare and never leave the
|
|
// member; only the Lambda is replaced so the share reconstructs correctly for
|
|
// whatever t-of-n subset is actually signing. For the full committee this
|
|
// reproduces the coefficient keyera baked at Bootstrap.
|
|
//
|
|
// lambda MUST already be in NTT + Montgomery form (see lagrangeForSet) — the
|
|
// form the kernel's sign.Party expects for Lambda.
|
|
func (m *Member) sessionSigner(lambda ring.Poly) *threshold.Signer {
|
|
sessionShare := &threshold.KeyShare{
|
|
Index: m.share.Index,
|
|
SkShare: m.share.SkShare,
|
|
Seeds: m.share.Seeds,
|
|
MACKeys: m.share.MACKeys,
|
|
Lambda: lambda,
|
|
GroupKey: m.share.GroupKey,
|
|
}
|
|
return threshold.NewSigner(sessionShare)
|
|
}
|