Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PlatformName exports the name of the platform PlatformName = "avalanche" // AppName exports the name of the avalanche application AppName = "avalanchego" )
Const variables to be exported
View Source
const ( MainnetID uint32 = 1 CascadeID uint32 = 2 DenaliID uint32 = 3 EverestID uint32 = 4 FujiID uint32 = 5 TestnetID uint32 = FujiID UnitTestID uint32 = 10 LocalID uint32 = 12345 MainnetName = "mainnet" CascadeName = "cascade" DenaliName = "denali" EverestName = "everest" FujiName = "fuji" TestnetName = "testnet" UnitTestName = "testing" LocalName = "local" MainnetHRP = "avax" CascadeHRP = "cascade" DenaliHRP = "denali" EverestHRP = "everest" FujiHRP = "fuji" UnitTestHRP = "testing" LocalHRP = "local" FallbackHRP = "custom" )
Const variables to be exported
View Source
const ( // The network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket". NetworkType = "tcp" DefaultMaxMessageSize = 2 * units.MiB DefaultPingPongTimeout = 30 * time.Second DefaultPingFrequency = 3 * DefaultPingPongTimeout / 4 DefaultByteSliceCap = 128 MaxContainersLen = int(4 * DefaultMaxMessageSize / 5) DefaultNetworkPeerListNumValidatorIPs = 15 DefaultNetworkPeerListValidatorGossipSize = 20 DefaultNetworkPeerListNonValidatorGossipSize = 0 DefaultNetworkPeerListPeersGossipSize = 10 DefaultNetworkPeerListGossipFreq = time.Minute DefaultNetworkPeerListPullGossipFreq = 2 * time.Second DefaultNetworkPeerListBloomResetFreq = time.Minute // Inbound Connection Throttling DefaultInboundConnUpgradeThrottlerCooldown = 10 * time.Second DefaultInboundThrottlerMaxConnsPerSec = 256 // Outbound Connection Throttling DefaultOutboundConnectionThrottlingRps = 50 DefaultOutboundConnectionTimeout = 30 * time.Second // Timeouts DefaultNetworkInitialTimeout = 5 * time.Second DefaultNetworkMinimumTimeout = 2 * time.Second DefaultNetworkMaximumTimeout = 10 * time.Second DefaultNetworkMaximumInboundTimeout = 10 * time.Second DefaultNetworkTimeoutHalflife = 5 * time.Minute DefaultNetworkTimeoutCoefficient = 2 DefaultNetworkReadHandshakeTimeout = 15 * time.Second DefaultNetworkCompressionType = compression.TypeZstd DefaultNetworkMaxClockDifference = time.Minute DefaultNetworkRequireValidatorToConnect = false DefaultNetworkPeerReadBufferSize = 8 * units.KiB DefaultNetworkPeerWriteBufferSize = 8 * units.KiB DefaultNetworkTCPProxyEnabled = false // The PROXY protocol specification recommends setting this value to be at // least 3 seconds to cover a TCP retransmit. // Ref: https://www.haproxy.org/download/2.3/doc/proxy-protocol.txt // Specifying a timeout of 0 will actually result in a timeout of 200ms, but // a timeout of 0 should generally not be provided. DefaultNetworkTCPProxyReadTimeout = 3 * time.Second // Benchlist DefaultBenchlistFailThreshold = 10 DefaultBenchlistDuration = 15 * time.Minute DefaultBenchlistMinFailingDuration = 2*time.Minute + 30*time.Second // Router DefaultConsensusAppConcurrency = 2 DefaultConsensusShutdownTimeout = time.Minute DefaultFrontierPollFrequency = 100 * time.Millisecond // Inbound Throttling DefaultInboundThrottlerAtLargeAllocSize = 6 * units.MiB DefaultInboundThrottlerVdrAllocSize = 32 * units.MiB DefaultInboundThrottlerNodeMaxAtLargeBytes = DefaultMaxMessageSize DefaultInboundThrottlerMaxProcessingMsgsPerNode = 1024 DefaultInboundThrottlerBandwidthRefillRate = 512 * units.KiB DefaultInboundThrottlerBandwidthMaxBurstSize = DefaultMaxMessageSize DefaultInboundThrottlerCPUMaxRecheckDelay = 5 * time.Second DefaultInboundThrottlerDiskMaxRecheckDelay = 5 * time.Second MinInboundThrottlerMaxRecheckDelay = time.Millisecond // Outbound Throttling DefaultOutboundThrottlerAtLargeAllocSize = 32 * units.MiB DefaultOutboundThrottlerVdrAllocSize = 32 * units.MiB DefaultOutboundThrottlerNodeMaxAtLargeBytes = DefaultMaxMessageSize // Network Health DefaultHealthCheckAveragerHalflife = 10 * time.Second DefaultNetworkHealthMaxTimeSinceMsgSent = time.Minute DefaultNetworkHealthMaxTimeSinceMsgReceived = time.Minute DefaultNetworkHealthMaxPortionSendQueueFill = 0.9 DefaultNetworkHealthMinPeers = 1 DefaultNetworkHealthMaxSendFailRate = .9 // Metrics DefaultUptimeMetricFreq = 30 * time.Second // Delays DefaultNetworkInitialReconnectDelay = time.Second DefaultNetworkMaxReconnectDelay = time.Minute )
View Source
const ( PlatformVMName = "platformvm" AVMName = "avm" EVMName = "evm" SubnetEVMName = "subnetevm" XSVMName = "xsvm" )
View Source
const ChainAliasPrefix string = "bc"
ChainAliasPrefix denotes a prefix for an alias that belongs to a blockchain ID.
View Source
const PointerOverhead = 8
PointerOverhead is used to approximate the memory footprint from allocating a pointer.
Variables ¶
View Source
var ( // ActivatedACPs is the set of ACPs that are activated. // // See: https://github.com/orgs/avalanche-foundation/projects/1 ActivatedACPs = set.Of[uint32]( 23, 24, 25, 30, 31, 41, 62, ) // CurrentACPs is the set of ACPs that are currently, at the time of // release, marked as implementable and not activated. // // See: https://github.com/orgs/avalanche-foundation/projects/1 CurrentACPs = set.Of[uint32]() // ScheduledACPs are the ACPs included into the next upgrade. ScheduledACPs = set.Of[uint32]() )
View Source
var ( PrimaryNetworkID = ids.Empty PlatformChainID = ids.Empty NetworkIDToNetworkName = map[uint32]string{ MainnetID: MainnetName, CascadeID: CascadeName, DenaliID: DenaliName, EverestID: EverestName, FujiID: FujiName, UnitTestID: UnitTestName, LocalID: LocalName, } NetworkNameToNetworkID = map[string]uint32{ MainnetName: MainnetID, CascadeName: CascadeID, DenaliName: DenaliID, EverestName: EverestID, FujiName: FujiID, TestnetName: TestnetID, UnitTestName: UnitTestID, LocalName: LocalID, } NetworkIDToHRP = map[uint32]string{ MainnetID: MainnetHRP, CascadeID: CascadeHRP, DenaliID: DenaliHRP, EverestID: EverestHRP, FujiID: FujiHRP, UnitTestID: UnitTestHRP, LocalID: LocalHRP, } NetworkHRPToNetworkID = map[string]uint32{ MainnetHRP: MainnetID, CascadeHRP: CascadeID, DenaliHRP: DenaliID, EverestHRP: EverestID, FujiHRP: FujiID, UnitTestHRP: UnitTestID, LocalHRP: LocalID, } ProductionNetworkIDs = set.Of(MainnetID, FujiID) ValidNetworkPrefix = "network-" ErrParseNetworkName = errors.New("failed to parse network name") )
Variables to be exported
Functions ¶
func NetworkName ¶
NetworkName returns a human readable name for the network with ID [networkID]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.