Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
IAvecilla committed Mar 12, 2024
1 parent 7aeaa51 commit 8b62ca2
Showing 1 changed file with 11 additions and 40 deletions.
51 changes: 11 additions & 40 deletions node/tools/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Running Test Consensus Nodes

These instructions guide you through the process of setting up and running a test consensus node in both local and Dockerized environments. Additionally, examples are provided to demonstrate how to run two or more nodes, communicating and doing consensus between them.
These instructions guide you through the process of setting up and running a test consensus node in both local and Clusterized environments.

## Local Setup

Expand All @@ -12,47 +12,13 @@ These instructions guide you through the process of setting up and running a tes
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 name `node_{NODE_NUMBER}`, providing essential configuration files for the corresponding node. The `NODE_NUMBER` is simply a numerical identifier for each node.
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.

```bash
make node NODE=<NODE_NUMBER>
make node IP=<NODE_IP>
```

The default value for this command is set to `0` for launching the initial node, and you can increment the number for subsequent nodes. Note that running this command will take control of the terminal.

## Dockerized Setup

To launch a standalone consensus node in a Docker container, run the following command in the project root (era-consensus):

```bash
make node_docker
```

This command creates a container running a single node that advances views and finalizes blocks.

For a simple example with two nodes communicating in different containers, use:

```bash
make consensus_docker_example
```

This sets up two containers, each hosting a consensus node, interlinked and progressing through views to finalize blocks, achieving consensus between them.

To stop the node containers, use:

```bash
make stop_docker_nodes
```

The node will resume the last viewed block from the previous session when initiated again.

To clean all states after running these commands, use:

```bash
make clean_docker
```

> This deletes the generated images and containers, requiring regeneration.
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.


## Running in minikube
Expand Down Expand Up @@ -97,7 +63,12 @@ To start the minikube dashboard in order to inspect the deployed pods. Remember
Finally to clean everything up

```bash
minikube delete --all
make clean
```

will remove all namespaces, deployments and pods from the minikube environment.
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:

```bash
minikube delete --all
```

0 comments on commit 8b62ca2

Please sign in to comment.