Module p2p

Module p2p 

Source
Expand description

P2P networking integration for guts-node.

This module provides the P2P layer integration using commonware-p2p’s authenticated network for production BFT consensus.

§Channels

The consensus engine requires several P2P channels:

  • Pending: For pending consensus votes (channel 0)
  • Recovered: For recovered messages after reconnection (channel 1)
  • Resolver: For fetching missing certificates (channel 2)
  • Broadcast: For block broadcast messages (channel 3)
  • Marshal: For block sync messages (channel 4)

Structs§

AuthenticatedNetwork
Authenticated P2P network for BFT consensus.
AuthenticatedP2pConfig
Configuration for the authenticated P2P network.
ConsensusChannels
Consensus P2P channels for the simplex engine.
P2PManager
Legacy P2P manager stub for backward compatibility.

Constants§

BROADCAST_CHANNEL
MARSHAL_CHANNEL
MAX_MESSAGE_SIZE
Maximum P2P message size (1MB).
PENDING_CHANNEL
Channel IDs for consensus messaging.
RECOVERED_CHANNEL
RESOLVER_CHANNEL

Functions§

parse_bootstrapper
Parse bootstrapper string in format “pubkey@host:port”.
parse_private_key
Parse a private key from hex string (using seed derivation).
parse_public_key
Parse a public key from hex string.

Type Aliases§

TokioContext
Type alias for the commonware tokio runtime.