Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSignatureAggregationJob ¶
func NewSignatureAggregationJob( client SignatureBackend, height uint64, subnetID ids.ID, quorumNum uint64, cancelQuorumNum uint64, quorumDen uint64, state validators.State, msg *avalancheWarp.UnsignedMessage, ) *signatureAggregationJob
Types ¶
type AggregateSignatureResult ¶
type AggregateSignatureResult struct {
SignatureWeight uint64
TotalWeight uint64
Message *avalancheWarp.Message
}
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
func NewAggregator ¶
func NewAggregator(subnetID ids.ID, state validators.State, client SignatureBackend) *Aggregator
func (*Aggregator) AggregateSignatures ¶
func (a *Aggregator) AggregateSignatures(ctx context.Context, unsignedMessage *avalancheWarp.UnsignedMessage, quorumNum uint64) (*AggregateSignatureResult, error)
type NetworkClient ¶
type NetworkSigner ¶
type NetworkSigner struct {
Client NetworkClient
}
networkSigner fetches warp signatures on behalf of the aggregator using VM App-Specific Messaging
func (*NetworkSigner) FetchWarpSignature ¶
func (s *NetworkSigner) FetchWarpSignature(ctx context.Context, nodeID ids.NodeID, unsignedWarpMessage *avalancheWarp.UnsignedMessage) (*bls.Signature, error)
FetchWarpSignature attempts to fetch a BLS Signature of [unsignedWarpMessage] from [nodeID] until it succeeds or receives an invalid response
Note: the caller should ensure that [ctx] is properly cancelled once the result is no longer needed from this call.
type SignatureBackend ¶
type SignatureBackend interface {
// FetchWarpSignature attempts to fetch a BLS Signature from [nodeID] for [unsignedWarpMessage]
FetchWarpSignature(ctx context.Context, nodeID ids.NodeID, unsignedWarpMessage *avalancheWarp.UnsignedMessage) (*bls.Signature, error)
}
SignatureBackend defines the minimum network interface to perform signature aggregation
Click to show internal directories.
Click to hide internal directories.