logoDocumentation

Avalanche L1 Configs

Tip

This page was generated by a plugin that directly references this file in the AvalancheGo GitHub repository.

It is possible to provide parameters for an Avalanche L1. Parameters here apply to all chains in the specified Avalanche L1.

AvalancheGo looks for files specified with {subnetID}.json under --subnet-config-dir as documented here.

Here is an example of Avalanche L1 config file:

{
  "validatorOnly": false,
  "consensusParameters": {
    "k": 25,
    "alpha": 18
  }
}

Parameters

Private Avalanche L1

validatorOnly (bool)

If true this node does not expose Avalanche L1 blockchain contents to non-validators via P2P messages. Defaults to false.

Avalanche L1s are public by default. It means that every node can sync and listen ongoing transactions/blocks in Avalanche L1s, even they're not validating the listened Avalanche L1.

Avalanche L1 validators can choose not to publish contents of blockchains via this configuration. If a node sets validatorOnly to true, the node exchanges messages only with this Avalanche L1's validators. Other peers will not be able to learn contents of this Avalanche L1 from this node.

Tip

This is a node-specific configuration. Every validator of this Avalanche L1 has to use this configuration in order to create a full private Avalanche L1.

allowedNodes (string list)

If validatorOnly=true this allows explicitly specified NodeIDs to be allowed to sync the Avalanche L1 regardless of validator status. Defaults to be empty.

Tip

This is a node-specific configuration. Every validator of this Avalanche L1 has to use this configuration in order to properly allow a node in the private Avalanche L1.

proposerMinBlockDelay (duration)

The minimum delay performed when building snowman++ blocks. Default is set to 1 second.

As one of the ways to control network congestion, Snowman++ will only build a block proposerMinBlockDelay after the parent block's timestamp. Some high-performance custom VM may find this too strict. This flag allows tuning the frequency at which blocks are built.

Consensus Parameters

Avalanche L1 configs supports loading new consensus parameters. JSON keys are different from their matching CLI keys. These parameters must be grouped under consensusParameters key. The consensus parameters of an Avalanche L1 default to the same values used for the Primary Network, which are given CLI Snow Parameters.

CLI KeyJSON Key
--snow-sample-sizek
--snow-quorum-sizealpha
--snow-commit-thresholdbeta
--snow-concurrent-repollsconcurrentRepolls
--snow-optimal-processingoptimalProcessing
--snow-max-processingmaxOutstandingItems
--snow-max-time-processingmaxItemProcessingTime
--snow-avalanche-batch-sizebatchSize
--snow-avalanche-num-parentsparentSize

Gossip Configs

It's possible to define different Gossip configurations for each Avalanche L1 without changing values for Primary Network. JSON keys of these parameters are different from their matching CLI keys. These parameters default to the same values used for the Primary Network. For more information see CLI Gossip Configs.

CLI KeyJSON Key
--consensus-accepted-frontier-gossip-validator-sizegossipAcceptedFrontierValidatorSize
--consensus-accepted-frontier-gossip-non-validator-sizegossipAcceptedFrontierNonValidatorSize
--consensus-accepted-frontier-gossip-peer-sizegossipAcceptedFrontierPeerSize
--consensus-on-accept-gossip-validator-sizegossipOnAcceptValidatorSize
--consensus-on-accept-gossip-non-validator-sizegossipOnAcceptNonValidatorSize
--consensus-on-accept-gossip-peer-sizegossipOnAcceptPeerSize

Last updated on

On this page

Edit on Github