From 4df0fcf8ad8bf2a24fb326f7902bc6c071e52440 Mon Sep 17 00:00:00 2001 From: Tymur Khrushchov Date: Tue, 9 Jul 2024 00:54:04 +0200 Subject: [PATCH 1/2] sbundle stats endpoint --- .../advanced/rpc-endpoint.mdx | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/docs/flashbots-auction/advanced/rpc-endpoint.mdx b/docs/flashbots-auction/advanced/rpc-endpoint.mdx index 0fa2a2fa..14fa771a 100644 --- a/docs/flashbots-auction/advanced/rpc-endpoint.mdx +++ b/docs/flashbots-auction/advanced/rpc-endpoint.mdx @@ -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. +Only bundles not containing backruns are supported + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "flashbots_getSbundleStats", + "params": [ + { + bundleHash, // String, returned by the flashbots api when calling eth_sendBundle with builders field or mev_sendBundle + } + ] +} +``` + +example response when bundle relay has simulated the bundle and the target block has been reached: + +```json +{ + "isHighPriority": true, + "isSimulated": true, + "simulatedAt": "2022-10-06T21:36:06.317Z", + "receivedAt": "2022-10-06T21:36:06.250Z", + "consideredByBuildersAt": [ + { + "pubkey": "0x81babeec8c9f2bb9c329fd8a3b176032fe0ab5f3b92a3f44d4575a231c7bd9c31d10b6328ef68ed1e8c02a3dbc8e80f9", + "timestamp": "2022-10-06T21:36:06.343Z" + }, + { + "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", + "timestamp": "2022-10-06T21:36:06.394Z" + }, + { + "pubkey": "0xa1dead1e65f0a0eee7b5170223f20c8f0cbf122eac3324d61afbdb33a8885ff8cab2ef514ac2c7698ae0d6289ef27fc", + "timestamp": "2022-10-06T21:36:06.322Z" + } + ], + "sealedByBuildersAt": [ + { + "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", + "timestamp": "2022-10-06T21:36:07.742Z" + } + ] +} +``` + +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: + +```json +{ + "isSimulated": true, + "isHighPriority": true, + "simulatedAt": "2022-10-06T21:36:06.317Z", + "receivedAt": "2022-10-06T21:36:06.250Z" +} +``` + +where + +- `isSimulated`: boolean representing whether the bundle gets simulated. All other fields will be omitted except simulated field if API didn't receive bundle +- `simulatedAt`: time at which the bundle gets simulated +- `receivedAt`: time at which the bundle API received the bundle +- `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 + ### API Response - All method supports JSON-RPC standards for success response and not supported for error response(V2 methods are exceptions). From a91a77fd9a1fa9f80fa2ea85b80d1f01d31c14bf Mon Sep 17 00:00:00 2001 From: Tymur Khrushchov Date: Tue, 9 Jul 2024 15:28:33 +0200 Subject: [PATCH 2/2] add more details --- docs/flashbots-auction/advanced/rpc-endpoint.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/flashbots-auction/advanced/rpc-endpoint.mdx b/docs/flashbots-auction/advanced/rpc-endpoint.mdx index 14fa771a..3711ffcf 100644 --- a/docs/flashbots-auction/advanced/rpc-endpoint.mdx +++ b/docs/flashbots-auction/advanced/rpc-endpoint.mdx @@ -770,8 +770,8 @@ where ### 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 +The `flashbots_getSbundleStats` JSON-RPC method returns stats for a single [sbundle](/flashbots-mev-share/searchers/understanding-bundles). You must provide `bundleHash`, and the signing address must be the same as the one who submitted the bundle. +Only bundles that do not contain user's private transactions are supported (so no backrun bundles) ```json { @@ -819,7 +819,7 @@ example response when bundle relay has simulated the bundle and the target block 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: +When bundle-relay has simulated the bundle but the target block (or maxBlock) has not been reached: ```json {