config

package
v1.9.0-rc.16 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: BSD-3-Clause Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TxFeeUpgrades

	// The node's chain manager
	Chains chains.Manager

	// Node's validator set maps subnetID -> validators of the subnet
	Validators validators.Manager

	// Provides access to subnet tracking
	SubnetTracker common.SubnetTracker

	// 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
	StakingEnabled bool

	// Set of subnets that this node is validating
	WhitelistedSubnets ids.Set

	// 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

	// Time of the AP3 network upgrade
	ApricotPhase3Time time.Time

	// Time of the AP5 network upgrade
	ApricotPhase5Time time.Time

	// Time of the Blueberry network upgrade
	BlueberryTime time.Time
}

Struct collecting all foundational parameters of PlatformVM

func (*Config) CreateChain added in v1.7.14

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

func (*Config) GetTxFees

func (c *Config) GetTxFees(timestamp time.Time) *TxFees

func (*Config) IsApricotPhase3Activated added in v1.8.0

func (c *Config) IsApricotPhase3Activated(timestamp time.Time) bool

func (*Config) IsApricotPhase5Activated added in v1.8.0

func (c *Config) IsApricotPhase5Activated(timestamp time.Time) bool

func (*Config) IsBlueberryActivated added in v1.8.0

func (c *Config) IsBlueberryActivated(timestamp time.Time) bool

type TxFeeUpgrades

type TxFeeUpgrades struct {
	Initial       TxFees `json:"initial"`
	ApricotPhase3 TxFees `json:"apricotPhase3"`
	Blueberry     TxFees `json:"blueberry"`
}

type TxFees

type TxFees struct {
	AddPrimaryNetworkValidator uint64 `json:"addPrimaryNetworkValidator"`
	AddPrimaryNetworkDelegator uint64 `json:"addPrimaryNetworkDelegator"`
	AddPOASubnetValidator      uint64 `json:"addPOASubnetValidator"`
	AddPOSSubnetValidator      uint64 `json:"addPOSSubnetValidator"`
	AddPOSSubnetDelegator      uint64 `json:"addPOSSubnetDelegator"`
	RemovePOASubnetValidator   uint64 `json:"removePOASubnetValidator"`
	CreateSubnet               uint64 `json:"createSubnet"`
	CreateChain                uint64 `json:"createChain"`
	TransformSubnet            uint64 `json:"transformSubnet"`
	Import                     uint64 `json:"import"`
	Export                     uint64 `json:"export"`
}

Jump to

Keyboard shortcuts

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