Skip to content

Parse raw QC when receiving messages#405

Closed
yacovm wants to merge 1 commit into
mainfrom
config-aware-QC
Closed

Parse raw QC when receiving messages#405
yacovm wants to merge 1 commit into
mainfrom
config-aware-QC

Conversation

@yacovm

@yacovm yacovm commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

QuorumCertificates were carried around the network already parsed, which forced parsing to happen before a message reached the epoch.

Since a QC has an ability to verify its own signature, it implicitly means that a QC implementation needs knowledge of the public keys for the epoch the QC was created for.

To that end, we introduce a new type - RawQuorumCertificate, and corresponding types for message handling (RawNotarization, RawEmptyNotarization, RawNotarization, RawQuorumRound).

Message and ReplicationResponse now carry these on the wire, while Raw() helpers convert verified types to raw when sending/broadcasting

Parsing now happens on the receive path:

  • QCDeserializer gains ParseQuorumCertificate(RawQuorumCertificate); a new QCDeserializerCreator builds a deserializer per epoch from the node set (Node now carries its PK)
  • handleRaw{Notarization,EmptyNotarization,Finalization}Message parse the raw QC into a verified QC before delegating to the existing handlers; parse failures are logged and the message is dropped
  • RawQuorumRound.ToQuorumRound parses rounds in replication responses
  • Epoch holds a runtime qcDeserializer built via init()

This ensures that in order to verify a QC signature we need to know the node public keys that correspond to the QC.

QuorumCertificates were carried around the network already parsed, which
forced parsing to happen before a message reached the epoch.

Since a QC has an ability to verify its own signature, it implicitly means that a QC
implementation needs knowledge of the public keys for the epoch the QC was created for.

To that end, we introduce a new type - RawQuorumCertificate,
and corresponding types for message handling (RawNotarization, RawEmptyNotarization, RawNotarization, RawQuorumRound).

Message and ReplicationResponse now carry these on the wire, while Raw() helpers convert verified types to raw when sending/broadcasting

Parsing now happens on the receive path:
  - QCDeserializer gains ParseQuorumCertificate(RawQuorumCertificate); a new
    QCDeserializerCreator builds a deserializer per epoch from the node set
    (Node now carries its PK)
  - handleRaw{Notarization,EmptyNotarization,Finalization}Message parse the
    raw QC into a verified QC before delegating to the existing handlers;
    parse failures are logged and the message is dropped
  - RawQuorumRound.ToQuorumRound parses rounds in replication responses
  - Epoch holds a runtime qcDeserializer built via init()

This ensures that in order to verify a QC signature we need to know the node public keys that correspond to the QC.

Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant