configs

package
v0.0.0-...-08f901d Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

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

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
	MetaChainMinNodes        uint32
	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