Documentation
¶
Index ¶
- Constants
- func GetLatestGasScheduleFilename(directory string) (string, error)
- func SetMaxNumberOfNodesInConfigs(cfg *config.Configs, eligibleNodes uint32, waitingNodes uint32, ...)
- func SetQuickJailRatingConfig(cfg *config.Configs)
- func SetStakingV4ActivationEpochs(cfg *config.Configs, initialEpoch uint32)
- type ArgsChainSimulatorConfigs
- type ArgsConfigsSimulator
Constants ¶
const (
// ChainID contains the chain id
ChainID = "chain"
)
Variables ¶
This section is empty.
Functions ¶
func GetLatestGasScheduleFilename ¶
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 ¶
SetQuickJailRatingConfig will set the rating config in a way that leads to rapid jailing of a node
func SetStakingV4ActivationEpochs ¶
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