Versions in this module Expand all Collapse all v1 v1.11.11 Aug 6, 2024 Changes in this version + const ConnectedPeersKey + const SendFailRateKey + const TimeSinceLastMsgReceivedKey + const TimeSinceLastMsgSentKey + type Config struct + AllowPrivateIPs bool + BLSKey *bls.SecretKey + Beacons validators.Manager + CPUTargeter tracker.Targeter + CompressionType compression.Type + DialerConfig dialer.Config + DiskTargeter tracker.Targeter + MaxClockDifference time.Duration + MaximumInboundMessageTimeout time.Duration + MyIPPort *utils.Atomic[netip.AddrPort] + MyNodeID ids.NodeID + NetworkID uint32 + ObjectedACPs set.Set[uint32] + PeerReadBufferSize int + PeerWriteBufferSize int + PingFrequency time.Duration + ProxyEnabled bool + ProxyReadHeaderTimeout time.Duration + RequireValidatorToConnect bool + ResourceTracker tracker.ResourceTracker + SupportedACPs set.Set[uint32] + TLSConfig *tls.Config + TLSKey crypto.Signer + TLSKeyLogFile string + ThrottlerConfig ThrottlerConfig + TrackedSubnets set.Set[ids.ID] + UptimeCalculator uptime.Calculator + UptimeMetricFreq time.Duration + UptimeRequirement float64 + Validators validators.Manager + type DelayConfig struct + InitialReconnectDelay time.Duration + MaxReconnectDelay time.Duration + type HealthConfig struct + Enabled bool + MaxPortionSendQueueBytesFull float64 + MaxSendFailRate float64 + MaxTimeSinceMsgReceived time.Duration + MaxTimeSinceMsgSent time.Duration + MinConnectedPeers uint + SendFailRateHalflife time.Duration + type Network interface + Dispatch func() error + ManuallyTrack func(nodeID ids.NodeID, ip netip.AddrPort) + NodeUptime func(subnetID ids.ID) (UptimeResult, error) + PeerInfo func(nodeIDs []ids.NodeID) []peer.Info + StartClose func() + func NewNetwork(config *Config, minCompatibleTime time.Time, msgCreator message.Creator, ...) (Network, error) + func NewTestNetwork(log logging.Logger, networkID uint32, currentValidators validators.Manager, ...) (Network, error) + type PeerListGossipConfig struct + PeerListBloomResetFreq time.Duration + PeerListNumValidatorIPs uint32 + PeerListPullGossipFreq time.Duration + type ThrottlerConfig struct + InboundConnUpgradeThrottlerConfig throttling.InboundConnUpgradeThrottlerConfig + InboundMsgThrottlerConfig throttling.InboundMsgThrottlerConfig + MaxInboundConnsPerSec float64 + OutboundMsgThrottlerConfig throttling.MsgByteThrottlerConfig + type TimeoutConfig struct + PingPongTimeout time.Duration + ReadHandshakeTimeout time.Duration + type UptimeResult struct + RewardingStakePercentage float64 + WeightedAveragePercentage float64