simplex

package
v1.13.4-lux.18-chain Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QC

type QC struct {
	// contains filtered or unexported fields
}

QC represents a quorum certificate in the Simplex consensus protocol.

func (*QC) Bytes

func (qc *QC) Bytes() []byte

Bytes serializes the quorum certificate into bytes.

func (*QC) Signers

func (qc *QC) Signers() []simplex.NodeID

Signers returns the list of signers for the quorum certificate.

func (*QC) Verify

func (qc *QC) Verify(msg []byte) error

Verify checks if the quorum certificate is valid by verifying the aggregated signature against the signers' public keys.

type QCDeserializer

type QCDeserializer struct {
	// contains filtered or unexported fields
}

func (*QCDeserializer) DeserializeQuorumCertificate

func (d *QCDeserializer) DeserializeQuorumCertificate(bytes []byte) (simplex.QuorumCertificate, error)

DeserializeQuorumCertificate deserializes a quorum certificate from bytes.

type SignatureAggregator

type SignatureAggregator struct {
	// contains filtered or unexported fields
}

SignatureAggregator aggregates signatures into a quorum certificate.

func (*SignatureAggregator) Aggregate

func (a *SignatureAggregator) Aggregate(signatures []simplex.Signature) (simplex.QuorumCertificate, error)

Aggregate aggregates the provided signatures into a quorum certificate. It requires at least a quorum of signatures to succeed. If any signature is from a signer not in the membership set, it returns an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL