Crates.io | zksync_consensus_tools |
lib.rs | zksync_consensus_tools |
version | 0.1.0-rc.2 |
source | src |
created_at | 2024-07-09 08:08:30.567653 |
updated_at | 2024-07-09 17:04:43.654445 |
description | ZKsync consensus tools |
homepage | https://matter-labs.io/ |
repository | https://github.com/matter-labs/era-consensus |
max_upload_size | |
id | 1296736 |
size | 166,414 |
These instructions guide you through the process of setting up and running a test consensus node in both local and Clustered environments.
Edit the addresses.txt
file located in the root directory of the tools crate. This file contains node addresses in the format IP:PORT
. For a single node, use the example file. To run multiple nodes communicating with each other, write each node address on a separate line. This will run one node per address.
Move to the project root (era-consensus) and execute the following commands:
make nodes_config
This command creates a directory named nodes-config
and generates a folder for each address listed in the .txt
file with the ip as the directory name, providing essential configuration files for the corresponding node.
make node IP=<NODE_IP>
The default value for this command is set to 127.0.0.1:3054
for launching the initial node, to run a different node just use the IP previously detailed in the addresses.txt
file. Note that running this command will take control of the terminal.
To run a number of nodes locally in minikube, first we need to build the binary:
make docker_build_executor
This command will create the executor
binary to be included in a docker image.
Before running the deployment script, ensure minikube is installed and running:
minikube start
Then run
make start_k8s_nodes NODES=<number> SEED_NODES=<number>
Here, NODES
is the desired total amount of nodes to run in the k8s cluster (defaults to 4 if omitted), and SEED_NODES
is the amount of those nodes to be deployed first as seed nodes (defaults to 1).
This command will:
You may run
minikube dashboard
To start the minikube dashboard in order to inspect the deployed pods. Remember to use consensus
namespace to find all consensus related infrastructure.
Finally to clean everything up
make clean
This will remove all namespaces, deployments and pods from the minikube environment and the images generated in Docker.
If you want to stop the minikube
environment just do:
minikube delete --all