-
Notifications
You must be signed in to change notification settings - Fork 0
feat: adds a flashbots provider #158
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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
91e0f7c
to
178ed31
Compare
178ed31
to
7f24250
Compare
26149ac
to
d275db4
Compare
d275db4
to
514db31
Compare
a308c0a
to
b83f0e2
Compare
514db31
to
14fa362
Compare
b83f0e2
to
60c3b30
Compare
14fa362
to
cb97db3
Compare
0d8762a
to
017a945
Compare
bbde89d
to
a6aac19
Compare
- adds a Flashbots provider with the alloy MEV API extensions - adds the logic for building Flashbots bundles in the builder - adds the Flashbots submission task
a6aac19
to
bf0b272
Compare
bf0b272
to
25f69fa
Compare
Ok(Some(hash)) => { | ||
tracing::info!(host_block_number = sim_result.host_block_number(), bundle_hash = ?hash, "bundle submitted to flashbots"); | ||
span_debug!(span, "bundle submitted to flashbots"); | ||
} | ||
Ok(None) => { | ||
tracing::info!( | ||
host_block_number = sim_result.host_block_number(), | ||
"bundle submitted to flashbots without error" | ||
); | ||
}) | ||
.inspect_err(|err| { | ||
span_error!(span, %err, "failed to send bundle to Flashbots"); | ||
}); | ||
span_debug!(span, "bundle submitted to flashbots"); | ||
} |
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.
There is some weirdness here because the rbuilder
response doesn't adhere to the Flashbots spec and returns a completely empty response instead of a bundle hash when successfully submitted, but we also want to handle the case where the endpoint does return the expected response. So we log both.
feat: adds a Flashbots provider and submitter
This PR adds a Flashbots provider and submit task to the Builder.
It configures the Flashbots provider from the configured relay URL and uses the builder's signer key to sign all of the bundles it submits to Flashbots.
The Flashbots
rbuilder
endpoint on Pecorino does not return a properEthBundleHash
when a bundle is submitted, in fact it simply returns an empty response upon success. The endpoint also does not support simulation, so the Flashbots submit task blindly sends the prepared bundle and logs any errors that are returned.Closes ENG-1414