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

Add builder SSZ flow #6859

Merged
merged 21 commits into from
Feb 3, 2025
Merged

Add builder SSZ flow #6859

merged 21 commits into from
Feb 3, 2025

Conversation

eserilev
Copy link
Collaborator

@eserilev eserilev commented Jan 24, 2025

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
@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
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Very nice! Looks good

@@ -4,6 +4,11 @@ use serde::{Deserialize, Deserializer, Serialize};
use serde_json::value::Value;
use std::sync::Arc;

pub trait ForkVersionDecode: Sized {
Copy link
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
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
31 checks passed
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