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

feat: improve network configuration handling #395

Merged
merged 2 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Base node

Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users onchain. It's built on Optimisms open-source [OP Stack](https://stack.optimism.io/).
Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users onchain. It's built on Optimism's open-source [OP Stack](https://stack.optimism.io/).

This repository contains the relevant Docker builds to run your own node on the Base network.

Expand Down Expand Up @@ -55,7 +55,13 @@ If you encounter problems with your node, please open a [GitHub issue](https://g
### Usage

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. Uncomment the line relevant to your network (`.env.sepolia`, or `.env.mainnet`) under the 2 `env_file` keys in `docker-compose.yml`.
2. Set the `NETWORK_ENV` environment variable to specify your network:
```bash
# For mainnet:
export NETWORK_ENV=.env.mainnet
# For testnet:
export NETWORK_ENV=.env.sepolia
```
3. Run:

```
Expand Down Expand Up @@ -117,7 +123,7 @@ $( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Cont

## Disclaimer

Were excited for you to build on Base 🔵 — but we want to make sure that you understand the nature of the node software and smart contracts offered here.
We're excited for you to build on Base 🔵 — but we want to make sure that you understand the nature of the node software and smart contracts offered here.

THE NODE SOFTWARE AND SMART CONTRACTS CONTAINED HEREIN ARE FURNISHED AS IS, WHERE IS, WITH ALL FAULTS AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NON- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN PARTICULAR, THERE IS NO REPRESENTATION OR WARRANTY THAT THE NODE SOFTWARE AND SMART CONTRACTS WILL PROTECT YOUR ASSETS — OR THE ASSETS OF THE USERS OF YOUR APPLICATION — FROM THEFT, HACKING, CYBER ATTACK, OR OTHER FORM OF LOSS OR DEVALUATION.

Expand Down
8 changes: 2 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ services:
volumes:
- ${HOST_DATA_DIR}:/data
env_file:
# select your network here:
# - .env.sepolia
# - .env.mainnet
- ${NETWORK_ENV:?.env.mainnet} # Requires NETWORK_ENV to be set, defaults to mainnet
node:
build:
context: .
Expand All @@ -30,6 +28,4 @@ services:
- "6060:6060" # pprof
command: [ "bash", "./op-node-entrypoint" ]
env_file:
# select your network here:
# - .env.sepolia
# - .env.mainnet
- ${NETWORK_ENV:?.env.mainnet} # Requires NETWORK_ENV to be set, defaults to mainnet