Skip to content

Commit 13d17af

Browse files
committed
minor fixed and rephrasing
1 parent 284c187 commit 13d17af

File tree

1 file changed

+45
-32
lines changed

1 file changed

+45
-32
lines changed

src/content/docs/en/developers/guides/running-a-scroll-node.mdx

Lines changed: 45 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -140,58 +140,65 @@ Running the node in Docker might have a significant impact on node performance.
140140
- Stop the container: `docker stop l2geth-docker`
141141

142142
---
143-
## Run L2geth in L1 follower mode
143+
144+
## Run L2geth in L1 Follower Mode
144145

145146
<Aside type="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.
147149
This mode is useful for reconstructing the L2 state by only following the L1.
148150
</Aside>
149151

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:
151154
- `--da.blob.beaconnode "<L1 beacon node>"` (recommended, if beacon node supports historical blobs)
152155
- `--da.blob.blobscan "https://api.blobscan.com/blobs/"` `--da.blob.blocknative "https://api.ethernow.xyz/v1/blob/"` for Mainnet
153156
- `--da.blob.blobscan "https://api.sepolia.blobscan.com/blobs/"` for Sepolia.
154157

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).
161+
156162

157163
### Mainnet
158164
```bash
159165
./build/bin/geth --scroll \
160-
--datadir "tmp/mainnet-l2geth-datadir" \
161-
--gcmode archive \
162-
--http --http.addr "0.0.0.0" --http.port 8545 --http.api "eth,net,web3,debug,scroll" \
163-
--da.sync=true \
164-
--da.blob.blobscan "https://api.blobscan.com/blobs/" --da.blob.blocknative "https://api.ethernow.xyz/v1/blob/" \
165-
--da.blob.beaconnode "<L1 beacon node>" \
166-
--l1.endpoint "<L1 RPC node>" \
167-
--verbosity 3
166+
--datadir "tmp/mainnet-l2geth-datadir" \
167+
--gcmode archive \
168+
--http --http.addr "0.0.0.0" --http.port 8545 --http.api "eth,net,web3,debug,scroll" \
169+
--da.sync=true \
170+
--da.blob.blobscan "https://api.blobscan.com/blobs/" --da.blob.blocknative "https://api.ethernow.xyz/v1/blob/" \
171+
--da.blob.beaconnode "<L1 beacon node>" \
172+
--l1.endpoint "<L1 RPC node>" \
173+
--verbosity 3
168174
```
169175

170176

171177
### Sepolia
172178
```bash
173179
./build/bin/geth --scroll-sepolia \
174-
--datadir "tmp/sepolia-l2geth-datadir" \
175-
--gcmode archive \
176-
--http --http.addr "0.0.0.0" --http.port 8545 --http.api "eth,net,web3,debug,scroll" \
177-
--da.sync=true \
178-
--da.blob.blobscan "https://api.sepolia.blobscan.com/blobs/" \
179-
--da.blob.beaconnode "<L1 beacon node>" \
180-
--l1.endpoint "<L1 RPC node>" \
181-
--verbosity 3
180+
--datadir "tmp/sepolia-l2geth-datadir" \
181+
--gcmode archive \
182+
--http --http.addr "0.0.0.0" --http.port 8545 --http.api "eth,net,web3,debug,scroll" \
183+
--da.sync=true \
184+
--da.blob.blobscan "https://api.sepolia.blobscan.com/blobs/" \
185+
--da.blob.beaconnode "<L1 beacon node>" \
186+
--l1.endpoint "<L1 RPC node>" \
187+
--verbosity 3
182188
```
183189

184-
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:
185192

186193
```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
188195
```
189196

190197

191198
### 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.
195202

196203
You should see something like this shortly after starting:
197204
```bash
@@ -201,22 +208,27 @@ INFO [09-18|13:41:45.249] Syncing L1 messages processed=20,
201208
INFO [09-18|13:41:55.300] Syncing L1 messages processed=20,637,029 confirmed=20,777,179 collected=145 progress(%)=99.325
202209
INFO [09-18|13:42:05.400] Syncing L1 messages processed=20,638,329 confirmed=20,777,179 collected=220 progress(%)=99.332
203210
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
205212
INFO [09-18|13:42:25.555] Syncing L1 messages processed=20,641,529 confirmed=20,777,179 collected=402 progress(%)=99.347
206213
```
207214

208-
#### Temporary errors
215+
#### Temporary Errors
209216

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.
211220
```
212221
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>"
213222
```
214223

215-
## Limitations
224+
### Limitations
216225

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/903 https://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.
218230

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:
220232

221233
```bash
222234
# query local block info
@@ -226,7 +238,8 @@ curl localhost:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"
226238
curl https://rpc.scroll.io -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getHeaderByNumber","params":["0x2AF8"],"id":0}' | jq
227239
```
228240

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**.
242+
However, the following fields will be different:
230243

231244
- `difficulty` and therefore `totalDifficulty`
232245
- `extraData`

0 commit comments

Comments
 (0)