Documentation
¶
Index ¶
Constants ¶
View Source
const (
TCP = "tcp"
)
Networking constants
Variables ¶
View Source
var ( // Version is the version of this code Version = version.NewDefaultVersion(constants.PlatformName, 1, 0, 2) )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
genesis.Params
// protocol to use for opening the network interface
Nat nat.Router
// Attempted NAT Traversal did we attempt
AttemptedNATTraversal bool
// ID of the network this node should connect to
NetworkID uint32
// Assertions configuration
EnableAssertions bool
// Crypto configuration
EnableCrypto bool
// Database to use for the node
DB database.Database
// Staking configuration
StakingIP utils.IPDesc
EnableP2PTLS bool
EnableStaking bool
StakingKeyFile string
StakingCertFile string
DisabledStakingWeight uint64
MaxNonStakerPendingMsgs uint
StakerMSGPortion float64
StakerCPUPortion float64
// Network configuration
NetworkConfig timer.AdaptiveTimeoutConfig
// Benchlist Configuration
BenchlistConfig benchlist.Config
// Bootstrapping configuration
BootstrapPeers []*Peer
// HTTP configuration
HTTPHost string
HTTPPort uint16
HTTPSEnabled bool
HTTPSKeyFile string
HTTPSCertFile string
APIRequireAuthToken bool
APIAuthPassword string
// Enable/Disable APIs
AdminAPIEnabled bool
InfoAPIEnabled bool
KeystoreAPIEnabled bool
MetricsAPIEnabled bool
HealthAPIEnabled bool
// Logging configuration
LoggingConfig logging.Config
// Plugin directory
PluginDir string
// Consensus configuration
ConsensusParams avalanche.Parameters
// Throughput configuration
ThroughputPort uint16
ThroughputServerEnabled bool
// IPC configuration
IPCAPIEnabled bool
IPCPath string
IPCDefaultChainIDs []string
// Router that is used to handle incoming consensus messages
ConsensusRouter router.Router
ConsensusGossipFrequency time.Duration
ConsensusShutdownTimeout time.Duration
}
Config contains all of the configurations of an Avalanche node.
type Node ¶
type Node struct {
Log logging.Logger
LogFactory logging.Factory
HTTPLog logging.Logger
// This node's unique ID used when communicating with other nodes
// (in consensus, for example)
ID ids.ShortID
// Storage for this node
DB database.Database
// dispatcher for events as they happen in consensus
DecisionDispatcher *triggers.EventDispatcher
ConsensusDispatcher *triggers.EventDispatcher
IPCs *ipcs.ChainIPCs
// Net runs the networking stack
Net network.Network
// Handles HTTP API calls
APIServer api.Server
// This node's configuration
Config *Config
// contains filtered or unexported fields
}
Node is an instance of an Avalanche node.
func (*Node) Initialize ¶
Initialize this node
Click to show internal directories.
Click to hide internal directories.