Skip to content
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

sbundle stats endpoint #557

Merged
merged 2 commits into from
Jul 9, 2024
Merged

sbundle stats endpoint #557

merged 2 commits into from
Jul 9, 2024

Conversation

TymKh
Copy link
Contributor

@TymKh TymKh commented Jul 8, 2024

No description provided.

Copy link

vercel bot commented Jul 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flashbots-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 1:29pm

Copy link
Collaborator

@sketsdever sketsdever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits and questions

@@ -768,6 +768,76 @@ where
- `consideredByBuildersAt`: indicates time at which each builder selected the bundle to be included in the target block
- `sealedByBuildersAt`: indicates time at which each builder sealed a block containing the bundle

### flashbots_getSbundleStats

The `flashbots_getSbundleStats` JSON-RPC method returns stats for a single sbundle. You must provide bundleHash, and the signing address must be the same as the one who submitted the bundle.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can we define what "sbundle" means? Or link to an existing description?
  2. Nit: Format "bundleHash" as code (ie. using the slash quotes like: bundleHash)

### flashbots_getSbundleStats

The `flashbots_getSbundleStats` JSON-RPC method returns stats for a single sbundle. You must provide bundleHash, and the signing address must be the same as the one who submitted the bundle.
Only bundles not containing backruns are supported
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might not be immediately clear what we mean by this. Could clarify a bit: sbundle stats are only visible for bundles that do contain other users' private transactions. Ie. you cannot view sbundle stats on a bundle which backruns another user in MEV-Share.

(Feel free to reword, I just think it might need a bit more explanation).


Only responds with success when sbundle is already simulated.

When relay has simulated the bundle but the target block (or maxBlock) has not been reached:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: specify "the bundle relay" so we don't confuse with MEV-Boost relay.

"method": "flashbots_getSbundleStats",
"params": [
{
bundleHash, // String, returned by the flashbots api when calling eth_sendBundle with builders field or mev_sendBundle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this returned in addition to or instead of the smart field? Currently our docs say that a smart field is returned when calling eth_sendBundle with builders[]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is returned together with eth_sendBundle response or else it will be hard for searcher to use stats api. So eth_sendBundle api is backward compatible, bundleHash is always returned, in case smart:true returned, searcher should query this endpoint.

@sketsdever sketsdever merged commit 2634fb4 into main Jul 9, 2024
3 checks passed
@sketsdever sketsdever deleted the feature/sbundle-stats branch July 9, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants