Skip to content

Implement builder ssz flow - #8

Merged
pawanjay176 merged 14 commits into
sigp:mainfrom
eserilev:builder-ssz-flow
Mar 11, 2025
Merged

pawanjay176 merged 14 commits into
sigp:mainfrom
eserilev:builder-ssz-flow

Conversation

@eserilev

Copy link
Copy Markdown
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

Comment thread builder-server/src/server.rs
Comment thread common/src/lib.rs Outdated
metadata: EmptyMetadata {},
data: body,
};
tokio::task::spawn_blocking(move || {

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.

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

@eserilev eserilev Feb 11, 2025

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

AI slop

Comment thread builder-server/src/server.rs Outdated
Comment thread builder-server/src/server.rs Outdated

@realbigsean realbigsean 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.

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