-
Notifications
You must be signed in to change notification settings - Fork 2
feat(submit): pylon blob preloading integration #215
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
base: main
Are you sure you want to change the base?
Conversation
prestwich
left a comment
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 the task is too heavy. we just need a fire-and-forget dispatch in the flashbots spawned future. I also think we're duplicating the sidecar and passing it around too much?
src/tasks/submit/flashbots.rs
Outdated
| /// Builds a MEV bundle from a signed transaction envelope and simulation result. | ||
| fn build_bundle(&self, envelope: &TxEnvelope, sim_result: &SimResult) -> EthSendBundle { | ||
| let tx_bytes: Bytes = envelope.encoded_2718().into(); | ||
| let txs = self.build_bundle_body(sim_result, tx_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.
refactor while we're here: the build_bundle_body method doesn't use self. which implies that it is on the wrong type. what type should it be on?
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 something i was kinda pondering before, along with sidecar things. both building the sidecar, and the bundle body, could live on SimResult? it doesn't really change once returned, so it could just be memoized
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.
that seems fine
452582a to
c53b448
Compare
091a379 to
fb4b0e1
Compare
prestwich
left a comment
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.
just this afaict
| "Submitted MEV bundle to Flashbots, received OK response" | ||
| ); | ||
|
|
||
| match pylon.post_blob_tx(block_tx).await { |
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 too much nesting. refactor to use early returns and avoid nesting matches

No description provided.