leanhelixconsensus

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const LH_PREFIX = "<LH> "

Variables

View Source
var LogTag = log.Service("consensus-algo-lean-helix")

Functions

func CalculateNewBlockTimestamp added in v0.7.1

func CalculateNewBlockTimestamp(prevBlockTimestamp primitives.TimestampNano, now primitives.TimestampNano) primitives.TimestampNano

func NewBlockProvider

func NewBlockProvider(
	logger log.BasicLogger,
	blockStorage services.BlockStorage,
	consensusContext services.ConsensusContext,
	nodeAddress primitives.NodeAddress,
	nodePrivateKey primitives.EcdsaSecp256K1PrivateKey) *blockProvider

func NewCommunication added in v0.7.1

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

func NewKeyManager

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

func NewLeanHelixConsensusAlgo

func NewLeanHelixConsensusAlgo(
	ctx context.Context,
	gossip gossiptopics.LeanHelix,
	blockStorage services.BlockStorage,
	consensusContext services.ConsensusContext,
	parentLogger log.BasicLogger,
	config Config,
	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) *membership

Types

type BlockPairWrapper

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

func ToBlockPairWrapper added in v0.7.1

func ToBlockPairWrapper(blockPair *protocol.BlockPairContainer) *BlockPairWrapper

func (*BlockPairWrapper) Height

type Config

type Config interface {
	NodeAddress() primitives.NodeAddress
	NodePrivateKey() primitives.EcdsaSecp256K1PrivateKey
	FederationNodes(asOfBlock uint64) map[string]config.FederationNode
	LeanHelixConsensusRoundTimeoutInterval() time.Duration
	ActiveConsensusAlgo() consensus.ConsensusAlgoType
}

Jump to

Keyboard shortcuts

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