Polygon zkEVM
Instructions to set up your Polygon ZkEVM node.
Note: Currently ARM-based CPUs are not supported
Requirements
- Setup your Axelar validator
- Minimum hardware requirements: 4 cores, 32G RAM, 128G Disk with high IOPS.
- Ubuntu 22.04, Docker(tested on 22.04)
- Official Documentation
- Official Documentation
Prerequisites
This is the most straightforward path to run a zkEVM node, and it’s perfectly fine for most use cases, This is quite opinionated, feel free to run this software in a different way, for instance it’s not needed to use Docker, you could use the Go and C++ binaries directly. Some instructions to install Prerequisites are give here however be sure to check the official documentation to install docker compose in case this doesn’t work
Create necessary directories
You can modify the paths as per your requirements
Get network configurations
Storing directory paths to variables to reuse
Fetch network configuration files
Set node config
Update the variables in $ZKEVM_CONFIG_DIR/.env
Note: ZKEVM_NODE_ETHERMAN_URL must point to the validator’s ethereum rpc node for security
Optional
We will need to use directories defined earlier when we want to pass config and env file to docker-compose, it would be nice to persist them across sessions Add them to your shell file of your choice
Start the node
This should show an output like this:
After it is done, verify by listing the services and their status
You should see the following containers running
Check logs
Verify zkevm-rpc logs
You should see logs like
Similarly, you can check logs for other containers too
Verify node sync status
RPC Endpoint
Method 1:
If you get something like this in response to the above rpc call, your node is setup correctly
You can use a hex to number convertor to get the block height
You can compare the block height on your node with explorer (mainnet or testnet), use your RPC node only when it has caught up with the latest block height.
Configure vald
In order for vald
to connect to your Zk EVM node, your rpc_addr
should be exposed in
vald’s config.toml
Common Node Operations
To start
To stop
To update
To update the zkNode software, repeat the setup steps, being careful not to overwrite the configuration files that you have modified.
To stop and wipe out everything