Crate p2p
Expand description
Provides abstractions and commonly used types for p2p.
§Feature Flags
test-utils
: Export utilities for testing
Modules§
- bodies
- Traits for implementing P2P block body clients.
- download
- Shared abstractions for downloader implementations.
- either
- A downloader that combines two different downloaders/client implementations. Support for different download types.
- error
- Error types broadly used by p2p interfaces for any operation which may produce an error when interacting with the network implementation
- full_
block - An implementation that uses headers and bodies traits to download full blocks
- headers
- Traits for implementing P2P Header Clients. Also includes implementations
of a Linear and a Parallel downloader generic over the
Consensus
andHeadersClient
. - priority
- Priority enum for
BlockHeader
andBlockBody
requests - sync
- Syncing related traits. Traits used when interacting with the sync status of the network.
- test_
utils test-utils
- Common test helpers for mocking out Consensus, Downloaders and Header Clients.
Traits§
- Block
Client - Helper trait that unifies network behaviour needed for fetching entire blocks.
- Bodies
Client - A client capable of downloading block bodies.
- EthBlock
Client - The
BlockClient
providing Ethereum block parts. - Headers
Client - The block headers downloader client