certchain

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Overview

certchain package is a testing utility for generating and validating finality certificates. It has no effect on the consensus protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertChain

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

func New

func New(o ...Option) (*CertChain, error)

func (*CertChain) Generate

func (cc *CertChain) Generate(ctx context.Context, length uint64) ([]*certs.FinalityCertificate, error)

func (*CertChain) GetCommittee

func (cc *CertChain) GetCommittee(ctx context.Context, instance uint64) (*gpbft.Committee, error)

func (*CertChain) GetProposal

func (cc *CertChain) GetProposal(ctx context.Context, instance uint64) (*gpbft.SupplementalData, *gpbft.ECChain, error)

func (*CertChain) Validate

func (cc *CertChain) Validate(ctx context.Context, crts []*certs.FinalityCertificate) error

type FinalityCertificateProvider

type FinalityCertificateProvider func(context.Context, uint64) (*certs.FinalityCertificate, error)

type Option

type Option func(*options) error

func WithEC

func WithEC(ec ec.Backend) Option

func WithManifest

func WithManifest(m manifest.Manifest) Option

func WithSeed

func WithSeed(seed int64) Option

func WithSignVerifier

func WithSignVerifier(sv SignVerifier) Option

type SignVerifier

type SignVerifier interface {
	gpbft.Signer
	gpbft.Verifier
}

Jump to

Keyboard shortcuts

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