bls

package
v1.7.11 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SrStartRound defines ID of Subround "Start round"
	SrStartRound = iota
	// SrBlock defines ID of Subround "block"
	SrBlock
	// SrSignature defines ID of Subround "signature"
	SrSignature
	// SrEndRound defines ID of Subround "End round"
	SrEndRound
)
View Source
const (
	// MtUnknown defines ID of a message that has unknown data inside
	MtUnknown consensus.MessageType = iota
	// MtBlockBodyAndHeader defines ID of a message that has a block body and a block header inside
	MtBlockBodyAndHeader
	// MtBlockBody defines ID of a message that has a block body inside
	MtBlockBody
	// MtBlockHeader defines ID of a message that has a block header inside
	MtBlockHeader
	// MtSignature defines ID of a message that has a Signature inside
	MtSignature
	// MtBlockHeaderFinalInfo defines ID of a message that has a block header final info inside
	// (aggregate signature, bitmap and seal leader signature for the proposed and accepted header)
	MtBlockHeaderFinalInfo
	// MtInvalidSigners defines ID of a message that has a invalid signers p2p messages inside
	MtInvalidSigners
)
View Source
const (
	// BlockBodyAndHeaderStringValue represents the string to be used to identify a block body and a block header
	BlockBodyAndHeaderStringValue = "(BLOCK_BODY_AND_HEADER)"

	// BlockBodyStringValue represents the string to be used to identify a block body
	BlockBodyStringValue = "(BLOCK_BODY)"

	// BlockHeaderStringValue represents the string to be used to identify a block header
	BlockHeaderStringValue = "(BLOCK_HEADER)"

	// BlockSignatureStringValue represents the string to be used to identify a block's signature
	BlockSignatureStringValue = "(SIGNATURE)"

	// BlockHeaderFinalInfoStringValue represents the string to be used to identify a block's header final info
	BlockHeaderFinalInfoStringValue = "(FINAL_INFO)"

	// BlockUnknownStringValue represents the string to be used to identify an unknown block
	BlockUnknownStringValue = "(UNKNOWN)"

	// BlockDefaultStringValue represents the message to identify a message that is undefined
	BlockDefaultStringValue = "Undefined message type"
)

Variables

View Source
var ErrNilSentSignatureTracker = errors.New("nil sent signature tracker")

ErrNilSentSignatureTracker defines the error for setting a nil SentSignatureTracker

Functions

func NewConsensusService

func NewConsensusService() (*worker, error)

NewConsensusService creates a new worker object

func NewSubroundBlock

func NewSubroundBlock(
	baseSubround *spos.Subround,
	extend func(subroundId int),
	processingThresholdPercentage int,
) (*subroundBlock, error)

NewSubroundBlock creates a subroundBlock object

func NewSubroundEndRound

func NewSubroundEndRound(
	baseSubround *spos.Subround,
	extend func(subroundId int),
	processingThresholdPercentage int,
	displayStatistics func(),
	appStatusHandler core.AppStatusHandler,
	sentSignatureTracker spos.SentSignaturesTracker,
) (*subroundEndRound, error)

NewSubroundEndRound creates a subroundEndRound object

func NewSubroundSignature

func NewSubroundSignature(
	baseSubround *spos.Subround,
	extend func(subroundId int),
	appStatusHandler core.AppStatusHandler,
	sentSignatureTracker spos.SentSignaturesTracker,
) (*subroundSignature, error)

NewSubroundSignature creates a subroundSignature object

func NewSubroundStartRound

func NewSubroundStartRound(
	baseSubround *spos.Subround,
	extend func(subroundId int),
	processingThresholdPercentage int,
	executeStoredMessages func(),
	resetConsensusMessages func(),
	sentSignatureTracker spos.SentSignaturesTracker,
) (*subroundStartRound, error)

NewSubroundStartRound creates a subroundStartRound object

func NewSubroundsFactory

func NewSubroundsFactory(
	consensusDataContainer spos.ConsensusCoreHandler,
	consensusState *spos.ConsensusState,
	worker spos.WorkerHandler,
	chainID []byte,
	currentPid core.PeerID,
	appStatusHandler core.AppStatusHandler,
	sentSignaturesTracker spos.SentSignaturesTracker,
) (*factory, error)

NewSubroundsFactory creates a new consensusState object

Types

This section is empty.

Jump to

Keyboard shortcuts

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