package
0.0.0-20220616152218-3da4c06c590a
Repository: https://github.com/astra-net/astra-network.git
Documentation: pkg.go.dev
# README
Node struct is the core entity that represents a network node participating in the Astra protocol.
A node is the main message handler to all kinds of protocol messages such as consensus message, block sync, transactions etc. A node contains all the necessary references to other objects (e.g. blockchain object and consensus object) to handle the incoming messages.
# Packages
No description provided by the author
# Functions
GenerateRandomString generates a random string with given length.
New creates a new node.
NewDNSSyncingPeerProvider returns a provider that uses given DNS name and port number to resolve syncing peers.
NewLegacySyncingPeerProvider creates and returns a new node-based syncing peer provider.
NewLocalSyncingPeerProvider returns a provider that synthesizes syncing peers given the network configuration.
# Constants
2000 * (numShards - 1).
MsgChanBuffer is the buffer of consensus message handlers.
NumTryBroadCast is the number of times trying to broadcast.
Constants of proposing a new block.
Constants related to doing syncing.
SyncIDLength is the length of bytes for syncID.
# Structs
DNSSyncingPeerProvider uses the given DNS zone to resolve syncing peers.
LegacySyncingPeerProvider uses neighbor lists stored in a Node to serve syncing peer list query.
LocalSyncingPeerProvider uses localnet deployment convention to synthesize syncing peers.
Node represents a protocol-participating node in the network.
# Interfaces
SyncingPeerProvider is an interface for getting the peers in the given shard.