-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
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, | ||
} | ||
}); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks good
metadata: EmptyMetadata {}, | ||
data: body, | ||
}; | ||
tokio::task::spawn_blocking(move || { |
There was a problem hiding this comment.
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?!
There was a problem hiding this comment.
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.
733f17c
to
deeb9e5
Compare
Spec: ethereum/builder-specs#104
ForkVersionDecode
in LH. It was required so I could create the relevant axum extractor.JsonOrSszWithFork
extractor which can extract request body data that implsDeserializeOwned
+ForkVersionDecode
.build_response_with_headers
ForkVersionedResponse
& serializes to JSON