Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimental: local Block Builder API #116

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

dmarzzz
Copy link

@dmarzzz dmarzzz commented Apr 8, 2024

Description

This PR proposes a minimal standardized interface for block construction and transaction management between the Sequencer and a local Block Builder. Separating Block Building from the Sequencer's Execution Engine offers chain operators a way to modify block building rules without creating a large divergence from the upstream OP Stack Client, allowing different chains in the superchain to supply their own block building systems as a way to differentiate.

The goal of this proposal is to introduce a minimal and unopinionated Builder API to unlock innovation, not to define a market structure such as PBS for the superchain.

@dmarzzz dmarzzz changed the title Builder API: initial proposal experimental: initial Builder API proposal Apr 8, 2024
@dmarzzz dmarzzz closed this Apr 8, 2024
@dmarzzz dmarzzz reopened this Apr 8, 2024
@dmarzzz
Copy link
Author

dmarzzz commented Apr 8, 2024

getting an error when running the lint fixer:

error: Recipe `lint-specs-md-fix` failed on line 23 with exit code 1

@tynes
Copy link
Contributor

tynes commented Apr 9, 2024

Do you mind converting the image files to mermaid? ChatGPT can help with this, you can upload the file and ask it to convert and then you will need to do some manual editing

@dmarzzz dmarzzz changed the title experimental: initial Builder API proposal experimental: local Block Builder API Apr 23, 2024
dmarzzz and others added 3 commits April 23, 2024 17:39
Co-authored-by: Leonardo Arias <leo@flashbots.net>

## Overview

This document provides an in-depth specification for integrating a Builder API within the Optimism Protocol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit: nothing about this proposal enshrines PBS into the protocol but saying "within the Optimism Protocol" makes it sound like ePBS

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, will change to "Optimism Stack". I was a bit confused because /specs defines "the plain english specs for Optimism, a minimal optimistic rollup protocol" but this change is actually for the "Optimism Stack".

@dmarzzz
Copy link
Author

dmarzzz commented May 20, 2024

When thinking through Interop builder setting I realized that we should maybe also include the chainID in the request... tradeoff is its not useful at all in single chain world and increase request payload


### Requesting a Block

The block request mechanism ***MUST*** be triggered when the Driver schedules a new Fork Choice Update on the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you clarify what the Driver entity is here

OPS->> BB: builder_getPayloadV1
BB-->>OPS: BuilderPayloadV1
OPS-->>OPS: SimulatePayload
OPS-->>OPS: ConfirmPaylaod

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
OPS-->>OPS: ConfirmPaylaod
OPS-->>OPS: ConfirmPayload


This structure represents the Block Builder's response to the request for payload.

- `executionPayload`: `ExecutionPayloadV2`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be updated to ExecutionPayloadV3?

- `parentHash`:  `Hash32`
- `pubKey`: `Address`
- `gasLimit`: `uint256`
- `parentBeaconBlockRoot`: `Hash32`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this used for? no need for timestamp?

Note right of Builder: timespan for building blocks
OPS->> BB: builder_getPayloadV1
BB-->>OPS: BuilderPayloadV1
OPS-->>OPS: SimulatePayload

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is the payload simulated and confirmed? is it via rpc to the exec engine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants