diff --git a/README.md b/README.md index 1208f9219f8..016617da297 100644 --- a/README.md +++ b/README.md @@ -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? diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index cfaa40f6e8e..beb5d048913 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -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)