cardano-diffusion
Safe HaskellNone
LanguageHaskell2010

Cardano.Network.Diffusion.Configuration

Contents

Description

One stop shop for configuring diffusion layer for upstream clients This module contains Cardano specific configuration parameters

Synopsis

Documentation

newtype NumberOfBigLedgerPeers Source #

Minimum number of hot big ledger peers in Genesis mode for trusted state to be signalled to Consensus. This number should be smaller than the targetNumberOfActiveBigLedgerPeers but greater than 1. In Genesis, we may demote a big ledger peer for underperformance, but not promote a replacement immediately to guard against adversaries which may want to slow down our progress.

defaultSyncTargets :: PeerSelectionTargets Source #

These targets are established when Genesis mode is enabled in node configuration and when the node is syncing up

defaultNumberOfBigLedgerPeers :: NumberOfBigLedgerPeers Source #

This parameter controls the minimum number of active connections with big ledger peers that must be maintained when syncing in Genesis mode such that trusted state can be signalled to Consensus. Exiting syncing / entering deadline mode is predicated on this condition. This should be below targetNumberOfActiveBigLedgerPeers in syncTargets otherwise untrusted state will never be departed. This value is lower than the target, because in Genesis we may demote a big ledger peer for underperformance and not immediately promote one from the warm set in case there are adversaries whom are intentionally trying to slow us down.

mkDefaultBlockFetchConfiguration :: MiniProtocolParameters -> Salt -> BlockFetchConfiguration Source #

Configuration for FetchDecisionPolicy. The maximal number of requests in flight is the blockFetchPipeliningMax of the given MiniProtocolParameters.

mkDefaultMiniProtocolParameters :: TxSubmissionLogicVersion -> NodeTxSubmissionConfig -> MiniProtocolParameters Source #

The default MiniProtocolParameters with the node's tx-submission settings, e.g. from its configuration.

data TxSubmissionLogicVersion #

Flag to enable/disable the usage of the new tx-submission logic.

Constructors

TxSubmissionLogicV1

the legacy V1

TxSubmissionLogicV2

the new V2

defaultTxSubmissionLogicVersion :: TxSubmissionLogicVersion Source #

The default logic version is the legacy one, the new one is still experimental.

defaultNodeTxSubmissionConfig :: NodeTxSubmissionConfig Source #

The default NodeTxSubmissionConfig: the settings of defaultTxSubmissionConfigV2.

It will be overwritten if TxSubmissionLogicV1 is used or negotiated version is before NodeToNodeV_16, see txSubmissionConfigForVersion.

Re-exports

data BlockFetchConfiguration #

Configuration for FetchDecisionPolicy. Should be determined by external local node config.

Constructors

BlockFetchConfiguration 

Fields

data MiniProtocolParameters Source #

Configuration values needed to instrument mini-protocol limits. This node wide configuration. Per connection values for some protocols (e.g. tx-submission) will depend on both configuration and negotiated version.

Constructors

MiniProtocolParameters 

Fields

data NodeTxSubmissionConfig Source #

The node's tx-submission settings, e.g. from its configuration, before they are applied to a connection's negotiated NodeToNodeVersion (see txSubmissionConfigForVersion). They are not validated: mkNodeTxDecisionPolicy checks them.

NOTE: the values are only used by TxSubmissionLogicV2 from NodeToNodeV_16; with TxSubmissionLogicV1, or before NodeToNodeV_16, defaultTxSubmissionConfigV1 is used instead.

Constructors

NodeTxSubmissionConfig 

Fields

data Salt #

Instances

Instances details
Show Salt 
Instance details

Defined in Ouroboros.Network.Hashable

Methods

showsPrec :: Int -> Salt -> ShowS #

show :: Salt -> String #

showList :: [Salt] -> ShowS #

mkSalt :: RandomGen g => g -> (Salt, g) #