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: src/content/docs/en/developers/guides/running-a-scroll-node.mdx
+45-32Lines changed: 45 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,58 +140,65 @@ Running the node in Docker might have a significant impact on node performance.
140
140
- Stop the container: `docker stop l2geth-docker`
141
141
142
142
---
143
-
## Run L2geth in L1 follower mode
143
+
144
+
## Run L2geth in L1 Follower Mode
144
145
145
146
<Asidetype="tip">
146
-
L1 follower mode runs a node that only follows the finalized L1 and DA to read and derive the L2 chain. In this mode the node does not participate directly in the L2.
147
+
L1 follower mode runs a node that only follows the finalized L1 and DA to read and derive the L2 chain.
148
+
In this mode the node does not participate directly in the L2 network.
147
149
This mode is useful for reconstructing the L2 state by only following the L1.
148
150
</Aside>
149
151
150
-
Run `l2geth` with the `--da.sync` flag. Provide blob APIs and beacon node with
152
+
Run `l2geth` with the `--da.sync` flag.
153
+
Provide blob APIs and beacon node by configuring one or more of the following flags:
-`--da.blob.blobscan "https://api.blobscan.com/blobs/"``--da.blob.blocknative "https://api.ethernow.xyz/v1/blob/"` for Mainnet
153
156
-`--da.blob.blobscan "https://api.sepolia.blobscan.com/blobs/"` for Sepolia.
154
157
155
-
Strictly speaking only one of the blob providers is necessary, but during testing blobscan and blocknative were not fully reliable. That's why using a beacon node with historical blob data is recommended (can be in addition to blobscan and blobnative).
158
+
Strictly speaking a single blob provider is sufficient.
159
+
However, configuring multiple providers can help avoid reliability issues.
160
+
Using a beacon node with historical blob data is the recommended option (can be in addition to the Blobscan and Blocknative APIs).
A full sync will take about 2 weeks for Mainnet and 2-3 days for Sepolia depending on the speed of the RPC node, beacon node and the local machine. Progess is reported as follows for every 1000 blocks applied:
190
+
A full sync will take about 2 weeks for Scroll mainnet and 2-3 days for Scroll Sepolia depending on the speed of the RPC node, beacon node and the local machine.
191
+
Progress is reported as follows for every 1000 blocks applied:
185
192
186
193
```bash
187
-
INFO [08-01|16:44:42.173] L1 sync progress blockhain height=87000 block hash=608eec..880ebd root=218215..9a58a2
194
+
INFO [08-01|16:44:42.173] L1 sync progress blockchain height=87000 block hash=608eec..880ebd root=218215..9a58a2
188
195
```
189
196
190
197
191
198
### Troubleshooting
192
-
-the node (APIs, geth console, etc) will not be responsive until all the L1 messages have been synced
193
-
-but it is already starting the derivation pipeline which can be seen through `L1 sync progress [...]`.
194
-
-for Sepolia it might take a little longer (10-20mins) for the first `L1 sync progress [...]` to appear as the L1 blocks are more sparse at the beginning
199
+
-The node (APIs, geth console, etc) will not be responsive until all the L1 messages have been synced.
200
+
-However, the derivation pipeline is already started during the initial sync phase, which can be seen through `L1 sync progress [...]` logs.
201
+
-For Scroll Sepolia it might take a little longer (10-20mins) for the first `L1 sync progress [...]`logs to appear as the L1 blocks are more sparse at the beginning.
195
202
196
203
You should see something like this shortly after starting:
197
204
```bash
@@ -201,22 +208,27 @@ INFO [09-18|13:41:45.249] Syncing L1 messages processed=20,
201
208
INFO [09-18|13:41:55.300] Syncing L1 messages processed=20,637,029 confirmed=20,777,179 collected=145 progress(%)=99.325
202
209
INFO [09-18|13:42:05.400] Syncing L1 messages processed=20,638,329 confirmed=20,777,179 collected=220 progress(%)=99.332
203
210
INFO [09-18|13:42:15.610] Syncing L1 messages processed=20,640,129 confirmed=20,777,179 collected=303 progress(%)=99.340
204
-
INFO [09-18|13:42:24.324] L1 sync progress "blockhain height"=1000 "block hash"=a28c48..769cee root=174edb..9d9fbd
211
+
INFO [09-18|13:42:24.324] L1 sync progress "blockchain height"=1000 "block hash"=a28c48..769cee root=174edb..9d9fbd
205
212
INFO [09-18|13:42:25.555] Syncing L1 messages processed=20,641,529 confirmed=20,777,179 collected=402 progress(%)=99.347
206
213
```
207
214
208
-
#### Temporary errors
215
+
#### Temporary Errors
209
216
210
-
Especially at the beginning some errors like below might appear in the console. This is expected, as the pipeline relies on the L1 messages but in case they're not synced fast enough such an error might pop up. It will continue once the L1 messages are available.
217
+
Especially at the beginning some errors like below might appear in the console.
218
+
This is expected, as the pipeline relies on the L1 messages but in case they are not synced fast enough such an error might pop up.
219
+
The chain derivation will continue once the L1 messages are available.
211
220
```
212
221
WARN [09-18|13:52:25.843] syncing pipeline step failed due to temporary error, retrying err="temporary: failed to process logs to DA, error: failed to get commit batch da: 7, err: failed to get L1 messages for v0 batch 7: EOF: <nil>"
213
222
```
214
223
215
-
## Limitations
224
+
###Limitations
216
225
217
-
The `state root` of a block can be reproduced when using this mode of syncing but currently not the `block hash`. This is due to the fact that currently the header fields `difficulty` and `extraData` are not stored on DA but these fields are utilized by [Clique consensus](https://eips.ethereum.org/EIPS/eip-225) which is used by the Scroll protocol. This will be fixed in a [future upgrade](https://github.com/scroll-tech/go-ethereum/pull/903https://github.com/scroll-tech/go-ethereum/pull/913) where the main implementation on l2geth is already done.
226
+
L1 follower nodes can reproduce the correct `state root` of L2 blocks.
227
+
However, currently not the derived `block hash` will not match the ones seen on other nodes or Scrollscan.
228
+
This is due to the fact that currently the header fields `difficulty` and `extraData` are not stored on DA but these fields are utilized by [Clique consensus](https://eips.ethereum.org/EIPS/eip-225) which is used by the Scroll protocol.
229
+
This will be fixed in a future upgrade.
218
230
219
-
To verify the locally created `state root` against mainnet (`https://sepolia-rpc.scroll.io/` for Sepolia), we can do the following:
231
+
To verify the locally created `state root` against mainnet, we can do the following:
curl https://rpc.scroll.io -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getHeaderByNumber","params":["0x2AF8"],"id":0}'| jq
227
239
```
228
240
229
-
By comparing the headers we can most importantly see that **`state root` , `receiptsRoot` and everything that has to do with the state matches**. However, the following fields will be different:
241
+
By comparing the headers we can most importantly see that **`state root` , `receiptsRoot` and everything that has to do with the state match**.
0 commit comments