Skip to content

Commit

Permalink
Merge pull request #208 from testinprod-io/feature/mininny/readme-for…
Browse files Browse the repository at this point in the history
…-execution-layer-sync

Update readme and default flags for using execution-layer sync
  • Loading branch information
mininny committed Jul 31, 2024
2 parents a02e8eb + 7b78537 commit b955a69
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,24 @@ $ 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.

Refer to [Optimism's guide for execution layer syncing here](https://docs.optimism.io/builders/node-operators/management/snap-sync#enabling-execution-layer-sync-for-alternative-clients).

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 b955a69

Please sign in to comment.