====== Ethereum Wire Protocol (ETH) ====== [[dido:public:ra:xapend:xapend.a_glossary:start| Return to Glossary ]] **Ethereum Wire Protocol (ETH)** or **''eth''**, is a [[dido:public:ra:xapend:xapend.a_glossary:p:protocol]] on the [[dido:public:ra:xapend:xapend.a_glossary:r:rlpx]] [[dido:public:ra:xapend:xapend.a_glossary:t:transportlayer]] that facilitates exchange of Ethereum blockchain information between [[dido:public:ra:xapend:xapend.a_glossary:p:peer | Peers]]. Once a connection is established, a Status message must be sent. Following the reception of the Peer's Status message, the Ethereum session is active, and any other message may be sent. Within a session, three high-level tasks can be performed: chain synchronization, block propagation and transaction exchange. These tasks use disjoint sets of protocol messages, and clients typically perform them as concurrent activities on all Peer connections. Client implementations should enforce limits on protocol message sizes. The underlying RLPx transport limits the size of a single message to 16.7 MiB. The practical limits for the **''eth''** protocol are lower, typically 10 MiB. If a received message is larger than the limit, the Peer should be disconnected. In addition to the hard limit on received messages, clients should also impose 'soft' limits on the requests and responses which they send. The recommended soft limit varies per message type. Limiting requests and responses ensures that concurrent activity, e.g. block synchronization and transaction exchange work smoothly over the same Peer connection. Chain Synchronization Nodes participating in the **''eth''** protocol are expected to have knowledge of the complete chain of all blocks from the genesis block to current, the latest block. The chain is obtained by downloading it from other Peers. Upon connection, both Peers send their **''Status''** message, which includes the Total Difficulty (TD) and hash of their 'best' known block. The client with the worst TD then proceeds to download block headers using the **''GetBlockHeaders''** message. It verifies proof-of-work values in received headers and fetches block bodies using the **''GetBlockBodies''** message. Received blocks are executed using the Ethereum Virtual Machine, recreating the state tree and receipts. Note that header downloads, block body downloads and block execution may happen concurrently. Source: [[https://github.com/ethereum/devp2p/blob/master/caps/eth.md ]] /**=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- /* To add a discussion page to this page, comment out the line that says ~~DISCUSSION:off~~ */ ~~DISCUSSION:on|Outstanding Issues~~ ~~DISCUSSION:off~~