Skip to content

Commit

Permalink
Update readme and default flags for using execution-layer sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mininny committed Jul 28, 2024
1 parent a02e8eb commit f8c2820
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,22 @@ $ op-node \
--l2.jwt-secret=$JWT_SECRET_FILE \
--network=op-mainnet \
--rpc.addr=0.0.0.0 \
--rpc.port=9545
--rpc.port=9545 \
--l2.enginekind=erigon
```

#### Execution Layer Syncing
By default, op-node and op-erigon work together to derive every L2 block from the chain. However, this can take a while if the chain is large.

Instead, you can use `execution-layer` syncmode on op-node to download L2 blocks from the peers in the network.
This will allow op-erigon to download and execute large number of blocks at once, resulting in a shorter sync time.

To enable execution layer syncing, set the following flags on op-node
```bash
--syncmode=execution-layer \
--l2.enginekind=erigon
```

For more information for op-node, refer the [Optimism's node operator guide](https://community.optimism.io/docs/developers/bedrock/node-operator-guide/#configuring-op-node).

## Need any help?
Expand Down
4 changes: 1 addition & 3 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1401,9 +1401,7 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config, nodeName, datadir string, l
cfg.NoDiscovery = true
}

if ctx.IsSet(DiscoveryV5Flag.Name) {
cfg.DiscoveryV5 = ctx.Bool(DiscoveryV5Flag.Name)
}
cfg.DiscoveryV5 = ctx.Bool(DiscoveryV5Flag.Name)

if ctx.IsSet(MetricsEnabledFlag.Name) {
cfg.MetricsEnabled = ctx.Bool(MetricsEnabledFlag.Name)
Expand Down

0 comments on commit f8c2820

Please sign in to comment.