Files
zeekayandHanzo Dev 9fb1642e1f fix: follow warp v1.24 folding UnsignedMessage into Message
This module would not build against the warp it resolves. warp v1.24 removed the
UnsignedMessage / Message split, and the rename is a rotation, not a substitution
— every name shifted one place along:

  UnsignedMessage       -> Message       (the signed subject)
  NewUnsignedMessage    -> NewMessage
  ParseUnsignedMessage  -> ParseMessage
  Message               -> Envelope      (subject + lanes)
  NewMessage            -> NewEnvelope
  ParseMessage          -> ParseEnvelope
  VerifyMessage         -> VerifyEnvelope
  .UnsignedMessage      -> .Message
  .Signature            -> .Beam

Applying it in the obvious order silently conflates the two Message meanings, so
the rewrite goes through placeholders.

The fold is a security fix upstream, not cosmetic: Message now carries the Pulsar
lineage (SourceNebulaRoot, SourceKeyEraID, SourceGeneration, HashSuiteID) inside
the signed subject. Under the old split the BLS Beam signed only the unsigned
body and that lineage was Beam-unauthenticated.

VerifyEnvelope takes the same five arguments VerifyMessage did and is documented
as the canonical classical path, so verification semantics are unchanged here.
VerifyWithOptions is the opt-in door to the Corona and ML-DSA lanes; nothing in
this module opts in, so no PQ policy is decided by this commit.

Two shape changes fall out of Envelope holding concrete lanes:
  - Beam is a BitSetSignature value, not an interface, so the signer-count
    type-assertion in the gas path is unreachable and its unknown-signature-type
    branch is gone. A parsed envelope always has a Beam to count.
  - Envelope.Bytes reports c14n failures instead of panicking, so the RPC path
    surfaces that error rather than returning a truncated message.

NewEnvelope also takes the Corona and ML-DSA cert-set lanes; the test aggregator
is Beam-only and passes nil for both.

Builds clean, go vet clean, warp + precompile + aggregator suites pass.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 19:21:10 -07:00
..