Skip to content

Commit b6890b3

Browse files
committed
clean up and link to builder helper
1 parent 1a8835f commit b6890b3

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ The Builder orchestrates a series of asynchronous actors that work together to b
1313
1. **Env** - watches the latest host and rollup blocks to monitor gas rates and block updates.
1414
2. **Cache** - polls bundle and transaction caches and adds them to the cache.
1515
3. **Simulator** - simulates transactions and bundles against rollup state and block environment to build them into a cohesive block.
16-
4. **Submit** - creates a blob transaction from the built block and sends it to the configured submit task.
17-
18-
1. Flashbots - builds a Flashbots bundle out of the Signet block which contains Signet transactions, host transactions, and host fills, and submits it to the configured Flashbots endpoint.
19-
2. Builder Helper - builds a transaction call with the builder helper contract and submits that as a transaction.
20-
16+
4. **Submit** - handles preparing and submitting the simulated block.
2117
5. **Metrics** - records block and tx data over time.
2218

2319
```mermaid
@@ -40,9 +36,8 @@ flowchart TD
4036
4137
%% Decision: route to Flashbots or Builder Helper
4238
FB@{ shape: hex, label: "FLASHBOTS_ENDPOINT\nconfigured?" }
43-
FB ==> | Yes | FlashbotsSubmit["🤖 Flashbots Submit"]
39+
FB ==> | Yes | FlashbotsSubmit["🤖 Flashbots Submit"]
4440
FB ==> | No | HelperSubmit["🏗️ Builder Helper Submit"]
45-
4641
end
4742
4843
%% Signing
@@ -76,7 +71,7 @@ flowchart TD
7671
HelperSubmit ==tx hash==> Metrics
7772
```
7873

79-
### Simulation Task
74+
### 💾 Simulation Task
8075

8176
The block building loop waits until a new block environment has been received, and then kicks off the next attempt.
8277

@@ -86,11 +81,11 @@ Transactions enter through the cache, and then they're sent to the simulator, wh
8681

8782
When the deadline is reached, the simulator is stopped, and all open simulation threads are cancelled. The built block is then bundled with the block environment and the previous host header that it was simulated against, and all three are passed along to the submit task.
8883

89-
### Submit Task
84+
### Submit Task
9085

9186
If Flashbots endpoint has been configured the Flashbots submit task will prepare a Flashbots bundle out of that Signet block, and then submits that bundle to the Flashbots endpoint.
9287

93-
If a Flashbots endpoint has _not_ been configured, the Builder will create a raw contract call and submits the transaction to the default mempool. This mode of operation is only for testing on private networks and should not be used in production, since it can leak sensitive transaction data from the Signet block.
88+
If a Flashbots endpoint has _not_ been configured, the Builder uses the [builder helper contract] and to craft a rollup block transaction and submits that to the default mempool. This mode of operation is only for testing on private networks and should not be used in production, since it can leak sensitive transaction data from the Signet block.
9489

9590
If the block received from simulation is empty, the submit task will ignore it.
9691

@@ -103,14 +98,14 @@ Finally, if it's non-empty, the submit task attempts to get a signature for the
10398
The Builder is configured via environment variables. The following values are supported for configuration.
10499

105100
Key | Required | Description
106-
----------------------------- | -------- | ----------------------------------------------------------------------
101+
----------------------------- | -------- | ------------------------------------------------------------------------------------------
107102
`HOST_CHAIN_ID` | Yes | Host-chain ID (e.g. `3151908`)
108103
`RU_CHAIN_ID` | Yes | Rollup-chain ID (e.g. `14174`)
109104
`HOST_RPC_URL` | Yes | RPC endpoint for the host chain
110105
`ROLLUP_RPC_URL` | Yes | RPC endpoint for the rollup chain
111106
`TX_POOL_URL` | Yes | Transaction pool URL (must end with `/`)
112107
`TX_BROADCAST_URLS` | No | Additional endpoints for blob txs (comma-separated, slash required)
113-
`FLASHBOTS_ENDPOINT` | No | Flashbots API to submit blocks to.
108+
`FLASHBOTS_ENDPOINT` | No | Flashbots API to submit blocks to. Defaults to the BuilderHelper submit task if not set.
114109
`ZENITH_ADDRESS` | Yes | Zenith contract address
115110
`BUILDER_HELPER_ADDRESS` | Yes | Builder helper contract address
116111
`QUINCEY_URL` | Yes | Remote sequencer signing endpoint
@@ -203,3 +198,5 @@ The previous header's basefee is tracked through the build loop and used for gas
203198
## 🪪 License
204199

205200
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
201+
202+
[builder helper contract]: https://github.com/init4tech/helper-contracts/blob/main/src/BuilderHelper.sol

0 commit comments

Comments
 (0)