chainSimulator

package
v1.7.17 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: GPL-3.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBlsPrivateKeys

func GenerateBlsPrivateKeys(numOfKeys int) ([][]byte, []string, error)

GenerateBlsPrivateKeys will generate bls keys

func NewBaseChainSimulator added in v1.7.14

func NewBaseChainSimulator(args ArgsBaseChainSimulator) (*simulator, error)

NewBaseChainSimulator will create a new instance of simulator

func NewChainSimulator

func NewChainSimulator(args ArgsChainSimulator) (*simulator, error)

NewChainSimulator will create a new instance of simulator

func NewChainSimulatorFacade

func NewChainSimulatorFacade(chainSimulator ChainSimulator) (*chainSimulatorFacade, error)

NewChainSimulatorFacade returns the chain simulator facade

Types

type ArgsBaseChainSimulator added in v1.7.14

type ArgsBaseChainSimulator struct {
	ArgsChainSimulator
	ConsensusGroupSize          uint32
	MetaChainConsensusGroupSize uint32
}

ArgsBaseChainSimulator holds the arguments needed to create a new instance of simulator

type ArgsChainSimulator

type ArgsChainSimulator struct {
	BypassTxSignatureCheck     bool
	TempDir                    string
	PathToInitialConfig        string
	NumOfShards                uint32
	MinNodesPerShard           uint32
	MetaChainMinNodes          uint32
	NumNodesWaitingListShard   uint32
	NumNodesWaitingListMeta    uint32
	GenesisTimestamp           int64
	InitialRound               int64
	InitialEpoch               uint32
	InitialNonce               uint64
	RoundDurationInMillis      uint64
	RoundsPerEpoch             core.OptionalUint64
	ApiInterface               components.APIConfigurator
	AlterConfigsFunction       func(cfg *config.Configs)
	VmQueryDelayAfterStartInMs uint64
}

ArgsChainSimulator holds the arguments needed to create a new instance of simulator

type ChainHandler

type ChainHandler interface {
	IncrementRound()
	CreateNewBlock() error
	IsInterfaceNil() bool
}

ChainHandler defines what a chain handler should be able to do

type ChainSimulator

type ChainSimulator interface {
	GenerateBlocks(numOfBlocks int) error
	GetNodeHandler(shardID uint32) process.NodeHandler
	IsInterfaceNil() bool
}

ChainSimulator defines what a chain simulator should be able to do

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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