Skip to content

Commit

Permalink
doc: execution layer sync for alternative clients
Browse files Browse the repository at this point in the history
  • Loading branch information
mininny committed Jul 15, 2024
1 parent 6b33e08 commit 86181d1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pages/builders/node-operators/configuration/base-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ op-node --l1=<ethereum mainnet RPC url> \
--rpc.port=9545 \
--l2.jwt-secret=<path to JWT secret> \
--l1.beacon=<http endpoint address of L1 Beacon-node> \
--syncmode=execution-layer
--syncmode=execution-layer \
--l2.enginekind=geth
```
You can manually specify a path to a rollup config with the `--rollup.config` flag. This is used for testnets or internal deployments that are not migrated from a legacy network.
Expand Down
10 changes: 10 additions & 0 deletions pages/builders/node-operators/configuration/consensus-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ Path to JWT secret key. Keys are 32 bytes, hex encoded in a file. A new key will
<Tabs.Tab>`OP_NODE_L2_ENGINE_AUTH=/path/to/jwt/secret`</Tabs.Tab>
</Tabs>

### l2.enginekind

The kind of engine client, used to control the behavior of optimism in respect to different types of engine clients. Valid options: `geth`, `reth`, `erigon`. The default value is `geth`.

<Tabs items={['Syntax', 'Example', 'Environment Variable']}>
<Tabs.Tab>`--l2.enginekind=<value>`</Tabs.Tab>
<Tabs.Tab>`--l2.enginekind=geth`</Tabs.Tab>
<Tabs.Tab>`OP_NODE_L2_ENGINE_KIND=geth`</Tabs.Tab>
</Tabs>

### log.color

Color the log output if in terminal mode. The default value is `false`.
Expand Down
19 changes: 19 additions & 0 deletions pages/builders/node-operators/management/snap-sync.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,25 @@ Choose one of the following options to enable snap sync:
</Tabs.Tab>
</Tabs>

## Enabling Execution Layer Sync for Alternative Clients
In addition to op-geth, you can enable execution-layer syncing with alternative execution clients such as `reth` and `op-erigon`.

Unlike `op-geth`, `reth` and `op-erigon` are designed as archive nodes, which means they require the complete history of the chain.
However, these clients can still retrieve block headers and data through the P2P network instead of deriving each individual block, resulting in a faster initial sync.

For OP Mainnet, the [bedrock datadir](snapshots) is required. For other OP Stack networks, no datadir is required.

To enable execution layer sync for these clients, set the following flags on `op-node`:
```shell
# for reth
--syncmode=execution-layer (not default)
--l2.enginekind=reth (not default)
# for erigon
--syncmode=execution-layer (not default)
--l2.enginekind=erigon (not default)
```

## Next Steps

* See the [Node Configuration](/builders/node-operators/configuration/base-config#configuration) guide for additional explanation or customization.
Expand Down
3 changes: 2 additions & 1 deletion pages/builders/node-operators/tutorials/mainnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ Once you've started `op-geth`, you can start `op-node`.
--l2=ws://localhost:8551 \
--l2.jwt-secret=./jwt.txt \
--network=op-mainnet \
--syncmode=execution-layer
--syncmode=execution-layer \
--l2.enginekind=geth
```
<Callout>
Expand Down
1 change: 1 addition & 0 deletions words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Eigen
ENABLEDEPRECATEDPERSONAL
enabledeprecatedpersonal
enablements
enginekind
Erigon
erigon
ETHERBASE
Expand Down

0 comments on commit 86181d1

Please sign in to comment.