Skip to content

Commit

Permalink
add draft builder spec
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain committed Aug 1, 2023
1 parent 6207e5f commit 435d4f4
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions specs/_features/ePBS/builder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ePBS -- Honest Builder

**Notice**: This document is a work-in-progress for researchers and implementers.


## Introduction

This document represents the changes to be made in the code of an "honest builder" to implement ePBS.

## Becoming a builder

### Initialization

A builder must initialize many parameters locally before submitting a deposit and joining the builder registry.

Refer BLS public key and Withdrawal credentials to phase 0 validator spec.

### Submit deposit

TODO:


## Beacon chain responsibilities


### Signed builder bid proposal

At slot `N`, builder constructs `SignedBuilderBid` and broadcasts to `builder_bid` gossip topic for slot `N+1` block proposal.
Builder may submit multiple `SignedBuilderBid` for different chain tips, but builder should only submit one bid per chain tip.


### Signed builder bid reveal

At slot `N+1`, builder observes proposer at `N+1` proposed a block using the bid constructed at `N`. If the proposer used the builder bid, the builder has to make a note for the following duty.

At `SECONDS_PER_SLOT * 2 / INTERVALS_PER_SLOT` seconds, if the builder did not observe equivocation for the block, builder will reveal the payload by broadcasting it to the `execution_payload` gossip topic. By monitoring equivocation, this prevents same-slot unbundling.


### Signed builder bid reveal (conservative mode)

Builder monitors all the beacon attestation subnets and observe all the attestations. Builder should not reveal payload if only few attestations for current slot and many attestations for parent slot and bid is not large enough. This prevents next-slot re-orging
4 changes: 2 additions & 2 deletions specs/_features/ePBS/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This topic is used to propagate execution payload.

The following validations MUST pass before forwarding the `execution_payload` on the network, assuming the alias `payload = execution_payload`:

- _[IGNORE]_ The payload aligns with header that received in block.
- _[IGNORE]_ The hash tree root of the payload matches the hash tree root of a payload header received previously on the `beacon_block` topic.

###### `execution_attestation`

Expand All @@ -73,7 +73,7 @@ The following validations MUST pass before forwarding the `signed_builder_bid` o
- _[REJECT]_ The signed builder bid pubkey, `bid.pubkey`, exists in state.
- _[IGNORE]_ The signed builder bid value, `bid.value`, is less than builder's balance in state.
- _[IGNORE]_ The signed builder header timestamp is correct with respect to next slot -- i.e. `header.timestamp == compute_timestamp_at_slot(state, current_slot + 1)`.
- _[IGNORE]_ The signed builder header parent block has matches one of the chain tip in the fork choice store. Builder may submit multiple bids with respect to forks.
-_[IGNORE]_ The signed builder header parent block matches one of the chain tip(s) in the fork choice store. Builder may submit multiple bids corresponding to various forks.
- _[REJECT]_ The builder signature, `signed_bid.signature`, is valid with respect to the `bid.pubkey`.

#### Transitioning the gossip
Expand Down

0 comments on commit 435d4f4

Please sign in to comment.