Files
Hanzo AI 9bce6722b4 threshold: Pulsar/Lens kernel adapters + corona KAT + Pulsar-SHA3 wiring
Squashed batch covering:

- protocols/pulsar/: lattice threshold lane (round-based wrapper for
  github.com/luxfi/pulsar kernel); doc.go documents Photon/Lumen/Beam/
  Pulsar/Pulse/Prism/Horizon/Quasar vocabulary stack from LP-105
- protocols/lens/: planned curve threshold sister kernel (design
  intent only; mirrors Pulsar shape; replaces stub LSS-FROST)

- protocols/lss/lss_pulsar.go + tests: LSS-Pulsar adapter
  (DynamicResharePulsar + PulsarSnapshotManager + BuildActivationTranscript).
  Now SHA3-suite-aware: PulsarConfig carries NebulaRoot, HashSuiteID,
  ImplementationVersion as optional transcript-binding fields that
  flow through to the activation message.

  10/10 acceptance tests pass:
    1. GroupKey preservation
    2. KeyEraID preservation
    3. Generation +1
    4. RollbackFrom=0 on forward
    5. t_old != t_new
    6. Disjoint set rotation
    7. Valid signature under unchanged GroupKey
    8. Pairwise material regenerated
    9. Rollback semantics
   10. Error surface
  Plus 1 new test for BuildActivationTranscript Nebula+suite fields.

- protocols/lss/lss_frost.go: marked DEPRECATED (placeholder Sign()/
  Refresh(), single-process simulation, hardcoded ChainKey/RID); will
  be replaced by lss_lens.go.

- corona KAT cross-oracle vs Go reference (N=16 deterministic seeds)
- corona+protocol+harness hardening against parallel-run flakes
- lss/adapters: drop NewXRPL/NewCardano panic; ship real XRPL address
  derivation
- corona SignWithConfig API expansion + test fixes
- v1.6.5 changelog
- go.sum h1 hashes for luxfi/log and 4 deps

Architecture (LP-105 / pulsar/DESIGN.md):
  LSS owns lifecycle (Generation, Rollback, snapshots, dealer/
  coordinator role separation). Pulsar owns lattice math (R_q shares,
  lattice Pedersen commits, Sign1/Sign2/Combine, Pulsar-SHA3 hash
  profile). The lss_pulsar adapter wires them. lss_lens (planned) does
  the same for curve math.

go.mod adds local replace github.com/luxfi/pulsar => ../pulsar.
2026-03-03 12:00:00 -08:00

160 lines
3.4 KiB
YAML

run:
timeout: 5m
tests: true
# Cache bust: 2025-08-15
# Pin lint target to Go 1.24 so the analyser (built against Go 1.24 in
# golangci-lint v1.64.x) does not bail out on go.mod's 1.26.1 directive.
# Remove once golangci-lint ships a Go 1.26 binary and we can migrate to v2.
go: "1.24"
linters:
enable:
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
disable:
- funlen
- gochecknoglobals
- errcheck # Will enable once core issues are fixed
- gocognit
- godox
- prealloc
linters-settings:
depguard:
rules:
main:
deny:
- pkg: "github.com/sirupsen/logrus"
desc: "Use standard library log package"
dupl:
threshold: 100
errcheck:
check-type-assertions: true
check-blank: true
exhaustive:
default-signifies-exhaustive: false
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
gocyclo:
min-complexity: 25 # Increased for complex CLI functions
goimports:
local-prefixes: github.com/lux/threshold
govet:
enable-all: true
# Removed check-shadowing as it's deprecated
disable:
- fieldalignment # Not critical for our use case
lll:
line-length: 140
misspell:
locale: US
nolintlint:
# Removed allow-leading-space as it's deprecated
allow-unused: false
require-explanation: false
require-specific: false
revive:
confidence: 0
rules:
- name: context-as-argument
severity: error
disabled: false
- name: context-keys-type
severity: warning
disabled: false
- name: time-equal
severity: warning
disabled: false
gosec:
excludes:
- G104 # Ignore error checking for some cases
- G115 # Integer overflow (controlled conversions in cryptographic operations)
- G304 # File path provided by user
- G401 # Use of weak cryptographic primitive (specific crypto for threshold schemes)
- G501 # Weak crypto (same reason)
- G502 # Weak crypto (same reason)
issues:
exclude-dirs:
- example
exclude-rules:
- path: _test\.go
linters:
- dupl
- gosec
- path: internal/
linters:
- stylecheck # Internal packages don't need package comments
- gocritic # Minor style issues in internal packages
- errcheck # Internal crypto operations with safe error handling
- path: cmd/threshold-cli/
linters:
- dupl # Intentional duplication between benchmarks and tests
- gocyclo # Complex CLI functions
- goconst # Many string constants used once
- unparam # Some protocol functions have unused params for interface compliance
- path: pkg/math/
text: "magic number"
- path: pkg/zk/
text: "magic number"
- path: protocols/
text: "magic number"
- path: cmd/
linters:
- gochecknoinits
- linters:
- lll
source: "^//go:generate "
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
new: false
output:
formats:
- format: colored-line-number
print-issued-lines: true
print-linter-name: true
sort-results: true