broadcast

package
v1.2.29 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDelayBroadcastDataForLeader added in v1.0.133

func CreateDelayBroadcastDataForLeader(
	headerHash []byte,
	miniblocks map[uint32][]byte,
	transactions map[string][][]byte,
) *delayedBroadcastData

CreateDelayBroadcastDataForLeader -

func CreateDelayBroadcastDataForValidator added in v1.0.133

func CreateDelayBroadcastDataForValidator(
	headerHash []byte,
	header data.HeaderHandler,
	miniblocksData map[uint32][]byte,
	miniBlockHashes map[string]map[string]struct{},
	transactionsData map[string][][]byte,
	order uint32,
) *delayedBroadcastData

CreateDelayBroadcastDataForValidator creates the delayed broadcast data

func CreateValidatorHeaderBroadcastData added in v1.0.133

func CreateValidatorHeaderBroadcastData(
	headerHash []byte,
	header data.HeaderHandler,
	metaMiniBlocksData map[uint32][]byte,
	metaTransactionsData map[string][][]byte,
	order uint32,
) *validatorHeaderBroadcastData

CreateValidatorHeaderBroadcastData creates a validatorHeaderBroadcastData object from the given parameters

func NewCommonMessenger

func NewCommonMessenger(
	marshalizer marshal.Marshalizer,
	messenger consensus.P2PMessenger,
	privateKey crypto.PrivateKey,
	shardCoordinator sharding.Coordinator,
	peerSigHandler crypto.PeerSignatureHandler,
) (*commonMessenger, error)

NewCommonMessenger will return a new instance of a commonMessenger

func NewDelayedBlockBroadcaster added in v1.0.133

func NewDelayedBlockBroadcaster(args *ArgsDelayedBlockBroadcaster) (*delayedBlockBroadcaster, error)

NewDelayedBlockBroadcaster create a new instance of a delayed block data broadcaster

func NewMetaChainMessenger

func NewMetaChainMessenger(
	args MetaChainMessengerArgs,
) (*metaChainMessenger, error)

NewMetaChainMessenger creates a new metaChainMessenger object

func NewShardChainMessenger

func NewShardChainMessenger(
	args ShardChainMessengerArgs,
) (*shardChainMessenger, error)

NewShardChainMessenger creates a new shardChainMessenger object

func ValidatorDelayPerOrder added in v1.0.133

func ValidatorDelayPerOrder() time.Duration

ValidatorDelayPerOrder -

Types

type ArgsDelayedBlockBroadcaster added in v1.0.133

type ArgsDelayedBlockBroadcaster struct {
	InterceptorsContainer process.InterceptorsContainer
	HeadersSubscriber     consensus.HeadersPoolSubscriber
	ShardCoordinator      sharding.Coordinator
	LeaderCacheSize       uint32
	ValidatorCacheSize    uint32
	AlarmScheduler        timersScheduler
}

ArgsDelayedBlockBroadcaster holds the arguments to create a delayed block broadcaster

type CommonMessengerArgs added in v1.0.106

type CommonMessengerArgs struct {
	Marshalizer                marshal.Marshalizer
	Hasher                     hashing.Hasher
	Messenger                  consensus.P2PMessenger
	PrivateKey                 crypto.PrivateKey
	ShardCoordinator           sharding.Coordinator
	PeerSignatureHandler       crypto.PeerSignatureHandler
	HeadersSubscriber          consensus.HeadersPoolSubscriber
	InterceptorsContainer      process.InterceptorsContainer
	MaxDelayCacheSize          uint32
	MaxValidatorDelayCacheSize uint32
	AlarmScheduler             core.TimersScheduler
}

CommonMessengerArgs holds the arguments for creating commonMessenger instance

type HeaderDataForValidator added in v1.0.133

type HeaderDataForValidator struct {
	Round        uint64
	PrevRandSeed []byte
}

HeaderDataForValidator -

func GetShardDataFromMetaChainBlock added in v1.0.133

func GetShardDataFromMetaChainBlock(
	headerHandler data.HeaderHandler,
	shardID uint32,
) ([][]byte, []*HeaderDataForValidator, error)

GetShardDataFromMetaChainBlock -

type MetaChainMessengerArgs added in v1.0.106

type MetaChainMessengerArgs struct {
	CommonMessengerArgs
}

MetaChainMessengerArgs holds the arguments for creating a metaChainMessenger instance

type ShardChainMessengerArgs added in v1.0.106

type ShardChainMessengerArgs struct {
	CommonMessengerArgs
}

ShardChainMessengerArgs holds the arguments for creating a shardChainMessenger instance

Jump to

Keyboard shortcuts

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