leanhelixconsensus

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const LH_PREFIX = "=LH= "

Variables

View Source
var LogTag = log.Service("consensus-algo-lean-helix")
View Source
var TIMEOUT_EXP_BASE = float64(2.0) // Modifying this value from 2.0 will affect its unit tests which are time-based

Functions

func CalcInstanceId added in v0.7.11

func CreateResultsBlockProof added in v0.7.11

func CreateResultsBlockProof(blockPair *protocol.BlockPairContainer, blockProof []byte) *protocol.ResultsBlockProof

func CreateTransactionBlockProof added in v0.7.11

func CreateTransactionBlockProof(blockPair *protocol.BlockPairContainer, blockProof []byte) *protocol.TransactionsBlockProof

func ExtractBlockProof added in v0.7.11

func ExtractBlockProof(blockPair *protocol.BlockPairContainer) (primitives.LeanHelixBlockProof, error)

func FromLeanHelixBlock added in v0.7.11

func FromLeanHelixBlock(lhBlock lh.Block) *protocol.BlockPairContainer

func NewBlockProvider

func NewBlockProvider(
	logger log.BasicLogger,
	blockStorage services.BlockStorage,
	consensusContext services.ConsensusContext) *blockProvider

func NewCommunication added in v0.7.1

func NewCommunication(logger log.BasicLogger, gossip gossiptopics.LeanHelix) *communication

func NewExponentialBackoffElectionTrigger added in v0.7.11

func NewExponentialBackoffElectionTrigger(logger log.BasicLogger, minTimeout time.Duration, onElectionCB func(m lhmetrics.ElectionMetrics)) lh.ElectionTrigger

func NewKeyManager

func NewKeyManager(logger log.BasicLogger, privateKey primitives.EcdsaSecp256K1PrivateKey) *keyManager

func NewLeanHelixConsensusAlgo

func NewLeanHelixConsensusAlgo(
	parentContext context.Context,
	gossip gossiptopics.LeanHelix,
	blockStorage services.BlockStorage,
	consensusContext services.ConsensusContext,
	parentLogger log.BasicLogger,
	config config.LeanHelixConsensusConfig,
	metricFactory metric.Factory,

) services.ConsensusAlgoLeanHelix

func NewLoggerWrapper added in v0.7.1

func NewLoggerWrapper(log log.BasicLogger, showDebug bool) *loggerWrapper

func NewMembership added in v0.7.1

func NewMembership(logger log.BasicLogger, memberId primitives.NodeAddress, consensusContext services.ConsensusContext, maxCommitteeSize uint32) *membership

func ToLeanHelixBlock added in v0.7.11

func ToLeanHelixBlock(blockPair *protocol.BlockPairContainer) lh.Block

Types

type BlockPairWrapper

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

func (*BlockPairWrapper) Height

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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