broadcast

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: GPL-3.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDelayBroadcastDataForLeader

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

CreateDelayBroadcastDataForLeader -

func CreateDelayBroadcastDataForValidator

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

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

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

func ValidatorDelayPerOrder() time.Duration

ValidatorDelayPerOrder -

Types

type ArgsDelayedBlockBroadcaster

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

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

type HeaderDataForValidator struct {
	Round        uint64
	PrevRandSeed []byte
}

HeaderDataForValidator -

func GetShardDataFromMetaChainBlock

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

GetShardDataFromMetaChainBlock -

type MetaChainMessengerArgs

type MetaChainMessengerArgs struct {
	CommonMessengerArgs
}

MetaChainMessengerArgs holds the arguments for creating a metaChainMessenger instance

type ShardChainMessengerArgs

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