Skip to content

Implement builder ssz flow #8

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

Merged
merged 14 commits into from
Mar 11, 2025
Merged

Conversation

eserilev
Copy link
Member

Spec: ethereum/builder-specs#104

  • I've introduced a new trait ForkVersionDecode in LH. It was required so I could create the relevant axum extractor.
  • Added a new JsonOrSszWithFork extractor which can extract request body data that impls DeserializeOwned + ForkVersionDecode.
  • Added SSZ functionality to both the builder api client and server
  • Added a new common fn build_response_with_headers
    • appends content type & consensus version headers to the resopnse
    • in the JSON case, creates a ForkVersionedResponse & serializes to JSON
    • in the SSZ case, encodes to SSZ

metadata: EmptyMetadata {},
data: body,
};
tokio::task::spawn_blocking(move || {
Copy link
Member

Choose a reason for hiding this comment

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

Why are we spawning a new task to just convert to bytes?!

Copy link
Member Author

@eserilev eserilev Feb 11, 2025

Choose a reason for hiding this comment

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

I'm not sure why were spawning a new task, we were doing it in the JSON case in the existing build_response function so I just kept it the same here.

Copy link
Member

Choose a reason for hiding this comment

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

Removed this, i'm not sure why we had this in the first place.

@pawanjay176 pawanjay176 force-pushed the builder-ssz-flow branch 3 times, most recently from c7aee9c to 955a7d9 Compare February 13, 2025 01:57
@pawanjay176 pawanjay176 force-pushed the builder-ssz-flow branch 7 times, most recently from 4f0b63d to a0eb6e8 Compare February 17, 2025 21:37
@pawanjay176 pawanjay176 force-pushed the builder-ssz-flow branch 2 times, most recently from fb9f35e to 4d3bbaa Compare February 19, 2025 03:08
@pawanjay176 pawanjay176 requested a review from realbigsean March 6, 2025 21:00
@pawanjay176
Copy link
Member

Added support for ssz with register_validators as well and added tests.
Also removed the spawn_blocking for byte conversion, I'm not sure why we had it in the first place.

@eserilev can't seem to add you for review. PTAL.

@realbigsean
Copy link
Member

Also removed the spawn_blocking for byte conversion, I'm not sure why we had it in the first place.

AI slop

Copy link
Member

@realbigsean realbigsean left a comment

Choose a reason for hiding this comment

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

Looks really good

@pawanjay176 pawanjay176 merged commit 7e8c5a9 into sigp:main Mar 11, 2025
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.

3 participants