Crate snarkos_network[][src]

Re-exports

pub use config::*;
pub use errors::*;
pub use inbound::*;
pub use message::*;
pub use node::*;
pub use peers::*;
pub use sync::*;

Modules

config
errors
inbound
message
node
peers
sync

Structs

ConnectionStats
DropJoin
HandshakeStats
InboundStats
MiscStats
OutboundStats
QueueStats
Stats

Constants

BLOCK_SYNC_EXPIRATION_SECS

The maximum amount of time allowed to process a single batch of sync blocks. It should be aligned with MAX_BLOCK_SYNC_COUNT.

HANDSHAKE_BOOTNODE_TIMEOUT_SECS

The maximum amount of time in which a handshake with a bootnode can conclude before dropping the connection; it should be no greater than the peer_sync_interval.

HANDSHAKE_PATTERN

The noise handshake pattern.

HANDSHAKE_PEER_TIMEOUT_SECS

The maximum amount of time in which a handshake with a regular node can conclude before dropping the connection; it should be no greater than the peer_sync_interval.

HANDSHAKE_PSK

The pre-shared key for the noise handshake.

INBOUND_CHANNEL_DEPTH

The depth of the common inbound channel.

MAX_BLOCK_SYNC_COUNT

The maximum number of block hashes that can be requested or provided in a single batch.

MAX_MESSAGE_SIZE

The maximum size of a message that can be transmitted in the network.

MAX_PEER_INACTIVITY_SECS

The amount of time after which a peer will be considered inactive an disconnected from if they have not sent any messages in the meantime.

NOISE_BUF_LEN

The spec-compliant size of the noise buffer.

NOISE_TAG_LEN

The spec-compliant size of the noise tag field.

OUTBOUND_CHANNEL_DEPTH

The depth of the per-connection outbound channels.

PROTOCOL_VERSION

The version of the network protocol; it can be incremented in order to force users to update. FIXME: probably doesn’t need to be a u64, could also be more informative than just a number

SHARED_PEER_COUNT

The maximum number of peers shared at once in response to a GetPeers message.

Statics

NODE_STATS

Traits

DropJoinable