github.com/MetalBlockchain/metalgo@v1.11.9/subnets/config.md (about) 1 --- 2 tags: [Nodes] 3 description: Reference for all available Subnet config options and flags. 4 sidebar_label: Subnet Configs 5 pagination_label: Subnet Configs 6 sidebar_position: 2 7 --- 8 9 # Subnet Configs 10 11 It is possible to provide parameters for a Subnet. Parameters here apply to all 12 chains in the specified Subnet. 13 14 AvalancheGo looks for files specified with `{subnetID}.json` under 15 `--subnet-config-dir` as documented 16 [here](/nodes/configure/avalanchego-config-flags.md#subnet-configs). 17 18 Here is an example of Subnet config file: 19 20 ```json 21 { 22 "validatorOnly": false, 23 "consensusParameters": { 24 "k": 25, 25 "alpha": 18 26 } 27 } 28 ``` 29 30 ## Parameters 31 32 ### Private Subnet 33 34 #### `validatorOnly` (bool) 35 36 If `true` this node does not expose Subnet blockchain contents to non-validators 37 via P2P messages. Defaults to `false`. 38 39 Avalanche Subnets are public by default. It means that every node can sync and 40 listen ongoing transactions/blocks in Subnets, even they're not validating the 41 listened Subnet. 42 43 Subnet validators can choose not to publish contents of blockchains via this 44 configuration. If a node sets `validatorOnly` to true, the node exchanges 45 messages only with this Subnet's validators. Other peers will not be able to 46 learn contents of this Subnet from this node. 47 48 :::tip 49 50 This is a node-specific configuration. Every validator of this Subnet has to use 51 this configuration in order to create a full private Subnet. 52 53 ::: 54 55 #### `allowedNodes` (string list) 56 57 If `validatorOnly=true` this allows explicitly specified NodeIDs to be allowed 58 to sync the Subnet regardless of validator status. Defaults to be empty. 59 60 :::tip 61 62 This is a node-specific configuration. Every validator of this Subnet has to use 63 this configuration in order to properly allow a node in the private Subnet. 64 65 ::: 66 67 #### `proposerMinBlockDelay` (duration) 68 69 The minimum delay performed when building snowman++ blocks. Default is set to 1 second. 70 71 As one of the ways to control network congestion, Snowman++ will only build a 72 block `proposerMinBlockDelay` after the parent block's timestamp. Some 73 high-performance custom VM may find this too strict. This flag allows tuning the 74 frequency at which blocks are built. 75 76 ### Consensus Parameters 77 78 Subnet configs supports loading new consensus parameters. JSON keys are 79 different from their matching `CLI` keys. These parameters must be grouped under 80 `consensusParameters` key. The consensus parameters of a Subnet default to the 81 same values used for the Primary Network, which are given [CLI Snow Parameters](/nodes/configure/avalanchego-config-flags.md#snow-parameters). 82 83 | CLI Key | JSON Key | 84 | :------------------------------- | :-------------------- | 85 | --snow-sample-size | k | 86 | --snow-quorum-size | alpha | 87 | --snow-commit-threshold | `beta` | 88 | --snow-concurrent-repolls | concurrentRepolls | 89 | --snow-optimal-processing | `optimalProcessing` | 90 | --snow-max-processing | maxOutstandingItems | 91 | --snow-max-time-processing | maxItemProcessingTime | 92 | --snow-avalanche-batch-size | `batchSize` | 93 | --snow-avalanche-num-parents | `parentSize` | 94 95 ### Gossip Configs 96 97 It's possible to define different Gossip configurations for each Subnet without 98 changing values for Primary Network. JSON keys of these 99 parameters are different from their matching `CLI` keys. These parameters 100 default to the same values used for the Primary Network. For more information 101 see [CLI Gossip Configs](/nodes/configure/avalanchego-config-flags.md#gossiping). 102 103 | CLI Key | JSON Key | 104 | :------------------------------------------------------ | :------------------------------------- | 105 | --consensus-accepted-frontier-gossip-validator-size | gossipAcceptedFrontierValidatorSize | 106 | --consensus-accepted-frontier-gossip-non-validator-size | gossipAcceptedFrontierNonValidatorSize | 107 | --consensus-accepted-frontier-gossip-peer-size | gossipAcceptedFrontierPeerSize | 108 | --consensus-on-accept-gossip-validator-size | gossipOnAcceptValidatorSize | 109 | --consensus-on-accept-gossip-non-validator-size | gossipOnAcceptNonValidatorSize | 110 | --consensus-on-accept-gossip-peer-size | gossipOnAcceptPeerSize |