Skip to content

Add builder SSZ flow - #6859

Merged
mergify[bot] merged 21 commits into
sigp:unstablefrom
eserilev:add-builder-ssz-flow
Feb 3, 2025
Merged

mergify[bot] merged 21 commits into
sigp:unstablefrom
eserilev:add-builder-ssz-flow

Conversation

@eserilev

@eserilev eserilev commented Jan 24, 2025

Copy link
Copy Markdown
Member

Closes: #6514

  • Added DecodeByFork trait. This is required for an axum extractor I introduced in this PR
  • Added an AtomicBool field on the builder client struct. When set to true, it indicates that SSZ is enabled for the builder. This flag is updated each time a response is received from GET builder/header.
  • When a validator requests a blinded payload, we accept both JSON and SSZ but indicate a preference for SSZ
  • Added logic to fallback to JSON if any response headers are missing

@eserilev eserilev added work-in-progress PR is a work-in-progress electra Required for the Electra/Prague fork builder API labels Jan 24, 2025
@eserilev eserilev mentioned this pull request Jan 27, 2025
2 tasks
@eserilev eserilev changed the title Add builder SSZ flow [WIP] Add builder SSZ flow Jan 27, 2025
Comment thread beacon_node/builder_client/src/lib.rs
Comment thread beacon_node/builder_client/src/lib.rs
@eserilev eserilev added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Feb 1, 2025

@michaelsproul michaelsproul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice! Looks good

use serde_json::value::Value;
use std::sync::Arc;

pub trait ForkVersionDecode: Sized {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like this. Nice improvement

@michaelsproul

Copy link
Copy Markdown
Member

I made a few tiny changes in this commit:

3eee2d1

Mostly just deleting a redundant from_ssz_bytes function.

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Feb 3, 2025
mergify Bot added a commit that referenced this pull request Feb 3, 2025
@mergify
mergify Bot merged commit 1e2b547 into sigp:unstable Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builder API electra Required for the Electra/Prague fork ready-for-merge This PR is ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants