Documentation ¶
Index ¶
- Variables
- type Config
- func (c *Config) CreateChain(chainID ids.ID, tx *txs.CreateChainTx)
- func (c *Config) GetCreateBlockchainTxFee(timestamp time.Time) uint64
- func (c *Config) GetCreateSupernetTxFee(timestamp time.Time) uint64
- func (c *Config) IsApricotPhase3Activated(timestamp time.Time) bool
- func (c *Config) IsApricotPhase5Activated(timestamp time.Time) bool
- func (c *Config) IsBanffActivated(timestamp time.Time) bool
- func (c *Config) IsCortinaActivated(timestamp time.Time) bool
- func (c *Config) IsDurangoActivated(timestamp time.Time) bool
- func (c *Config) IsEActivated(timestamp time.Time) bool
- type ExecutionConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultExecutionConfig = ExecutionConfig{ Network: network.DefaultConfig, BlockCacheSize: 64 * units.MiB, TxCacheSize: 128 * units.MiB, TransformedSupernetTxCacheSize: 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 supernetID -> validators of the supernet // // 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 // 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 supernets that this node is validating TrackedSupernets set.Set[ids.ID] // Fee that is burned by every non-state creating transaction TxFee uint64 // Fee that must be burned by every state creating transaction before AP3 CreateAssetTxFee uint64 // Fee that must be burned by every supernet creating transaction after AP3 CreateSupernetTxFee uint64 // Fee that must be burned by every transform supernet transaction TransformSupernetTxFee uint64 // Fee that must be burned by every blockchain creating transaction after AP3 CreateBlockchainTxFee uint64 // Transaction fee for adding a primary network validator AddPrimaryNetworkValidatorFee uint64 // Transaction fee for adding a primary network delegator AddPrimaryNetworkDelegatorFee uint64 // Transaction fee for adding a supernet validator AddSupernetValidatorFee uint64 // Transaction fee for adding a supernet delegator AddSupernetDelegatorFee uint64 // 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 // Maximum fee that can be charged for delegation MaxDelegationFee 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 // Time of the AP3 network upgrade ApricotPhase3Time time.Time // Time of the AP5 network upgrade ApricotPhase5Time time.Time // Time of the Banff network upgrade BanffTime time.Time // Time of the Cortina network upgrade CortinaTime time.Time // Time of the Durango network upgrade DurangoTime time.Time // Time of the E network upgrade EUpgradeTime time.Time // 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 supernets (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 supernet that validates the chain
func (*Config) GetCreateBlockchainTxFee ¶
func (*Config) GetCreateSupernetTxFee ¶
func (*Config) IsApricotPhase3Activated ¶
func (*Config) IsApricotPhase5Activated ¶
type ExecutionConfig ¶
type ExecutionConfig struct { Network network.Config `json:"network"` BlockCacheSize int `json:"block-cache-size"` TxCacheSize int `json:"tx-cache-size"` TransformedSupernetTxCacheSize int `json:"transformed-supernet-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 ¶
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.