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

Implement builder ssz flow #8

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

Conversation

eserilev
Copy link

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 on lines -68 to -79
let fork_name = match &payload {
FullPayloadContents::Payload(payload) => payload.fork_name(),
FullPayloadContents::PayloadAndBlobs(payload_and_blobs) => {
payload_and_blobs.execution_payload.fork_name()
}
};
ForkVersionedResponse {
version: Some(fork_name),
metadata: EmptyMetadata {},
data: payload,
}
});
Copy link
Author

Choose a reason for hiding this comment

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

@pawanjay176 I've removed this and am instead figuring out the fork name based on block.slot(). I think that should be ok?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah looks good

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.

2 participants