configs

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: GPL-3.0 Imports: 24 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

View Source
const (
	// ChainID contains the chain id
	ChainID = "chain"

	// ChainSimulatorConsensusGroupSize defines the size of the consensus group for chain simulator
	ChainSimulatorConsensusGroupSize = 1
)

Variables

This section is empty.

Functions

func GetLatestGasScheduleFilename

func GetLatestGasScheduleFilename(directory string) (string, error)

GetLatestGasScheduleFilename will parse the provided path and get the latest gas schedule filename

func SetMaxNumberOfNodesInConfigs

func SetMaxNumberOfNodesInConfigs(cfg *config.Configs, eligibleNodes uint32, waitingNodes uint32, numOfShards uint32)

SetMaxNumberOfNodesInConfigs will correctly set the max number of nodes in configs

func SetQuickJailRatingConfig

func SetQuickJailRatingConfig(cfg *config.Configs)

SetQuickJailRatingConfig will set the rating config in a way that leads to rapid jailing of a node

func SetStakingV4ActivationEpochs

func SetStakingV4ActivationEpochs(cfg *config.Configs, initialEpoch uint32)

SetStakingV4ActivationEpochs configures activation epochs for Staking V4. It takes an initial epoch and sets three consecutive steps for enabling Staking V4 features:

  • Step 1 activation epoch
  • Step 2 activation epoch
  • Step 3 activation epoch

Types

type ArgsChainSimulatorConfigs

type ArgsChainSimulatorConfigs struct {
	NumOfShards                 uint32
	OriginalConfigsPath         string
	GenesisTimeStamp            int64
	RoundDurationInMillis       uint64
	TempDir                     string
	MinNodesPerShard            uint32
	ConsensusGroupSize          uint32
	MetaChainMinNodes           uint32
	MetaChainConsensusGroupSize uint32
	Hysteresis                  float32
	InitialEpoch                uint32
	RoundsPerEpoch              core.OptionalUint64
	NumNodesWaitingListShard    uint32
	NumNodesWaitingListMeta     uint32
	AlterConfigsFunction        func(cfg *config.Configs)
}

ArgsChainSimulatorConfigs holds all the components needed to create the chain simulator configs

type ArgsConfigsSimulator

type ArgsConfigsSimulator struct {
	GasScheduleFilename   string
	Configs               config.Configs
	ValidatorsPrivateKeys []crypto.PrivateKey
	InitialWallets        *dtos.InitialWalletKeys
}

ArgsConfigsSimulator holds the configs for the chain simulator

func CreateChainSimulatorConfigs

func CreateChainSimulatorConfigs(args ArgsChainSimulatorConfigs) (*ArgsConfigsSimulator, error)

CreateChainSimulatorConfigs will create the chain simulator configs

Jump to

Keyboard shortcuts

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