Skip to content

Commit

Permalink
Merge pull request #206 from 0xPolygon/EmpieichO-patch-1
Browse files Browse the repository at this point in the history
Update production-node.md
  • Loading branch information
EmpieichO authored Feb 7, 2024
2 parents 9a64240 + 01c0938 commit 01216fe
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions docs/zkEVM/get-started/setup-nodes/production-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,34 @@ Let's start setting up our zkNode:
ZKEVM_CONFIG_DIR=./path_to_config
```

1. Download and extract the artifacts. Note that you may need to [install unzip](https://formulae.brew.sh/formula/unzip) before running this command.
2. Download and extract the artifacts. Note that you may need to [install unzip](https://formulae.brew.sh/formula/unzip) before running this command. Also, unlike the mainnet and the Goerli testnet that use the latest version, Cardona testnet uses a specific version.

```bash
So use the next `curl` command specifically for Cardona, which uses version 0.5.5 (Note that the latest version, Cardona v0.5.6, is available and can equally be used.):

```bash
curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/download/v0.5.5/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip
```

And use this second command for either mainnet or testnet (Goerli):

```bash
curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip
```

3. Copy the `example.env` file with the environment parameters:
4. Copy the `example.env` file with the environment parameters:

```sh
cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env
```

4. The `example.env` file must be modified according to your configurations.
5. The `example.env` file must be modified according to your configurations.

Edit the .env file with your favourite editor (we'll use nano in this guide): ```nano $ZKEVM_CONFIG_DIR/.env```
```bash
# ZKEVM_NETWORK = "mainnet" or ZKEVM_NETWORK = "cardona" or ZKEVM_NETWORK = "testnet"
# URL of a JSON RPC for Goerli
ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url"
Expand All @@ -101,13 +111,13 @@ Let's start setting up our zkNode:
ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb"
```
5. To run the zkNode instance, run the following command:
6. To run the zkNode instance, run the following command:
```bash
sudo docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d
```
6. Run this command to check if everything went well and all the components are running properly:
7. Run this command to check if everything went well and all the components are running properly:
```bash
docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml ps
Expand All @@ -120,7 +130,7 @@ Let's start setting up our zkNode:
- **zkevm-pool-db**
- **zkevm-prover**
7. You should now be able to run queries to the JSON-RPC endpoint at `http://localhost:8545`.
8. You should now be able to run queries to the JSON-RPC endpoint at `http://localhost:8545`.
## Testing
Expand Down

0 comments on commit 01216fe

Please sign in to comment.