-
Notifications
You must be signed in to change notification settings - Fork 11
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
Initial implementation #1
Conversation
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.
Amazing, looks good, lets merge and test it!
/// Structure to deserialize execution payloads sent according to the builder api spec | ||
/// Numeric fields deserialized as decimals (unlike crate::eth::engine::ExecutionPayload) | ||
#[derive(Derivative)] | ||
#[derivative(Debug)] | ||
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
#[allow(missing_docs)] |
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 do you need new types here? Seems like maintain headache, do we need to make the deser logic better?
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.
This is really just because of difference in the formatting of the current api that we are using (snake_case and decimal encoded numbers).
I agree this is a headache and we should probably just use the existing formatting (camelCase and hex numbers), in which case we can drop these additional types and just use the existing ExecutionPayload
struct.
@alextes What do you think ? (as is we will have to adjust the client code anyway because this api is differs from the existing one already)
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.
If we do that I could probably also remove these re-exports from my pr against the reth repo. (if they are unwanted)
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 opened an issue for this, and suggest doing this in a separate PR:
#2
Basically reimplementing ultrasoundmoney/reth#5 but using reth as a library instead of forking it.
Reference:
https://www.libevm.com/2023/09/01/reth-custom-api/
https://github.com/paradigmxyz/reth/blob/main/examples/additional-rpc-namespace-in-cli/src/main.rs