Skip to main content

RelayData

MEV relay connection information for Proposer-Builder Separation (PBS).

Overview

RelayData represents MEV relay connection information used in PBS. Relays act as trusted intermediaries between block builders and validators, ensuring builders cannot see validator signatures before block delivery.

Type Definition (Zig)

// Represent relay URL as string; use [48]u8 for BLS pubkeys; slot as u64, parentHash as Hash.

Well-Known Relays

// Common relays:
// - https://relay.flashbots.net
// - https://bloxroute.max-profit.bloxroute.com
// - https://bloxroute.regulated.bloxroute.com
// - https://relay.edennetwork.io
// - https://mainnet-relay.securerpc.com
// - https://relay.ultrasound.money
// - https://agnostic-relay.net

Usage

Create RelayData

// Model as a Zig struct in your application; no built-in helpers are required here.

Get API Endpoint

// Endpoint examples:
// https://relay.flashbots.net/eth/v1/builder/header

API Reference

Constructors

FunctionDescription
from(data)Create from RelayDataLike object

Methods

FunctionDescription
getEndpoint(relay, method)Construct full API endpoint URL

Constants

ConstantDescription
MEV_RELAYSWell-known relay endpoints

MEV-Boost API Endpoints

Common relay API methods:
EndpointDescription
/eth/v1/builder/headerRequest block header bid
/eth/v1/builder/blinded_blocksSubmit blinded block
/eth/v1/builder/statusCheck relay status
/relay/v1/data/bidtracesQuery bid traces

Example: Request Block Header

// GET {relay}/eth/v1/builder/header/{slot}/{parent_hash}/{proposer_fee_recipient}
// Use std.http.Client in Zig to request if implementing client-side.

PBS Flow

Builder                    Relay                      Proposer
   |                         |                            |
   |--[submit block bid]---->|                            |
   |                         |--[header+bid]------------->|
   |                         |                            |
   |                         |<--[signed header]----------|
   |                         |                            |
   |<--[request payload]-----|                            |
   |--[block payload]------->|                            |
   |                         |--[full block]------------->|
  1. Builder submits block bid to relay
  2. Relay forwards best header to proposer
  3. Proposer signs header (commits to block)
  4. Relay releases block to builder
  5. Builder sends full payload
  6. Relay forwards to proposer for broadcast

Relay Selection

Consider when selecting relays:
  • Censorship: Some relays filter transactions (OFAC compliance)
  • Reputation: Relay uptime and reliability
  • Diversity: Using multiple relays reduces centralization risk
  • Geographic: Latency affects bid competitiveness
// Use multiple relay endpoints for redundancy

See Also