ex_wire v0.1.1 API Reference

Modules

Main application for ExWire. We will begin listening on a port when this application is started

Starts a TCP server to handle incoming and outgoing RLPx, DevP2P, Eth Wire connection

Starts a UDP server to handle incoming and outgoing peer to peer messages according to RLPx

General configuration information for ExWire

Helper functions for cryptographic functions of RLPx

Handles framing a message for transport in RLPx

Secrets are used to both encrypt and authenticate incoming and outgoing peer to peer messages

Defines a behavior for all message handlers of RLPx messages

Not currently implemented

Module to handle a response to a Neighbours message, which should be to add the neighbors to the correct K-Buckets

Struct to store parameters from an incoming message

Module to handle a respond to a Ping message, which generate a Pong response

Module to handle a response to a Pong message, which is to do nothing

Implements the RLPx ECIES handshake protocol

Handles wrapping and unwrapping messages according to the specification in Ethereum EIP-8

Simple struct to wrap an auth response

Simple struct to wrap an auth msg

Defines a behavior for messages so that they can be easily encoded and decoded

A wrapper for ExWire’s FindNeighbours message

A wrapper for ExWire’s Neighbours message

A wrapper for ExWire’s Ping message

A wrapper for ExWire’s Pong message

This module will handle the business logic for processing incoming messages from the network. We will, for instance, decide to respond pong to any incoming ping

Struct to define an inbound message from a remote peer

Packets handle serializing and deserializing framed packet data from the DevP2P and Eth Wire Protocols. They also handle how to respond to incoming packets

Eth Wire Packet for getting block bodies from a peer

Eth Wire Packet for getting block headers from a peer

Disconnect is when a peer wants to end a connection for a reason

Request the bodies for a set of blocks by hash

Requests block headers starting from a given hash

This packet establishes capabilities and etc between two peer to peer clents. This is generally required to be the first signed packet communicated after the handshake is complete

Advertises new blocks to the network

Ping is used to determine round-trip time of messages to a peer

Pong is the response to a Ping message

Status messages establish a proper Eth Wire connection, and verify the two clients are compatable

Eth Wire Packet for communicating new transactions

The Peer Supervisor is responsible for maintaining a set of peer TCP connections

Functions to handle encoding and decoding messages for over the wire transfer

A struct for storing blocks as they are transported over the Eth Wire Protocol

A structure to store and process blocks received by peers. The goal of this module is to keep track of partial blocks until we’re ready to add the block to the chain

Struct to represent an endpoint in ExWire

Struct to represent an neighbour in RLPx

Represents a Peer for an RLPx / Eth Wire connection

This is the heart of our syncing logic. Once we’ve connected to a number of peers via ExWire.PeerSup, we begin to ask for new blocks from those peers. As we receive blocks, we add them to our ExWire.Struct.BlockQueue. If the blocks are confirmed by enough peers, then we verify the block and add it to our block tree

Helper functions for getting current time

General helper functions, like for inspection

Exceptions