Skip to content

Commit

Permalink
Repo cleanup (base#59)
Browse files Browse the repository at this point in the history
* Move environment config to separate .env file

* Remove volumes config (already in README)

* Tabs vs spaces

* README cleanup

* Update README to mention .env file
  • Loading branch information
mdehoog authored Jun 20, 2023
1 parent b40e05e commit fdafc9c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 35 deletions.
26 changes: 26 additions & 0 deletions .env.goerli
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
OP_GETH_GENESIS_FILE_PATH=goerli/genesis-l2.json
OP_GETH_SEQUENCER_HTTP=https://goerli-sequencer.base.org
# OP_GETH_ETH_STATS=nodename:secret@host:port # optional

OP_NODE_L1_ETH_RPC=https://ethereum-goerli-rpc.allthatnode.com # [recommended] replace with your preferred L1 (Ethereum, not Base) node RPC URL
OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt
OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a # for localdev only
OP_NODE_L2_ENGINE_RPC=http://geth:8551
OP_NODE_LOG_LEVEL=info
OP_NODE_METRICS_ADDR=0.0.0.0
OP_NODE_METRICS_ENABLED=true
OP_NODE_METRICS_PORT=7300
OP_NODE_P2P_AGENT=base
OP_NODE_P2P_BOOTNODES=enr:-J64QBbwPjPLZ6IOOToOLsSjtFUjjzN66qmBZdUexpO32Klrc458Q24kbty2PdRaLacHM5z-cZQr8mjeQu3pik6jPSOGAYYFIqBfgmlkgnY0gmlwhDaRWFWHb3BzdGFja4SzlAUAiXNlY3AyNTZrMaECmeSnJh7zjKrDSPoNMGXoopeDF4hhpj5I0OsQUUt4u8uDdGNwgiQGg3VkcIIkBg,enr:-J64QAlTCDa188Hl1OGv5_2Kj2nWCsvxMVc_rEnLtw7RPFbOfqUOV6khXT_PH6cC603I2ynY31rSQ8sI9gLeJbfFGaWGAYYFIrpdgmlkgnY0gmlwhANWgzCHb3BzdGFja4SzlAUAiXNlY3AyNTZrMaECkySjcg-2v0uWAsFsZZu43qNHppGr2D5F913Qqs5jDCGDdGNwgiQGg3VkcIIkBg
OP_NODE_P2P_LISTEN_IP=0.0.0.0
OP_NODE_P2P_LISTEN_TCP_PORT=9222
OP_NODE_P2P_LISTEN_UDP_PORT=9222
OP_NODE_ROLLUP_CONFIG=goerli/rollup.json
OP_NODE_RPC_ADDR=0.0.0.0
OP_NODE_RPC_PORT=8545
OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
OP_NODE_VERIFIER_L1_CONFS=4
# OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node
# is fully trusted. It also allows op-node to work with clients such as Erigon that do not
# support storage proofs.
# OP_NODE_L1_TRUST_RPC=true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ If you encounter problems with your node, please open a [GitHub issue](https://g

### Usage

1. Ensure you have an Ethereum Goerli L1 full node RPC available (not Base Goerli), and set `OP_NODE_L1_ETH_RPC` (in `docker-compose.yml` if using docker-compose). If running your own L1 node, it needs to be synced before Base will be able to fully sync.
1. Ensure you have an Ethereum L1 full node RPC available (not Base), and set `OP_NODE_L1_ETH_RPC` (in the `.env.*` file if using docker-compose). If running your own L1 node, it needs to be synced before Base will be able to fully sync.
2. Run:

```
Expand Down
35 changes: 4 additions & 31 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ services:
- 30303:30303
- 7301:6060 # metrics
command: [ "sh", "./geth-entrypoint" ]
volumes:
- "./geth-data:/data"
environment:
- OP_GETH_GENESIS_FILE_PATH=goerli/genesis-l2.json
- OP_GETH_SEQUENCER_HTTP=https://goerli-sequencer.base.org
- OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt
- OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a # for localdev only
# - OP_GETH_ETH_STATS=nodename:secret@host:port # optional
env_file:
- .env.goerli
node:
build: .
depends_on:
Expand All @@ -25,26 +19,5 @@ services:
- 7300:7300 # metrics
- 6060:6060
command: [ "sh", "./op-node-entrypoint" ]
environment:
- OP_NODE_L1_ETH_RPC=https://ethereum-goerli-rpc.allthatnode.com # [recommended] replace with your preferred L1 (ethereum, not Base) node RPC URL
- OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt
- OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a # for localdev only
- OP_NODE_L2_ENGINE_RPC=http://geth:8551
- OP_NODE_LOG_LEVEL=info
- OP_NODE_METRICS_ADDR=0.0.0.0
- OP_NODE_METRICS_ENABLED=true
- OP_NODE_METRICS_PORT=7300
- OP_NODE_P2P_AGENT=base
- OP_NODE_P2P_BOOTNODES=enr:-J64QBbwPjPLZ6IOOToOLsSjtFUjjzN66qmBZdUexpO32Klrc458Q24kbty2PdRaLacHM5z-cZQr8mjeQu3pik6jPSOGAYYFIqBfgmlkgnY0gmlwhDaRWFWHb3BzdGFja4SzlAUAiXNlY3AyNTZrMaECmeSnJh7zjKrDSPoNMGXoopeDF4hhpj5I0OsQUUt4u8uDdGNwgiQGg3VkcIIkBg,enr:-J64QAlTCDa188Hl1OGv5_2Kj2nWCsvxMVc_rEnLtw7RPFbOfqUOV6khXT_PH6cC603I2ynY31rSQ8sI9gLeJbfFGaWGAYYFIrpdgmlkgnY0gmlwhANWgzCHb3BzdGFja4SzlAUAiXNlY3AyNTZrMaECkySjcg-2v0uWAsFsZZu43qNHppGr2D5F913Qqs5jDCGDdGNwgiQGg3VkcIIkBg
- OP_NODE_P2P_LISTEN_IP=0.0.0.0
- OP_NODE_P2P_LISTEN_TCP_PORT=9222
- OP_NODE_P2P_LISTEN_UDP_PORT=9222
- OP_NODE_ROLLUP_CONFIG=goerli/rollup.json
- OP_NODE_RPC_ADDR=0.0.0.0
- OP_NODE_RPC_PORT=8545
- OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
- OP_NODE_VERIFIER_L1_CONFS=4
# OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node
# is fully trusted. It also allows op-node to work with clients such as Erigon that do not
# support storage proofs.
# - OP_NODE_L1_TRUST_RPC=true
env_file:
- .env.goerli
6 changes: 3 additions & 3 deletions geth-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ fi
--ws.port="$WS_PORT" \
--ws.origins="*" \
--ws.api=debug,eth,txpool,net,engine \
--metrics \
--metrics.addr=0.0.0.0 \
--metrics.port="$METRICS_PORT" \
--metrics \
--metrics.addr=0.0.0.0 \
--metrics.port="$METRICS_PORT" \
--syncmode=full \
--gcmode=archive \
--nodiscover \
Expand Down

0 comments on commit fdafc9c

Please sign in to comment.