Class VibeNetworkManager
And implementation of agora
using Vibe.d
Constructors
Name | Description |
---|---|
this
(config, cache, taskman, clock, owner_node, ledger)
|
Construct an instance of this object |
Fields
Name | Type | Description |
---|---|---|
banman
|
BanManager | Address ban manager |
clock
|
Clock | Clock instance |
config
|
const(Config) | Config instance |
connection_tasks
|
agora | Connection tasks for the nodes we're trying to connect to |
last_known_validator_utxos
|
UTXO[geod24 | Most recent validator set |
ledger
|
Ledger | Ledger |
log
|
Logger | Logger instance |
todo_addresses
|
Set!(agora.common.Types.Address) | The list of addresses we have not yet tried to connect to |
Methods
Name | Description |
---|---|
makeBlockExternalizedHandler
(address)
|
See NetworkManager
|
makeBlockHeaderUpdatedHandler
(address)
|
See NetworkManager
|
makeDNSResolver
(peers)
|
See NetworkManager
|
makePreImageReceivedHandler
(address)
|
See NetworkManager
|
makeRegistryClient
(address)
|
See NetworkManager
|
makeTransactionReceivedHandler
(address)
|
See NetworkManager
|
discover
(required_peer_utxos)
|
Discover the network, connect to all required peers Some nodes may want to connect to specific peers before discovery() is considered complete |
discoverFromClient
(api)
|
|
getBanManager
()
|
Returns an already instantiated version of the BanManager
(please also see NetworkManager )
|
getBlocksFrom
(height, onReceivedBlocks)
|
Retrieve blocks starting from height up to the highest block that's available from the connected nodes. |
getMissingBlockSigs
(ledger, potentialExtraSigs, acceptHeader)
|
Retrieve any missing block signatures from the connected nodes for blocks since the last fee payment block. |
getNetTimeOffset
(threshold, time_offset)
|
Retrieve the clock time of each node in the given quorum set, and return the median time. |
getNetworkInfo
()
|
|
getPeerByStake
(utxo)
|
|
getUnknownTXs
(ledger)
|
Try to retrieve TXs that this node does not have in its pool but have seen the hash in nominations |
gossipBlockSignature
(block_sig)
|
Gossips the ValidatorBlockSig to the network of connected validators. |
makeRegistryClient
()
|
Instantiates a client object implementing NameRegistryAPI
|
onRegisterName
()
|
register network addresses into the name registry |
onValidatorSetChanged
(validator_utxos)
|
Called when validator set is changed |
peers
()
|
|
setRegistry
(registry)
|
Set the instance of the NameRegistry to use
|
shutdown
()
|
Shut down timers & dump the metadata |
startPeriodicNameRegistration
()
|
Periodically registers network addresses |
unwhitelist
(utxo)
|
Unwhitelist a Hash of a UTXO to allow banning it |
validators
()
|
|
whitelist
(utxo)
|
Whitelist a Hash of a UTXO to avoid banning it |
makeClient
(url)
|
See NetworkManager
|
makeBanManager
(banman_conf, clock, cache)
|
Get a BanManager instance. |