mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
The compact group-key era was named for a place (Pulsar) when it is a generic value serving every threshold lane, scheme-qualified. Drop the Pulsar prefix and generalise the verifier so ONE type + ONE entry point covers both the Pulsar (FIPS-204 ML-DSA) and Corona (Ring-LWE Ringtail) lanes. Pure decomplect: same behaviour, value-not-place naming. - Type: PulsarKeyEra -> KeyEra (file pulsar_key_era.go -> key_era.go) - Field: MLDSAPubKey []byte -> GroupPubKey []byte (scheme-interpreted via SchemeID; not ML-DSA-specific). The unrelated Validator.MLDSAPubKey (*mldsa.PublicKey, a per-validator identity key) is left untouched. - Registry: PulsarKeyEraRegistry -> KeyEraRegistry (lane-agnostic; holds Pulsar and Corona eras alike), NewPulsarKeyEraRegistry -> NewKeyEraRegistry. Generalised verifier dispatch: - VerifyThresholdLeg(ev, M, era) is the ONE compact-threshold verify entry point. It resolves the era's lane through the suite registry (era.eraSuite, Pulsar|Corona only) and routes the group-signature check to that lane's boring verifier: pulsarwire.VerifyBytes for Pulsar, coronaThreshold.Verify for Corona (via new verifyCoronaGroupKeyLeg, which decodes the era's wire-byte group key and reuses verifyCoronaLeg). Both the era scheme and the evidence suite are resolved through the registry and must name the SAME lane + param set, so no suite string can reach the wrong verifier (reuses LookupSuite/resolveSuiteForLane lane safety). - VerifyPulsar is retained as a thin Pulsar-suite wrapper that refuses any non-Pulsar era at the door, then defers to VerifyThresholdLeg. Tests: existing boring-verifier + suite-dispatch-safety (VerifyPulsar) and dualpq tests hold unchanged; KeyEra registry test now proves lane-agnostic acceptance (corona era registers, non-threshold Beam refused); new TestCompact_VerifyThresholdLeg_CoronaLane proves a corona-suite era verifies via the corona path through the same KeyEra/dispatch with a real multi-node Ring-LWE signature, and that a pulsar suite can never reach the corona verifier. GOWORK=off go build ./... green; go test ./protocol/quasar/ green.