You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-43Lines changed: 20 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,9 @@ The Builder orchestrates a series of asynchronous actors that work together to b
13
13
1.**Env** - watches the latest host and rollup blocks to monitor gas rates and block updates.
14
14
2.**Cache** - polls bundle and transaction caches and adds them to the cache.
15
15
3.**Simulator** - simulates transactions and bundles against rollup state and block environment to build them into a cohesive block.
16
-
5.**Submit** - creates a blob transaction from the built block and sends it to Ethereum L1.
16
+
5.**Submit** - creates a blob transaction from the built block and sends it to the configured submit task.
17
+
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.
18
+
2. Builder Helper - builds a transaction call with the builder helper contract and submits that as a transaction.
17
19
6.**Metrics** - records block and tx data over time.
18
20
19
21
```mermaid
@@ -30,6 +32,7 @@ flowchart TD
30
32
MetricsTaskActor["📏 Metrics Task"]
31
33
SubmitTaskActor["📡 Submit Task "]
32
34
SimulatorTaskActor["💾 Simulator Task"]
35
+
Submitter["📤 Submitter"]
33
36
Quincey["🖊️ Quincey"]
34
37
35
38
SubmitTaskActor -.block hash.-> Quincey
@@ -39,6 +42,7 @@ flowchart TD
39
42
%% ────────────── CONNECTIONS & DATA FLOW ──────────────
The block building loop waits until a new block has been received, and then kicks off the next attempt.
63
+
### Simulation Task
64
+
65
+
The block building loop waits until a new block environment has been received, and then kicks off the next attempt.
57
66
58
67
When the Builder receives a new block, it takes a reference to the transaction cache, calculates a simulation deadline for the current slot with a buffer of 1.5 seconds, and begins constructing a block for the current slot.
59
68
60
69
Transactions enter through the cache, and then they're sent to the simulator, where they're run against the latest chain state and block environment. If they're successfully applied, they're added to the block. If a transaction fails to be applied, it is simply ignored.
61
70
62
-
When the deadline is reached, the simulator is stopped, and all open simulation threads and cancelled. The block is then bundled with the block environment and the previous host header that it was simulated against, and passes all three along to the submit task.
71
+
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.
72
+
73
+
### Submit Task
74
+
75
+
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.
76
+
77
+
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 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.
63
78
64
-
If no transactions in the cache are valid and the resulting block is empty, the submit task will ignore it.
79
+
If the block received from simulation is empty, the submit task will ignore it.
65
80
66
81
Finally, if it's non-empty, the submit task attempts to get a signature for the block, and if it fails due to a 403 error, it will skip the current slot and begin waiting for the next block.
67
82
@@ -140,44 +155,6 @@ If it fails, it will retry up to 3 times with a 12.5% bump on each retry.
140
155
141
156
The previous header's basefee is tracked through the build loop and used for gas estimation purposes in the Submit Task.
142
157
143
-
---
144
-
145
-
## 📤 Transaction Sender
146
-
147
-
A binary (`bin/submit_transaction.rs`) for continously sending very small transactions for testing block construction.
148
-
149
-
The following values are available for configuring the transaction sender:
0 commit comments