Home

Subnetwork configuration

Subnetwork Configs

It is possible to provide parameters for a Subnetwork. Parameters here apply to all chains in the specified Subnetwork.

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

Here is an example of Subnetwork config file:


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

Parameters#

Private Subnetwork#

validatorOnly (bool)

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

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

Subnetwork 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 Subnetwork's validators. Other peers will not be able to learn contents of this Subnetwork from this node.

:::tip

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

:::

proposerMinBlockDelay (duration)

As one of the ways to control network congestion, new blocks only call the 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#

Subnetwork configs supports loading new consensus parameters. JSON keys are different from their matching CLI keys. These parameters must be grouped under consensusParameters key.

CLI KeyJSON Key
sample-sizek
quorum-sizealpha
virtuous-commit-thresholdbetaVirtuous
rogue-commit-thresholdbetaRogue
concurrent-repollsconcurrentRepolls
optimal-processingoptimalProcessing
max-processingmaxOutstandingItems
max-time-processingmaxItemProcessingTime
mixed-query-num-push-vdrmixedQueryNumPushVdr
mixed-query-num-push-non-vdrmixedQueryNumPushNondVdr
dijets-batch-sizebatchSize
dijets-num-parentsparentSize

Gossip Configs#

It's possible to define different Gossip configurations for each Subnetwork without changing values for Primary Network. For example in Primary Network transaction mempools are not gossiped to non-validators (--consensus-app-gossip-non-validator-size is 0). You can change this for your Subnetwork and share mempool with non-validators as well. 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
--consensus-app-gossip-validator-sizeappGossipValidatorSize
--consensus-app-gossip-non-validator-sizeappGossipNonValidatorSize
--consensus-app-gossip-peer-sizeappGossipPeerSize