-
Notifications
You must be signed in to change notification settings - Fork 236
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
fix: types inside mev_calls.rs #1435
Conversation
@@ -125,7 +125,7 @@ pub struct SimBundleOverrides { | |||
pub gas_limit: Option<u64>, | |||
/// Base fee used for simulation, defaults to parentBlock.baseFeePerGas | |||
#[serde(default, with = "alloy_serde::quantity::opt", skip_serializing_if = "Option::is_none")] | |||
pub base_fee: Option<u64>, | |||
pub base_fee: Option<u128>, |
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 think we can keep u64 here tbh
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.
Tried to keep it consistent with
pub base_fee: Option<u128>, |
#[serde(rename = "profit")] | ||
pub total_profit: U256, |
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 don't see the json marshalling impl of this so I really have no ideal what the field is supposed to be called.
this change is now pretty redundant because this will still serializes as profit, but I really don't know if this is correct?
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.
mev_share docs mentions "profit" in the rpc response(https://docs.flashbots.net/flashbots-auction/advanced/rpc-endpoint#mev_simbundle), and the golang implementation also renames TotalProfit to profit: https://github.com/flashbots/builder/blob/df9c765067d57ab4b2d0ad39dbb156cbe4965778/internal/ethapi/sbundle_api.go#L285
Maybe we can just call it profit because there doesnt seem to be any major difference semantically between the two and the bundle spec requires "profit"
…oy into fix/bundle_response_types
…oy into fix/bundle_response_types
@mattsse also added |
Motivation
ref: paradigmxyz/reth#9472
Some types in mev_calls.rs are wrong
Solution
Updated types according to flashbots builder implementation: https://github.com/flashbots/builder/blob/df9c765067d57ab4b2d0ad39dbb156cbe4965778/core/sbundle_sim.go#L26
PR Checklist