consensus

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBlockCertificationRequest

func CheckBlockCertificationRequest(req CertRequestVerifier, luc *types.UnicityCertificate) error

Types

type CertReqReason

type CertReqReason uint8
const (
	Quorum CertReqReason = iota
	QuorumNotPossible
)

type CertRequestVerifier

type CertRequestVerifier interface {
	IRRound() uint64
	IRPreviousHash() []byte
	RootRound() uint64
}

type IRChangeRequest

type IRChangeRequest struct {
	Partition types.SystemID
	Shard     types.ShardID
	Reason    CertReqReason
	Requests  []*certification.BlockCertificationRequest
	Technical certification.TechnicalRecord
}

type Option

type Option func(c *Optional)

func WithStorage

func WithStorage(db keyvaluedb.KeyValueDB) Option

type Optional

type Optional struct {
	Storage keyvaluedb.KeyValueDB
}

Optional are common optional parameters for consensus managers

func LoadConf

func LoadConf(opts []Option) (*Optional, error)

type Parameters

type Parameters struct {
	BlockRate          time.Duration // also known as T3
	LocalTimeout       time.Duration
	ConsensusThreshold uint32
	HashAlgorithm      gocrypto.Hash
}

Parameters are basic consensus parameters that need to be the same in all root validators. Extracted from root genesis where all validators in the root cluster must have signed them to signal agreement

func NewConsensusParams

func NewConsensusParams(genesisRoot *genesis.GenesisRootRecord) *Parameters

NewConsensusParams extract common consensus parameters from genesis

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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