Crate reth_ress_protocol

Crate reth_ress_protocol 

Source
Expand description

RESS protocol for stateless Ethereum nodes.

Enables stateless nodes to fetch execution witnesses, bytecode, and block data from stateful peers for minimal on-disk state with full execution capability.

§Node Types

  • Stateless: Minimal state, requests data on-demand
  • Stateful: Full Ethereum nodes providing state data

Valid connections: Stateless ↔ Stateless ✅, Stateless ↔ Stateful ✅, Stateful ↔ Stateful ❌

§Messages

  • NodeType (0x00): Handshake
  • GetHeaders/Headers (0x01/0x02): Block headers
  • GetBlockBodies/BlockBodies (0x03/0x04): Block bodies
  • GetBytecode/Bytecode (0x05/0x06): Contract bytecode
  • GetWitness/Witness (0x07/0x08): Execution witnesses

§Flow

  1. Exchange NodeType for compatibility
  2. Download ancestor blocks via headers/bodies
  3. For new payloads: request witness → get missing bytecode → execute

Protocol version: ress/1

Modules§

test_utilstest-utils
Miscellaneous test utilities.

Structs§

GetHeaders
A request for a peer to return block headers starting at the requested block. The peer must return at most limit headers. The headers will be returned starting at start_hash, traversing towards the genesis block.
ProtocolState
Protocol state is an helper struct to store the protocol events.
RessProtocolConnection
The connection handler for the custom RLPx protocol.
RessProtocolHandler
The protocol handler takes care of incoming and outgoing connections.
RessProtocolMessage
An Ress protocol message, containing a message ID and payload.

Enums§

NodeType
Node type variant.
ProtocolEvent
The events that can be emitted by our custom protocol.
RessMessage
Represents a message in the ress protocol.
RessMessageID
Represents message IDs for ress protocol messages.
RessPeerRequest
Ress peer request.

Traits§

RessProtocolProvider
A provider trait for ress protocol.