github.com/MetalBlockchain/metalgo@v1.11.9/vms/platformvm/config/config.md (about)

     1  ---
     2  tags: [Configs]
     3  description: Reference for all available configuration options and parameters for the PlatformVM.
     4  pagination_label: P-Chain Configs
     5  sidebar_position: 1
     6  ---
     7  
     8  # P-Chain
     9  
    10  This document provides details about the configuration options available for the PlatformVM.
    11  
    12  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:
    13  
    14  ```json
    15  {
    16    "Chains": null,
    17    "Validators": null,
    18    "UptimeLockedCalculator": null,
    19    "SybilProtectionEnabled": false,
    20    "PartialSyncPrimaryNetwork": false,
    21    "TrackedSubnets": [],
    22    "TxFee": 0,
    23    "CreateAssetTxFee": 0,
    24    "CreateSubnetTxFee": 0,
    25    "TransformSubnetTxFee": 0,
    26    "CreateBlockchainTxFee": 0,
    27    "AddPrimaryNetworkValidatorFee": 0,
    28    "AddPrimaryNetworkDelegatorFee": 0,
    29    "AddSubnetValidatorFee": 0,
    30    "AddSubnetDelegatorFee": 0,
    31    "MinValidatorStake": 0,
    32    "MaxValidatorStake": 0,
    33    "MinDelegatorStake": 0,
    34    "MinDelegationFee": 0,
    35    "UptimePercentage": 0,
    36    "MinStakeDuration": "0s",
    37    "MaxStakeDuration": "0s",
    38    "RewardConfig": {},
    39    "ApricotPhase3Time": "0001-01-01T00:00:00Z",
    40    "ApricotPhase5Time": "0001-01-01T00:00:00Z",
    41    "BanffTime": "0001-01-01T00:00:00Z",
    42    "CortinaTime": "0001-01-01T00:00:00Z",
    43    "DurangoTime": "0001-01-01T00:00:00Z",
    44    "EUpgradeTime": "0001-01-01T00:00:00Z",
    45    "UseCurrentHeight": false
    46  }
    47  ```
    48  
    49  Default values are overridden only if explicitly specified in the config.
    50  
    51  ## Parameters
    52  
    53  The parameters are as follows:
    54  
    55  ### `Chains`
    56  
    57  The node's chain manager
    58  
    59  ### `Validators`
    60  
    61  Node's validator set maps SubnetID to validators of the Subnet
    62  
    63  - The primary network's validator set should have been added to the manager before calling VM.Initialize.
    64  - The primary network's validator set should be empty before calling VM.Initialize.
    65  
    66  ### `UptimeLockedCalculator`
    67  
    68  Provides access to the uptime manager as a thread-safe data structure
    69  
    70  ### `SybilProtectionEnabled`
    71  
    72  _Boolean_
    73  
    74  True if the node is being run with staking enabled
    75  
    76  ### `PartialSyncPrimaryNetwork`
    77  
    78  _Boolean_
    79  
    80  If true, only the P-chain will be instantiated on the primary network.
    81  
    82  ### `TrackedSubnets`
    83  
    84  Set of Subnets that this node is validating
    85  
    86  ### `TxFee`
    87  
    88  _Uint64_
    89  
    90  Fee that is burned by every non-state creating transaction
    91  
    92  ### `CreateAssetTxFee`
    93  
    94  _Uint64_
    95  
    96  Fee that must be burned by every state creating transaction before AP3
    97  
    98  ### `CreateSubnetTxFee`
    99  
   100  _Uint64_
   101  
   102  Fee that must be burned by every Subnet creating transaction after AP3
   103  
   104  ### `TransformSubnetTxFee`
   105  
   106  _Uint64_
   107  
   108  Fee that must be burned by every transform Subnet transaction
   109  
   110  ### `CreateBlockchainTxFee`
   111  
   112  _Uint64_
   113  
   114  Fee that must be burned by every blockchain creating transaction after AP3
   115  
   116  ### `AddPrimaryNetworkValidatorFee`
   117  
   118  _Uint64_
   119  
   120  Transaction fee for adding a primary network validator
   121  
   122  ### `AddPrimaryNetworkDelegatorFee`
   123  
   124  _Uint64_
   125  
   126  Transaction fee for adding a primary network delegator
   127  
   128  ### `AddSubnetValidatorFee`
   129  
   130  _Uint64_
   131  
   132  Transaction fee for adding a Subnet validator
   133  
   134  ### `AddSubnetDelegatorFee`
   135  
   136  _Uint64_
   137  
   138  Transaction fee for adding a Subnet delegator
   139  
   140  ### `MinValidatorStake`
   141  
   142  _Uint64_
   143  
   144  The minimum amount of tokens one must bond to be a validator
   145  
   146  ### `MaxValidatorStake`
   147  
   148  _Uint64_
   149  
   150  The maximum amount of tokens that can be bonded on a validator
   151  
   152  ### `MinDelegatorStake`
   153  
   154  _Uint64_
   155  
   156  Minimum stake, in nAVAX, that can be delegated on the primary network
   157  
   158  ### `MinDelegationFee`
   159  
   160  _Uint32_
   161  
   162  Minimum fee that can be charged for delegation
   163  
   164  ### `UptimePercentage`
   165  
   166  _Float64_
   167  
   168  UptimePercentage is the minimum uptime required to be rewarded for staking
   169  
   170  ### `MinStakeDuration`
   171  
   172  _Duration_
   173  
   174  Minimum amount of time to allow a staker to stake
   175  
   176  ### `MaxStakeDuration`
   177  
   178  _Duration_
   179  
   180  Maximum amount of time to allow a staker to stake
   181  
   182  ### `RewardConfig`
   183  
   184  Config for the minting function
   185  
   186  ### `ApricotPhase3Time`
   187  
   188  _Time_
   189  
   190  Time of the AP3 network upgrade
   191  
   192  ### `ApricotPhase5Time`
   193  
   194  _Time_
   195  
   196  Time of the AP5 network upgrade
   197  
   198  ### `BanffTime`
   199  
   200  _Time_
   201  
   202  Time of the Banff network upgrade
   203  
   204  ### `CortinaTime`
   205  
   206  _Time_
   207  
   208  Time of the Cortina network upgrade
   209  
   210  ### `DurangoTime`
   211  
   212  _Time_
   213  
   214  Time of the Durango network upgrade
   215  
   216  ### `EUpgradeTime`
   217  
   218  _Time_
   219  
   220  Time of the E network upgrade
   221  
   222  ### `UseCurrentHeight`
   223  
   224  _Boolean_
   225  
   226  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).