P-Chain
This page was generated by a plugin that directly references this file in the AvalancheGo GitHub repository.
This document provides details about the configuration options available for the PlatformVM.
In order to specify a configuration for the PlatformVM, you need to define a Config
struct and its parameters. The default values for these parameters are:
{
"Chains": null,
"Validators": null,
"UptimeLockedCalculator": null,
"SybilProtectionEnabled": false,
"PartialSyncPrimaryNetwork": false,
"TrackedSubnets": [],
"TxFee": 0,
"CreateAssetTxFee": 0,
"CreateSubnetTxFee": 0,
"TransformSubnetTxFee": 0,
"CreateBlockchainTxFee": 0,
"AddPrimaryNetworkValidatorFee": 0,
"AddPrimaryNetworkDelegatorFee": 0,
"AddSubnetValidatorFee": 0,
"AddSubnetDelegatorFee": 0,
"MinValidatorStake": 0,
"MaxValidatorStake": 0,
"MinDelegatorStake": 0,
"MinDelegationFee": 0,
"UptimePercentage": 0,
"MinStakeDuration": "0s",
"MaxStakeDuration": "0s",
"RewardConfig": {},
"ApricotPhase3Time": "0001-01-01T00:00:00Z",
"ApricotPhase5Time": "0001-01-01T00:00:00Z",
"BanffTime": "0001-01-01T00:00:00Z",
"CortinaTime": "0001-01-01T00:00:00Z",
"DurangoTime": "0001-01-01T00:00:00Z",
"EUpgradeTime": "0001-01-01T00:00:00Z",
"UseCurrentHeight": false
}
Default values are overridden only if explicitly specified in the config.
Parametersβ
The parameters are as follows:
Chains
β
The node's chain manager
Validators
β
Node's validator set maps SubnetID to validators of the Subnet
- The primary network's validator set should have been added to the manager before calling VM.Initialize.
- The primary network's validator set should be empty before calling VM.Initialize.
UptimeLockedCalculator
β
Provides access to the uptime manager as a thread-safe data structure
SybilProtectionEnabled
β
Boolean
True if the node is being run with staking enabled
PartialSyncPrimaryNetwork
β
Boolean
If true, only the P-chain will be instantiated on the primary network.
TrackedSubnets
β
Set of Subnets that this node is validating
TxFee
β
Uint64
Fee that is burned by every non-state creating transaction
CreateAssetTxFee
β
Uint64
Fee that must be burned by every state creating transaction before AP3
CreateSubnetTxFee
β
Uint64
Fee that must be burned by every Subnet creating transaction after AP3
TransformSubnetTxFee
β
Uint64
Fee that must be burned by every transform Subnet transaction
CreateBlockchainTxFee
β
Uint64
Fee that must be burned by every blockchain creating transaction after AP3
AddPrimaryNetworkValidatorFee
β
Uint64
Transaction fee for adding a primary network validator
AddPrimaryNetworkDelegatorFee
β
Uint64
Transaction fee for adding a primary network delegator
AddSubnetValidatorFee
β
Uint64
Transaction fee for adding a Subnet validator
AddSubnetDelegatorFee
β
Uint64
Transaction fee for adding a Subnet delegator
MinValidatorStake
β
Uint64
The minimum amount of tokens one must bond to be a validator
MaxValidatorStake
β
Uint64
The maximum amount of tokens that can be bonded on a validator
MinDelegatorStake
β
Uint64
Minimum stake, in nAVAX, that can be delegated on the primary network
MinDelegationFee
β
Uint32
Minimum fee that can be charged for delegation
UptimePercentage
β
Float64
UptimePercentage is the minimum uptime required to be rewarded for staking
MinStakeDuration
β
Duration
Minimum amount of time to allow a staker to stake
MaxStakeDuration
β
Duration
Maximum amount of time to allow a staker to stake
RewardConfig
β
Config for the minting function
ApricotPhase3Time
β
Time
Time of the AP3 network upgrade
ApricotPhase5Time
β
Time
Time of the AP5 network upgrade
BanffTime
β
Time
Time of the Banff network upgrade
CortinaTime
β
Time
Time of the Cortina network upgrade
DurangoTime
β
Time
Time of the Durango network upgrade
EUpgradeTime
β
Time
Time of the E network upgrade
UseCurrentHeight
β
Boolean
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).
Was this page helpful?