Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MANDATORY] Ecotone upgrade and snap sync support #133

Merged
merged 12 commits into from
Mar 10, 2024
7 changes: 4 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ NODE_TYPE=full
# ↓ REQUIRED (BEDROCK) ↓ #
###############################################################################

# Where to get the Bedrock database ("download" or "migration"), see README
BEDROCK_SOURCE=download

# L1 node that the op-node (Bedrock) will get chain data from
OP_NODE__RPC_ENDPOINT=

Expand All @@ -34,6 +31,9 @@ HEALTHCHECK__REFERENCE_RPC_PROVIDER=
# Optional provider to serve legacy RPC requests, see README
OP_GETH__HISTORICAL_RPC=https://mainnet.optimism.io

# Set to "full" to force op-geth to use --syncmode=full
OP_GETH__SYNCMODE=

###############################################################################
# ↓ OPTIONAL ↓ #
###############################################################################
Expand Down Expand Up @@ -62,4 +62,5 @@ PORT__TORRENT_UI=
PORT__TORRENT=
PORT__OP_GETH_HTTP=
PORT__OP_GETH_WS=
PORT__OP_GETH_P2P=
PORT__OP_NODE_P2P=
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ Open `.env` with your editor of choice
* **NETWORK_NAME** - Choose which Optimism network layer you want to operate on:
* `op-mainnet` - Optimism Mainnet
* `op-sepolia` - Optimism Sepolia (Testnet)
* `base-mainnet` - Base Mainnet
* `base-sepolia` - Base Sepolia (Testnet)
* **NODE_TYPE** - Choose the type of node you want to run:
* `full` (Full node) - A Full node contains a few recent blocks without historical states.
* `archive` (Archive node) - An Archive node stores the complete history of the blockchain, including historical states.
* **OP_NODE__RPC_ENDPOINT** - Specify the endpoint for the RPC of Layer 1 (e.g., Ethereum mainnet). For instance, you can use the free plan of Alchemy for the Ethereum mainnet.
* **OP_NODE__L1_BEACON** - Specify the beacon endpoint of Layer 1. You can use [QuickNode for the beacon endpoint](https://www.quicknode.com/docs/ethereum/eth-v1-beacon-genesis).
* **OP_NODE__L1_BEACON** - Specify the beacon endpoint of Layer 1. You can use [QuickNode for the beacon endpoint](https://www.quicknode.com). For example: https://xxx-xxx-xxx.quiknode.pro/db55a3908ba7e4e5756319ffd71ec270b09a7dce
* **OP_NODE__RPC_TYPE** - Specify the service provider for the RPC endpoint you've chosen in the previous step. The available options are:
* `alchemy` - Alchemy
* `quicknode` - Quicknode (ETH only)
Expand All @@ -91,6 +93,8 @@ Open `.env` with your editor of choice
* **HEALTHCHECK__REFERENCE_RPC_PROVIDER** - Specify the public RPC endpoint for Layer 2 network you want to operate on for healthchecking. For instance:
* **Optimism Mainnet** - https://mainnet.optimism.io
* **Optimism Sepolia** - https://sepolia.optimism.io
* **Base Mainnet** - https://mainnet.base.org
* **Base Sepolia** - https://sepolia.base.org

### OP Mainnet only configurations

Expand All @@ -100,6 +104,10 @@ Open `.env` with your editor of choice

### Optional configurations

* **OP_GETH__SYNCMODE** - Specify sync mode for the execution client
* Unspecified - Use default snap sync for full node and full sync for archive node
* `snap` - Snap Sync (Default)
* `full` - Full Sync (For archive node, not recommended for full node)
* **IMAGE_TAG__[...]** - Use custom docker image for specified components.
* **PORT__[...]** - Use custom port for specified components.

Expand Down Expand Up @@ -200,3 +208,12 @@ Use the following login details to access the dashboard:
Navigate over to `Dashboards > Manage > Simple Node Dashboard` to see the dashboard, see the following gif if you need help:

![metrics dashboard gif](https://user-images.githubusercontent.com/14298799/171476634-0cb84efd-adbf-4732-9c1d-d737915e1fa7.gif)

## Troubleshooting

### Walking back L1Block with curr=0x0000...:0 next=0x0000...:0

If you experience "walking back L1Block with curr=0x0000...:0 next=0x0000...:0" for a long time after the Ecotone upgrade, consider these fixes:
1. Wait for a few minutes. This issue usually resolves itself after some time.
2. Restart docker compose: `docker compose down` and `docker compose up -d --build`
3. If it's still not working, try setting `OP_GETH__SYNCMODE=full` in .env and restart docker compose
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- ${PORT__HEALTHCHECK_METRICS:-7300}:7300

op-geth:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101308.1
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101308.2
restart: unless-stopped
stop_grace_period: 5m
entrypoint: /scripts/start-op-geth.sh
Expand All @@ -43,11 +43,13 @@ services:
ports:
- ${PORT__OP_GETH_HTTP:-9993}:8545
- ${PORT__OP_GETH_WS:-9994}:8546
- ${PORT__OP_GETH_P2P:-39393}:${PORT__OP_GETH_P2P:-39393}/udp
- ${PORT__OP_GETH_P2P:-39393}:${PORT__OP_GETH_P2P:-39393}/tcp
extra_hosts:
- "host.docker.internal:host-gateway"

op-node:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.6.1
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.7.1
restart: unless-stopped
stop_grace_period: 5m
entrypoint: /scripts/start-op-node.sh
Expand Down
14,472 changes: 14,472 additions & 0 deletions envs/base-mainnet/config/genesis.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions envs/base-mainnet/config/rollup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"genesis": {
"l1": {
"hash": "0x5c13d307623a926cd31415036c8b7fa14572f9dac64528e857a470511fc30771",
"number": 17481768
},
"l2": {
"hash": "0xf712aa9241cc24369b143cf6dce85f0902a9731e70d66818a3a5845b296c73dd",
"number": 0
},
"l2_time": 1686789347,
"system_config": {
"batcherAddr": "0x5050f69a9786f081509234f1a7f4684b5e5b76c9",
"overhead": "0x00000000000000000000000000000000000000000000000000000000000000bc",
"scalar": "0x00000000000000000000000000000000000000000000000000000000000a6fe0",
"gasLimit": 30000000
}
},
"block_time": 2,
"max_sequencer_drift": 600,
"seq_window_size": 3600,
"channel_timeout": 300,
"l1_chain_id": 1,
"l2_chain_id": 8453,
"regolith_time": 0,
"batch_inbox_address": "0xff00000000000000000000000000000000008453",
"deposit_contract_address": "0x49048044d57e1c92a77f79988d21fa8faf74e97e",
"l1_system_config_address": "0x73a79fab69143498ed3712e519a88a918e1f4072"
}
2 changes: 2 additions & 0 deletions envs/base-mainnet/op-geth.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BEDROCK_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
BEDROCK_DATADIR=/geth
6 changes: 6 additions & 0 deletions envs/base-mainnet/op-node.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OP_NODE_BETA_EXTRA_NETWORKS=true
OP_NODE_NETWORK=base-mainnet
OP_NODE_P2P_AGENT=base
OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgi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