Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultExecutionConfig = ExecutionConfig{ Network: network.DefaultConfig, BlockCacheSize: 64 * units.MiB, TxCacheSize: 128 * units.MiB, TransformedSubnetTxCacheSize: 4 * units.MiB, RewardUTXOsCacheSize: 2048, ChainCacheSize: 2048, ChainDBCacheSize: 2048, BlockIDCacheSize: 8192, FxOwnerCacheSize: 4 * units.MiB, ChecksumsEnabled: false, MempoolPruneFrequency: 30 * time.Minute, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The node's chain manager Chains chains.Manager // Node's validator set maps subnetID -> validators of the subnet // // Invariant: The primary network's validator set should have been added to // the manager before calling VM.Initialize. // Invariant: The primary network's validator set should be empty before // calling VM.Initialize. Validators validators.Manager // All static fees config active before E-upgrade StaticFeeConfig fee.StaticConfig // Provides access to the uptime manager as a thread safe data structure UptimeLockedCalculator uptime.LockedCalculator // True if the node is being run with staking enabled SybilProtectionEnabled bool // If true, only the P-chain will be instantiated on the primary network. PartialSyncPrimaryNetwork bool // Set of subnets that this node is validating TrackedSubnets set.Set[ids.ID] // The minimum amount of tokens one must bond to be a validator MinValidatorStake uint64 // The maximum amount of tokens that can be bonded on a validator MaxValidatorStake uint64 // Minimum stake, in nAVAX, that can be delegated on the primary network MinDelegatorStake uint64 // Minimum fee that can be charged for delegation MinDelegationFee uint32 // UptimePercentage is the minimum uptime required to be rewarded for staking UptimePercentage float64 // Minimum amount of time to allow a staker to stake MinStakeDuration time.Duration // Maximum amount of time to allow a staker to stake MaxStakeDuration time.Duration // Config for the minting function RewardConfig reward.Config // All network upgrade timestamps UpgradeConfig upgrade.Config // UseCurrentHeight forces [GetMinimumHeight] to return the current height // of the P-Chain instead of the oldest block in the [recentlyAccepted] // window. // // This config is particularly useful for triggering proposervm activation // on recently created subnets (without this, users need to wait for // [recentlyAcceptedWindowTTL] to pass for activation to occur). UseCurrentHeight bool }
Struct collecting all foundational parameters of PlatformVM
func (*Config) CreateChain ¶
func (c *Config) CreateChain(chainID ids.ID, tx *txs.CreateChainTx)
Create the blockchain described in [tx], but only if this node is a member of the subnet that validates the chain
type ExecutionConfig ¶ added in v1.10.6
type ExecutionConfig struct { Network network.Config `json:"network"` BlockCacheSize int `json:"block-cache-size"` TxCacheSize int `json:"tx-cache-size"` TransformedSubnetTxCacheSize int `json:"transformed-subnet-tx-cache-size"` RewardUTXOsCacheSize int `json:"reward-utxos-cache-size"` ChainCacheSize int `json:"chain-cache-size"` ChainDBCacheSize int `json:"chain-db-cache-size"` BlockIDCacheSize int `json:"block-id-cache-size"` FxOwnerCacheSize int `json:"fx-owner-cache-size"` ChecksumsEnabled bool `json:"checksums-enabled"` MempoolPruneFrequency time.Duration `json:"mempool-prune-frequency"` }
ExecutionConfig provides execution parameters of PlatformVM
func GetExecutionConfig ¶ added in v1.10.6
func GetExecutionConfig(b []byte) (*ExecutionConfig, error)
GetExecutionConfig returns an ExecutionConfig input is unmarshalled into an ExecutionConfig previously initialized with default values
Click to show internal directories.
Click to hide internal directories.