Skip to content
Open
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
7 changes: 3 additions & 4 deletions .env.sepolia
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# op-node configuration

# [required] replace with your preferred L1 (Ethereum, not Unichain) node RPC URL:
OP_NODE_L1_ETH_RPC=https://ethereum-sepolia-beacon-api.publicnode.com

OP_NODE_L1_ETH_RPC=https://ethereum-sepolia-rpc.publicnode.com
# [required] replace with your preferred L1 CL beacon endpoint:
OP_NODE_L1_BEACON=https://ethereum-sepolia-rpc.publicnode.com
OP_NODE_L1_BEACON=https://ethereum-sepolia-beacon-api.publicnode.com

OP_NODE_NETWORK=unichain-sepolia
OP_NODE_L2_ENGINE_AUTH=/shared/jwt.hex
OP_NODE_L2_ENGINE_AUTH=/jwtsecret
OP_NODE_L2_ENGINE_RPC=ws://execution-client:8551
OP_NODE_LOG_LEVEL=info
OP_NODE_LOG_FORMAT=logfmt
Expand Down
51 changes: 10 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
# Unichain Node
## Prerequisites and Requirements

![image](logo.png)
To run a Unichain Node (op-node and op-geth combination), please ensure you meet the following requirements:

This repository contains the relevant configuration to run your own node on the Unichain network.
### Hardware Requirements
- **CPU:** 4-ядерный процессор или выше.
- **RAM:** 8 GB или больше (рекомендуется 16 GB для лучшей стабильности).
- **Storage:** Не менее 100 GB свободного места (накопитель **SSD** настоятельно рекомендуется).

### Troubleshooting

If you encounter problems with your node, please open a [GitHub issue](https://github.com/Uniswap/unichain-node/issues)

### Supported Networks

| Network | Status |
|-------------------| ------ |
| Mainnet | ✅ |
| Testnet (Sepolia) | ✅ |


### Usage

1. Ensure you have an Ethereum L1 full node RPC available, and set `OP_NODE_L1_ETH_RPC` & `OP_NODE_L1_BEACON` (in the `.env.mainnet` file). If running your own L1 node, it needs to be synced before Unichain will be able to fully sync.
2. Select your network in the docker compose file by uncommenting .env.sepolia or .env.mainnet in both op-node and the execution client.
3. Run:

```
docker compose up -d
```

4. You should now be able to `curl` your Unichain node:

```
curl -d '{"id":1,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \
-H "Content-Type: application/json" http://localhost:8545
```

5. To stop your node, run:
```
docker compose down
```

#### Persisting Data

By default, the data directory is stored in `${PROJECT_ROOT}/geth-data`. You can override this by modifying the value of
`HOST_DATA_DIR` variable in the [`.env`](./.env) file.
### Software Requirements
- **Operating System:** Ubuntu 20.04 LTS или более новая версия.
- **Tools:** Должны быть установлены и настроены **Docker** и **Docker Compose**.
- **Dependency:** Необходим доступ к **Ethereum L1 Full Node RPC Endpoint** (Mainnet или Sepolia, в зависимости от сети, с которой вы синхронизируетесь).
22 changes: 13 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ services:
env_file:
- .env
# select your network here:
# - .env.sepolia
# - .env.mainnet
- .env.sepolia
# - .env.mainnet
ports:
- 30303:30303/udp
- 30303:30303/tcp
Expand All @@ -18,32 +18,36 @@ services:
- ${HOST_DATA_DIR}:/data
- shared:/shared
- ./op-geth-entrypoint.sh:/entrypoint.sh
healthcheck:
start_interval: 5s
start_period: 240s
test: wget --no-verbose --tries=1 --spider http://localhost:8545 || exit 1
- ./jwtsecret:/jwtsecret
# healthcheck секция удалена/закомментирована, чтобы избежать таймаутов
restart: always
entrypoint: /entrypoint.sh
command:
- --authrpc.addr=0.0.0.0
- --authrpc.port=8551
- --authrpc.jwtsecret=/jwtsecret

op-node:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.13.2
env_file:
- .env
# select your network here:
# - .env.sepolia
# - .env.mainnet
- .env.sepolia
# - .env.mainnet
ports:
- 9222:9222/udp
- 9222:9222/tcp
- 9545:9545/tcp
volumes:
- ${HOST_NODE_DATA_DIR}:/data
- shared:/shared
- ./jwtsecret:/jwtsecret
healthcheck:
start_interval: 5s
start_period: 240s
test: wget --no-verbose --tries=1 --spider http://localhost:9545 || exit 1
depends_on:
execution-client:
condition: service_healthy
condition: service_started # ИЗМЕНЕНО
restart: always
# command секция удалена
1 change: 1 addition & 0 deletions jwtsecret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
463f64f8d677c1b3a083934d6e6d50965778b5b41a8fde539ba06e7eb1a1f182