Conversation
samliok
approved these changes
Jun 15, 2026
| return nodes | ||
| } | ||
|
|
||
| // Node is a struct that pairs a node with its weight in the signature aggregator. |
Collaborator
There was a problem hiding this comment.
this common is out of date now
| } | ||
|
|
||
| func VerifyQC(qc common.QuorumCertificate, logger common.Logger, messageType string, isQuorum func(signers []common.NodeID) bool, eligibleSigners map[string]struct{}, messageToVerify verifiableMessage, from common.NodeID) error { | ||
| func VerifyQC(qc common.QuorumCertificate, logger common.Logger, messageType string, isQuorum func(signers []common.NodeID) bool, eligibleSigners map[string]struct{}, messageToVerify verifiableMessage, from common.NodeID, nodes common.Nodes) error { |
Collaborator
There was a problem hiding this comment.
maybe for a separate pr we can remove the params logger, messageType, and from for verifyQC? We still return an error, so we can just log it at the call site.
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.
Instead of wiring the public keys of the epoch to the QC, the QuorumCertificate.Verify() now receives the set of nodes so the verifier has access to validator membership (and their public keys) when checking a quorum certificate.
The nodes argument is threaded through verifyContextQC, the Finalization/Notarization/EmptyNotarization Verify() methods, the verifiableMessage interface, and VerifyQC, with
e.nodes supplied at every call site in epoch.go.
To support this, common.Node is reworked:
- rename the Node.Node field to Node.Id to disambiguate it from the
surrounding type
- add a PK []byte field to carry each node's public key
Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Instead of wiring the public keys of the epoch to the QC, the QuorumCertificate.Verify() now receives the set of nodes so the verifier has access to validator membership (and their public keys) when checking a quorum certificate. The nodes argument is threaded through verifyContextQC, the Finalization/Notarization/EmptyNotarization Verify() methods, the verifiableMessage interface, and VerifyQC, with e.nodes supplied at every call site in epoch.go.
To support this, common.Node is reworked: