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
+47-10Lines changed: 47 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,23 @@
1
1
# The Signet Block Builder
2
2
3
-
The Builder is responsible for transactions through the Signet rollup, from ingestion and simulation to block construction and submission to Ethereum L1.
3
+
The Builder simulates bundles and transactions against the latest chain state to create valid Signet rollup blocks and submits them to the configured host chain as an [EIP-4844 transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md).
4
+
5
+
Bundles are treated as Flashbots-style bundles, meaning that the Builder should respect transaction ordering, bundle atomicity, and the specified revertability.
4
6
5
7
---
6
8
7
9
## 🚀 System Design
8
10
9
-
The Builder orchestrates a series of asynchronous actors that work together to:
11
+
The Builder orchestrates a series of asynchronous actors that work together to build blocks for every assigned slot.
10
12
11
13
1.**Env** - watches the latest host and rollup blocks to monitor gas rates and block updates.
12
14
2.**Cache** - polls bundle and transaction caches and adds them to the cache.
13
-
3.**Simulator** - simulates transactions against rollup state and block environment to build them into a cohesive block.
14
-
5.**Submit** - builds a blob transaction of the built block and sends it to Ethereum L1.
15
-
6.**Metrics** - records block and tx data.
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.
17
+
6.**Metrics** - records block and tx data over time.
16
18
17
19
```mermaid
20
+
%%{ init : { "theme" : "dark" } }%%
18
21
flowchart TD
19
22
%% ────────────── INITIALIZATION ──────────────
20
23
A0(["Start main"]) --> A1[Init tracing & logging]
@@ -30,11 +33,11 @@ flowchart TD
30
33
end
31
34
32
35
%% ────────────── CONNECTIONS & DATA FLOW ──────────────
@@ -73,6 +76,36 @@ The Builder is configured via environment variables. The following values are su
73
76
74
77
---
75
78
79
+
## 💾 EVM Behavior
80
+
81
+
### 🗿 Inherited Header Values
82
+
83
+
`PREVRANDAO` is set to a random byte string for each block.
84
+
85
+
```rust
86
+
// `src/tasks/env.rs`
87
+
prevrandao:Some(B256::random()),
88
+
```
89
+
90
+
`TIMESTAMP` - Block timestamps are set to the same value as the current Ethereum block.
91
+
92
+
Blob gas values `excess_blob_gas` and `blob_gasprice` are also set to 0 for all Signet blocks.
93
+
94
+
### 🔢 Disabled Opcodes
95
+
96
+
`BLOBHASH` - EIP-4844 is not supported on Signet.
97
+
`BLOBBASEFEE` - EIP4844 is not supported.
98
+
99
+
## ⛽ Transaction Submission
100
+
101
+
When a completed, non-empty Signet block is received by the Submit task, it prepares the block data into a blob transaction and submits it to the network.
102
+
103
+
If it fails, it will retry up to 3 times with a 12.5% bump on each retry.
104
+
105
+
The previous header's basefee is tracked through the build loop and used for gas estimation purposes in the Submit Task.
106
+
107
+
---
108
+
76
109
## 📤 Transaction Sender
77
110
78
111
A binary (`bin/submit-transaction.rs`) for continously sending very small transactions for testing block construction.
@@ -87,6 +120,10 @@ The following values are available for configuring the transaction sender:
87
120
|`SIGNER_CHAIN_ID`| Yes | Chain ID used for signing |
88
121
|`SIGNER_KEY`| Yes | Signing key used to sign the transaction |
89
122
123
+
The transaction submitter is located at `bin/submit_transaction.rs`.
124
+
125
+
Run the transaction submitter with `cargo run --bin transaction-submitter`
0 commit comments