consensus_utils

package module
v2.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Overview

Package consensus_utils is consensus utils

Index

Constants

View Source
const (
	KeySigAlgo           = "MaxbftSigAlgo"
	KeyCheckVoteInSingle = "MaxbftCheckVoteInSingle"
)

MaxBFT signature algorithm

View Source
const (
	ECDSAAlgo                = "ecdsa"
	ThresholdAlgo            = "threshold"
	DefaultCheckVoteInSingle = true
)

Threshold algorithm

Variables

This section is empty.

Functions

func InitWalService

func InitWalService(config *config.ConsensusConfig, chainID, nodeID string) (wal_service.WalService, error)

InitWalService init wal service

func InitWalServiceByMarshalFunc

func InitWalServiceByMarshalFunc(config *config.ConsensusConfig, chainID, nodeID string,
	marshalFunc wal_service.MarshalFunc) (wal_service.WalService, error)

InitWalServiceByMarshalFunc init wal service use marshal functions

Types

type ConsensusImplConfig

type ConsensusImplConfig struct {
	ChainId           string
	NodeId            string
	Ac                protocol.AccessControlProvider
	Core              protocol.CoreEngine
	Store             protocol.BlockchainStore
	Sync              protocol.SyncService
	MsgBus            msgbus.MessageBus
	Signer            protocol.SigningMember
	ChainConf         protocol.ChainConf
	NetService        protocol.NetService
	LedgerCache       protocol.LedgerCache
	ProposalCache     protocol.ProposalCache
	Logger            protocol.Logger
	Manager           protocol.SnapshotManager
	SigAlgoInVote     string
	CheckVoteInSingle bool
}

ConsensusImplConfig is consensus config to init consensus engine

type ValidatorListFunc

type ValidatorListFunc func(chainConfig *config.ChainConfig,
	store protocol.BlockchainStore) (validators []string, err error)

ValidatorListFunc load validator list by chain config and blockchain store

Directories

Path Synopsis
Package consistent_service is consistent service for consensus engine
Package consistent_service is consistent service for consensus engine
Package testframework is consensus test framework
Package testframework is consensus test framework
net

Jump to

Keyboard shortcuts

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