TARAXA
|
Classes | |
struct | Capability |
class | CapabilityFace |
The Capability interface. This interface has to be implemented to support any devp2p subprotocol. More... | |
struct | DiscoveryDatagram |
struct | ECDHEError |
The ECDHE agreement failed during RLPx handshake. More... | |
class | EndpointTracker |
class | ENR |
Class representing Ethereum Node Record - see EIP-778. More... | |
struct | ENRRequest |
struct | ENRResponse |
struct | FindNode |
struct | Host |
The Host class Capabilities should be registered prior to startNetwork, since m_capabilities is not thread-safe. More... | |
class | IdentitySchemeV4 |
struct | InvalidPublicIPAddress |
struct | Neighbours |
class | Network |
Network Class Static network operations and interface(s). More... | |
struct | NetworkConfig |
struct | NetworkRestartNotSupported |
struct | NetworkStartRequired |
class | Node |
struct | NodeEntry |
Entry in Node Table. More... | |
struct | NodeInfo |
class | NodeIPEndpoint |
IPv4,UDP/TCP endpoints. More... | |
struct | NodeSpec |
class | NodeTable |
class | NodeTableEventHandler |
class | Peer |
Representation of connectivity state and all other pertinent Peer metadata. A Peer represents connectivity between two nodes, which in this case, are the host and remote nodes. More... | |
struct | PeerSessionInfo |
struct | PingNode |
struct | Pong |
struct | RLPXDatagramFace |
RLPX Datagram which can be signed. More... | |
class | RLPXFrameCoder |
Encoder/decoder transport for RLPx connection established by RLPXHandshake. More... | |
class | RLPXFrameCoderImpl |
struct | RLPXFrameInfo |
Encapsulation of Frame. More... | |
struct | RLPXHandshake |
Setup inbound or outbound connection for communication over RLPXFrameCoder. RLPx Spec: https://github.com/ethereum/devp2p/blob/master/rlpx.md#encrypted-handshake. More... | |
struct | RLPXInvalidPacket |
class | RLPXPacket |
class | RLPXSocket |
Shared pointer wrapper for ASIO TCP socket. More... | |
struct | Session |
The Session class. More... | |
struct | SessionCapability |
struct | TaraxaNetworkConfig |
class | UDPDatagram |
class | UDPSocket |
UDP Interface Handler must implement UDPSocketEvents. More... | |
struct | UDPSocketEvents |
Interface which a UDPSocket's owner must implement. More... | |
struct | UDPSocketFace |
Interface which UDPSocket will implement. More... | |
class | UPnP |
Typedefs | |
using | NodeID = h512 |
using | CapDesc = std::pair< std::string, unsigned > |
using | CapDescs = std::vector< CapDesc > |
using | PeerSessionInfos = std::vector< PeerSessionInfo > |
using | CapabilityNameAndVersion = CapDesc |
using | Capabilities = std::map< CapabilityNameAndVersion, Capability > |
using | SessionCapabilities = std::map< std::string, SessionCapability > |
Enumerations | |
enum | P2pPacketType { HelloPacket = 0 , DisconnectPacket , PingPacket , PongPacket , UserPacket = 0x10 } |
enum | DisconnectReason { DisconnectRequested = 0 , TCPError , BadProtocol , UselessPeer , TooManyPeers , DuplicatePeer , IncompatibleProtocol , NullIdentity , ClientQuit , UnexpectedIdentity , LocalIdentity , PingTimeout , UserReason = 0x10 , NoDisconnect = 0xffff } |
enum class | HandshakeFailureReason { NoFailure = 0 , UnknownFailure , Timeout , TCPError , FrameDecryptionFailure , InternalError , ProtocolError , DisconnectRequested } |
enum class | PeerType { Optional , Required } |
enum | NodeTableEventType { NodeEntryAdded , NodeEntryDropped , NodeEntryScheduledForEviction } |
Variables | |
const NodeIPEndpoint | UnspecifiedNodeIPEndpoint = NodeIPEndpoint{{}, 0, 0} |
const Node | UnspecifiedNode = Node{{}, UnspecifiedNodeIPEndpoint} |
constexpr unsigned | c_protocolVersion = 1029 |
Peer network protocol version. | |
constexpr const char * | c_localhostIp = "127.0.0.1" |
constexpr unsigned short | c_defaultListenPort = 30303 |
struct dev::p2p::PeerSessionInfo |
struct dev::p2p::TaraxaNetworkConfig |
Class Members | ||
---|---|---|
unsigned | chain_id = 0 | |
uint | expected_parallelism = 1 | |
unsigned | ideal_peer_count = 11 | |
bool | is_boot_node = false | |
seconds | log_active_peers_interval {30} | |
milliseconds | main_loop_interval {100} | |
seconds | peer_healthcheck_interval {30} | |
seconds | peer_healthcheck_timeout {1} | |
unsigned | peer_stretch = 7 |
using dev::p2p::Capabilities = typedef std::map<CapabilityNameAndVersion, Capability> |
using dev::p2p::CapDesc = typedef std::pair<std::string, unsigned> |
using dev::p2p::CapDescs = typedef std::vector<CapDesc> |
using dev::p2p::PeerSessionInfos = typedef std::vector<PeerSessionInfo> |
using dev::p2p::SessionCapabilities = typedef std::map<std::string, SessionCapability> |
|
strong |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRInvalidAddress | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRIsTooBig | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRKeysAreNotUniqueSorted | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRSecp256k1NotFound | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRSignatureIsInvalid | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRUnknownIdentityScheme | ) |
bool dev::p2p::isAllowedEndpoint | ( | bool | _allowLocalDiscovery, |
NodeIPEndpoint const & | _endpointToCheck | ||
) |
|
static |
|
inline |
|
inline |
|
inline |
ostream & dev::p2p::operator<< | ( | ostream & | _out, |
NodeIPEndpoint const & | _ep | ||
) |
std::ostream & dev::p2p::operator<< | ( | std::ostream & | _out, |
NodeIPEndpoint const & | _ep | ||
) |
Simple stream output for a NodeIPEndpoint.
|
inline |
char const * dev::p2p::p2pPacketTypeToString | ( | P2pPacketType | _packetType | ) |
std::string dev::p2p::reasonOf | ( | DisconnectReason | _r | ) |
const Node dev::p2p::UnspecifiedNode = Node{{}, UnspecifiedNodeIPEndpoint} |
const NodeIPEndpoint dev::p2p::UnspecifiedNodeIPEndpoint = NodeIPEndpoint{{}, 0, 0} |