Files
threshold/e2e/doc.go
zeekay 702bad4a4a threshold: ringtail→corona sweep (canonicalize naming per 2026-06 audit)
Sweep the residual "ringtail" name to "corona" across the e2e
validation harness and threshold-dispatcher docs, finishing the
cross-repo follow-up to luxfi/corona AUDIT-2026-06.md §4.3.

Touched files:
- e2e/doc.go, e2e/production_validation_test.go: rename `ringtail`
  scheme-name string + import alias `ringtailKernel`→`coronaKernel`;
  align all narrative comments + the report-printer with the
  canonical Corona name. The previous string `"ringtail"` would have
  silently routed into KeygenError when calling the dispatcher's
  JSON-RPC since the scheme map was renamed to `"corona"` at HEAD.
- pkg/thresholdd/server.go: add `schemeAliases` + `canonicalScheme`
  helper, and consult it once at the dispatch entry in `ServeHTTP`.
  Inbound `ringtail.<op>` requests now silently route into the
  `corona` handler so external callers (mpcd in production, teleport
  test rigs, anything still on the legacy wire name) keep working
  through the migration window. Documentation in NewServer's doc
  comment names the alias and points at the deprecation note.
- pkg/thresholdd/thresholdd_test.go: TestCoronaRingtailWireAlias
  pins the alias behavior end-to-end (1-of-2 round-trip through the
  legacy `ringtail.{keygen,sign,verify}` namespace).
- LLM.md: document the alias in the per-scheme status table.

Wire compat: the JSON-RPC method namespace IS a wire-format string,
so the on-read alias is mandatory until callers migrate. Emit
`"corona"` on all new clients; remove the entry in schemeAliases
once external callers have moved.

Verified:
- go build ./... clean (CGO_CFLAGS=-I../accel/internal/capi/include
  -I$LUXCPP_PREFIX/include — vendored accel header has the fresh
  symbols missing from /opt/homebrew/include/lux/accel/c_api.h; this
  is a luxcpp packaging tail unrelated to this change).
- go vet ./... clean.
- gofmt -l . clean.
- go test -count=1 -short -timeout 600s ./... PASS (61/61 ok, 0
  FAIL). Highlights:
  - pkg/thresholdd 85.6s — TestCoronaRoundTrip +
    TestCoronaRingtailWireAlias both PASS; full scheme matrix
    (cggmp21, frost, pulsar, magnetar, bls) unaffected.
  - e2e 12.3s — TestProductionValidation_All round-trips
    pulsar (FIPS 204 external-verify) + magnetar (FIPS 205
    external-verify) + corona (out-of-band Corona kernel verify
    via luxfi/corona/threshold.VerifyBytes); negative controls
    reject tampered sigs on all three.

Out of scope (flagged for follow-up):
- luxfi/node vms/platformvm/warp/{signature,wire/*}.go still carry
  RingtailSignature/SigRingtail Go types — wire-format type rename,
  separate audit / migration.
- luxfi/node docs/out/**.html — generated doc artifacts; do not
  hand-edit, regen from upstream docs source.
- lux-private/gpu-kernels/ops/mpcvm/*/mpcvm_ringtail.* + ops/crypto/
  ringtail/ — sister-repo kernel rename owned by lux-private agent.

Companion: luxfi/node Dockerfile.multichain `-tags ringtail` →
`-tags corona` committed separately on that repo's working branch.
2026-06-03 12:28:31 -07:00

51 lines
2.2 KiB
Go

// SPDX-License-Identifier: BSD-3-Clause
// Package e2e is the production-validation harness for the PQ threshold
// custody flow against the live testnet luxd cluster.
//
// What this package does
//
// - Drives the in-process pulsar / corona / magnetar dispatchers from
// pkg/thresholdd over the JSON-RPC HTTP surface. Same code path
// that mpcd hosts in production.
//
// - Times every step with wall-clock deltas from time.Now().
//
// - Strips the PULS / MAGS wire envelopes to recover the FIPS 204 /
// FIPS 205 payload bytes, and feeds them to
// cloudflare/circl/sign/{mldsa/mldsa65, slhdsa} verifiers with no
// pulsar / magnetar code path on the verifier side.
//
// - Submits a real C-Chain native-token transfer against the live
// Lux testnet luxd RPC and waits for inclusion in a block. This
// is the chain-liveness gate that proves the production cluster
// accepts and finalises transactions while the PQ harness runs.
//
// - Records every measurement (keygen_ns, sign_ns, sig_bytes,
// external_verify_ok, block_height, tx_hash) and prints a report
// readable by PRODUCTION-VALIDATION-2026-05-31.md.
//
// What it does NOT do
//
// - Does NOT exercise the on-chain ML-DSA / SLH-DSA precompiles
// (slots 0x012202 / 0x012203). Those precompiles call
// VerifySignatureCtx with precompileCtx = "lux-evm-precompile-{mldsa,
// slhdsa}-v1"; the dispatcher's Sign API does not bind that ctx,
// so a dispatcher-produced signature deliberately would NOT verify
// under the precompile. That is a separate ctx-binding test (the
// dispatcher would need a Sign_Ctx method that takes the EVM
// precompile ctx — out of scope for this validation pass).
//
// - Does NOT exercise the corona-on-chain path (no FIPS standard for
// R-LWE; corona's external verifier is the Corona kernel
// VerifyBytes invoked outside any threshold/luxd code path).
//
// Run
//
// go test ./e2e -run TestProductionValidation_All -v -count=1 -timeout=10m
//
// The harness is hard-coded against the public Lux testnet
// LoadBalancer (134.199.187.16:9640). Run from a host with network
// reach to that IP.
package e2e