Files
zeekay 4e6885fbe8 chore: initial commit — tree had no git at all
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.
2026-07-26 05:22:22 -07:00

45 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 "errors"
// Sentinel errors. They are wrapped with %w throughout so callers can match
// with errors.Is and fail closed.
var (
// ErrUninitializedEra is returned when an Era has no GroupKey / share
// state — i.e. it was not produced by Bootstrap.
ErrUninitializedEra = errors.New("coronad: era is uninitialized")
// ErrInsufficientParticipants is returned when fewer than the era's
// threshold t members are asked to sign. The corona protocol cannot
// produce a verifying signature below t.
ErrInsufficientParticipants = errors.New("coronad: fewer participants than threshold")
// ErrBadParticipants is returned when the participant set is malformed:
// out-of-range index, duplicate, or empty.
ErrBadParticipants = errors.New("coronad: invalid participant set")
// ErrUnknownMember is returned when a committee position has no share in
// the era's state.
ErrUnknownMember = errors.New("coronad: unknown committee member")
// ErrNoSignature is returned when a signing session completed without the
// combiner producing a signature (should be unreachable on the success
// path; present as a fail-closed guard).
ErrNoSignature = errors.New("coronad: session produced no signature")
// ErrSelfVerifyFailed is the fail-closed gate: coronad NEVER emits
// evidence whose signature does not verify under the era's group key.
ErrSelfVerifyFailed = errors.New("coronad: self-verify failed; refusing to emit evidence")
// ErrTransportAborted is returned by Transport round calls after the
// session aborted (e.g. a member failed Round1/Round2).
ErrTransportAborted = errors.New("coronad: transport aborted")
// ErrBadSubject is returned when ThresholdSign is given a subject that is
// not a 32-byte finality digest.
ErrBadSubject = errors.New("coronad: subject must be a 32-byte digest")
)