Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anataliocs/zora-node


https://github.com/anataliocs/zora-node

Last synced: 1 day ago
JSON representation

Awesome Lists containing this project

README

        

![Conduit](logo.png)

# Running a Zora node

This repo shows your how to run a Zora node on Spheron.

Sign up for a [Spheron account here](https://app.spheron.network/#/signup).

Zora is a Conduit network which provides fully-managed, production-grade rollups on Ethereum.

### Software requirements

- [Docker](https://docs.docker.com/desktop/)
- [Python 3](https://www.python.org/downloads/)

### Hardware requirements

Minimum configuration to run a node:

- at least 16 GB RAM
- an SSD drive with at least 200 GB free

### Troubleshooting

If you encounter problems with your node, please reach out on our [Discord](https://discord.com/invite/spheron-network-745315423783878757).

### Supported networks

|Network|Slug|Status|
|------------------|------|:----:|
| Zora Sepolia|zora-sepolia-0thyhxtf5e|✅|
| Zora Mainnet|zora-mainnet-0|✅|

### Usage

Export network name:
```
export CONDUIT_NETWORK=zora-mainnet-0
```

Note: The external nodes feature must be enabled on the network for this to work. For the public networks above this is already set.

Create ENV file
```
cp .env.example .env
```

Add RPC node provider endpoint to your `.env` file:
```
# Preferred L1 Ethereum node RPC URL:
OP_NODE_L1_ETH_RPC=https://mainnet.gateway.tenderly.co/
```

If you are running a stack using `celestia` for DA, copy instead `.env.example.celestia` to `.env`, set also `CELESTIA_CORE_IP`, `CELESTIA_API` and `CELESTIA_P2P_NETWORK`. Example:

```
# .env file
# see celestia doc for public nodes list
# testnet https://docs.celestia.org/nodes/mocha-testnet#bridge-full-and-light-nodes
# mainnet https://docs.celestia.org/nodes/mainnet
CELESTIA_CORE_IP=full.consensus.mocha-4.celestia-mocha.com
CELESTIA_API=https://rpc.celestia-mocha.com
# mocha-4 for testnet and for mainnet use mainnet
CELESTIA_P2P_NETWORK=mocha-4
```

4. Start the node!

```
docker compose up --build
```

For stacks using `celestia` for DA
```
docker compose -f docker-compose.celestia.yml up --build
```

5. You should now be able to `curl` your Zora node:

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

Note: Some L1 nodes (e.g. Erigon) do not support fetching storage proofs. You can work around this by specifying `--l1.trustrpc` when starting op-node (add it in `op-node-entrypoint` and rebuild the docker image with `docker compose build`.) Do not do this unless you fully trust the L1 node provider.

You can map a local data directory for `op-geth` by adding a volume mapping to the `docker-compose.yaml`:

```yaml
services:
geth: # this is Optimism's geth client
#...
volumes:
- ./geth-data:/data
```

### Syncing

Sync speed depends on your L1 node, as the majority of the chain is derived from data submitted to the L1. You can check your syncing status using the `optimism_syncStatus` RPC on the `op-node` container. Example:

```
command -v jq &> /dev/null || { echo "jq is not installed" 1>&2 ; }
echo Latest synced block behind by: \
$((($( date +%s )-\
$( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Content-Type: application/json" http://localhost:7545 |
jq -r .result.unsafe_l2.timestamp))/60)) minutes
```

### Network Stats

You can see how many nodes you are connected with the following command:

```
curl -d '{"id":0,"jsonrpc":"2.0","method":"opp2p_peerStats","params":[]}' \
-H "Content-Type: application/json" http://localhost:7545
```