Skip to content

Commit 52ebc50

Browse files
flashbox-l1: document BuilderNet bottom-of-block in readme (#166)
* flashbox-l1: document BuilderNet bottom-of-block in readme BuilderNet bottom-of-block order flow is now live, with the same API format as Titan's. Document it alongside the existing Flashbots/Titan order-flow sections. - Add "Searching on BuilderNet's Bottom of Block" section: state diff stream (eth_subscribe / flashbots_stateDiffs) on wss://rpc.buildernet.org/bob and bundle submission (eth_sendBobBundle) on https://rpc.buildernet.org. Format mirrors Titan; both share one HTTPS endpoint so both are production-only. - Add the section to the table of contents. - Add a BuilderNet row to the firewall rules table (443, production only). - List BuilderNet in the intro line of supported order flow. - Fix DNS row port in the firewall table (54 -> 53). * Added note on readme --------- Co-authored-by: pablin-10 <118397961+pablin-10@users.noreply.github.com>
1 parent 11d403f commit 52ebc50

1 file changed

Lines changed: 137 additions & 2 deletions

File tree

modules/flashbox/flashbox-l1/readme.md

Lines changed: 137 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TEE Searcher
22
===
33

4-
Using Intel TDX, Flashbots has built a way for searchers to trustlessly backrun transactions with full information, without exposing frontrunning risks. This product is currently live on Ethereum mainnet for searching on Flashbots Protect and Titan Builder's bottom of block.
4+
Using Intel TDX, Flashbots has built a way for searchers to trustlessly backrun transactions with full information, without exposing frontrunning risks. This product is currently live on Ethereum mainnet for searching on Flashbots Protect, Titan Builder's bottom of block, and BuilderNet's bottom of block.
55

66
- [TDX Mental Model](#tdx-mental-model)
77
- [Image Overview](#image-overview)
@@ -11,6 +11,7 @@ Using Intel TDX, Flashbots has built a way for searchers to trustlessly backrun
1111
- [Order Flow APIs](#order-flow-apis)
1212
- [Flashbots Protect](#searching-on-flashbots-protect-transactions)
1313
- [Titan Builder](#searching-on-titan-builders-bottom-of-block)
14+
- [BuilderNet](#searching-on-buildernets-bottom-of-block)
1415
- [Disk Persistence](#disk-persistence)
1516
- [Searcher Commands and Services](#searcher-commands-and-services)
1617
- [Developer Notes](#developer-notes)
@@ -73,9 +74,10 @@ Firewall Rules
7374
| 9000 | Input + Output | Consensus Client P2P | Podman | TCP + UDP | ENABLED | ENABLED |
7475
| 443 | Output **IP WHITELISTED** | Flashbots Protect Tx Stream | Podman | TCP | ENABLED | DISABLED |
7576
| 42203 | Output **IP WHITELISTED** | Titan Builder State Diff Stream | Podman | TCP | ENABLED | DISABLED |
77+
| 443 | Output **IP WHITELISTED** | BuilderNet State Diff Stream + Bundle RPC | BuilderNet RPC | TCP | ENABLED | DISABLED |
7678
| 443 | Output **IP WHITELISTED** | Flashbots Bundle RPC | Flashbots Bundle RPC | TCP | ENABLED | ENABLED |
7779
| 1338 | Output **IP WHITELISTED** | Titan Bundle RPC | Titan Bundle RPC | TCP | ENABLED | ENABLED |
78-
| 54 | Output | DNS | DNS | TCP + UDP | DISABLED | ENABLED |
80+
| 53 | Output | DNS | DNS | TCP + UDP | DISABLED | ENABLED |
7981
| 80 | Output | HTTP | HTTP | TCP | DISABLED | ENABLED |
8082
| 443 | Output | HTTPS | HTTPS | TCP | DISABLED | ENABLED |
8183
| 8745 | Input | CVM-Reverse-Proxy | Host | TCP | ENABLED | ENABLED |
@@ -493,6 +495,139 @@ Note on `targetPools`:
493495
- Titan Builder will use `targetPools` to determine what other blocks to consider adding the bottom of block bundle to.
494496
- Searchers should include the address of the contract that’s state change causes the arbitrage. For example, the Uni V2 pool address.
495497

498+
### Searching on BuilderNet's Bottom of Block
499+
500+
BuilderNet serves both the state diff stream and bundle submission over the same HTTPS endpoint (`rpc.buildernet.org`). Because they share one endpoint, both are reachable only in **production mode** — unlike the Flashbots and Titan bundle RPCs, which are always on.
501+
502+
**<u>Subscribing to BuilderNet's State Diff Stream</u>**
503+
504+
**Connecting**
505+
506+
Connect to the server located at:
507+
```
508+
wss://rpc.buildernet.org/bob
509+
```
510+
511+
Use the `eth_subscribe` method to subscribe to state diffs:
512+
513+
```json
514+
{"method":"eth_subscribe","params":["flashbots_stateDiffs"]}
515+
```
516+
517+
**Response**
518+
519+
```json
520+
{
521+
"jsonrpc": "2.0",
522+
"result": "whzoOReHirSJxxF8Z0bqvbghmXjD3hWRW0",
523+
"id": 1
524+
}
525+
```
526+
527+
You'll start receiving state diffs:
528+
529+
```
530+
{
531+
"jsonrpc": "2.0",
532+
"method": "eth_subscription",
533+
"params": {
534+
"subscription": "whzoOReHirSJxxF8Z0bqvbghmXjD3hWRW0",
535+
"result": {
536+
"blockNumber": "String", // hex encoded block number the block builder is currently building for
537+
"blockTimestamp": "String", // hex encoded seconds since the unix epoch
538+
"blockUuid": "String", // a UUID V4 that is used to identify the current block being streamed
539+
"stateOverrides": "Object" { // a nested object of changed addresses to changed storage slot keys and their updated value
540+
"address": {
541+
"balance": "String"
542+
"code": "String" // ONLY IF CONTRACT IS DEPLOYED IN THIS BLOCK
543+
"nonce": "String"
544+
"stateDiff": {
545+
"<storage slot>": "String"
546+
}
547+
}
548+
}
549+
}
550+
}
551+
}
552+
```
553+
<details>
554+
<summary>Example Output</summary>
555+
556+
```json
557+
2024-12-03 23:46:27,370 - __main__ - INFO - Initializing WebSocket connection to ws://127.0.0.1:8547
558+
2024-12-03 23:46:27,375 - __main__ - INFO - Subscribed to state diffs
559+
2024-12-03 23:46:27,377 - __main__ - INFO - Subscription response: {"jsonrpc":"2.0","result":"aYF2ehyZ8I4fz3rxkkRiOxtnfFqWosI9HC","id":1}
560+
2024-12-03 23:46:33,108 - __main__ - INFO - Parsed state diff: {
561+
"jsonrpc": "2.0",
562+
"method": "eth_subscription",
563+
"params": {
564+
"subscription": "aYF2ehyZ8I4fz3rxkkRiOxtnfFqWosI9HC",
565+
"result": {
566+
"blockNumber": "0x1456624",
567+
"blockTimestamp": "0x674f985b",
568+
"blockUuid": "b3041804-c0ff-4628-9581-29910f78593e",
569+
"stateOverrides": {
570+
"0x0000000000a39bb272e79075ade125fd351887ac": {
571+
"balance": "0x35c9406dfc78d4448d9",
572+
"nonce": "0x1",
573+
"stateDiff": {
574+
"0xffc5f4bf805d0f20d7ba2d180bf4492e98716db6def51fb60972294b5ba556cf": "0x0000000000000000000000000000000000000000000000000905438e60010000"
575+
}
576+
},
577+
"0x111111111117dc0aa78b770fa6a738034120c302": {
578+
"stateDiff": {
579+
"0xc0ec8fbf02d70b2873f5a76f503e97bd1b0ca8048ab517fad231214a74ebe459": "0x0000000000000000000000000000000000000000000ebc80f5e0cbee39cca338",
580+
"0xcb4547a880ed764ae6e3838e74f0795915d3b91357e4852c97ce6e0cdcf6c023": "0x0000000000000000000000000000000000000000000000000000000000000000"
581+
}
582+
},
583+
"0x1a44076050125825900e736c501f859c50fe728c": {
584+
"stateDiff": {
585+
"0xe988aa870f58bb597aadbc090e6f5508b7e93c0ad1d3effac7f5825387d9975e": "0x05626211c42f691c213286fd1cc93859d96b1e96d1e919cd2738013a25857823"
586+
}
587+
},
588+
"0x9355d11cb5c6e8a301d131c5ee1c7fdc032dbb9a": {
589+
"balance": "0x0",
590+
"code": "0x363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3000000000000000000000000000000000000000000000000000000000000000000",
591+
"nonce": "0x1",
592+
"stateDiff": {
593+
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000101679fb19dec9d66c34450a8563ffdfd29c04e615a"
594+
}
595+
}
596+
}
597+
}
598+
}
599+
}
600+
```
601+
</details>
602+
603+
604+
**<u>Sending Bottom of Block Bundles to BuilderNet RPC</u>**
605+
606+
Connect to the server located at:
607+
```
608+
https://rpc.buildernet.org
609+
```
610+
611+
Use the `eth_sendBobBundle` method to submit bundles:
612+
613+
```
614+
{
615+
"jsonrpc": "2.0",
616+
"id": 1,
617+
"method": "eth_sendBobBundle",
618+
"params": [
619+
{ // regular eth_sendBundle fields
620+
txs,
621+
blockNumber,
622+
},
623+
targetUuid, // String, block UUID that this bundle is targeting eg 123e4567-e89b-12d3-a456-426614174000
624+
targetPools // Array[String], A list of pool addresses that this bundle is targeting
625+
]
626+
}
627+
```
628+
629+
Note: `targetUuid` and `targetPools` are currently accepted but ignored by BuilderNet. When support for them is added, their placement in the request may differ from what is shown above.
630+
496631
Disk Persistence
497632
------------------------
498633

0 commit comments

Comments
 (0)