This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FM-150: Subnet deployment scripts (#222)
* Add scripts to deploy testnet nodes Co-authored-by: Denis Kolegov <[email protected]> Co-authored-by: Akosh Farkash <[email protected]>
- Loading branch information
1 parent
67db31f
commit f28efaa
Showing
18 changed files
with
853 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Local Testnets | ||
|
||
Prerequisites: | ||
```bash | ||
make build docker-build | ||
``` | ||
|
||
## Single node deployment | ||
|
||
To run IPC in the local rootnet just perform the following : | ||
```bash | ||
cargo make --makefile ./infra/Makefile.toml node | ||
|
||
``` | ||
|
||
It will create three docker containers (cometbft, fendermint, and eth-api). | ||
|
||
To stop run the following: | ||
```bash | ||
cargo make --makefile ./infra/Makefile.toml node-down | ||
``` | ||
|
||
## Local 4-nodes deployment | ||
To run IPC in the local rootnet with 4 nodes perform the following command : | ||
```bash | ||
cargo make --makefile ./infra/Makefile.toml testnet | ||
|
||
``` | ||
|
||
To stop the network: | ||
```bash | ||
cargo make --makefile ./infra/Makefile.toml testnet-down | ||
``` | ||
|
||
The testnet contains four logical nodes. Each node consists of cometbft, fendermint, and ethapi containers. | ||
The Docker internal network is `192.167.10.0/24`. | ||
|
||
ETH-API is accessible on the following interfaces on the Docker internal network: | ||
- `192.167.10.10:8545` or `ethapi-node0:8545` | ||
- `192.167.10.11:8545` or `ethapi-node1:8545` | ||
- `192.167.10.12:8545` or `ethapi-node2:8545` | ||
- `192.167.10.13:8545` or `ethapi-node3:8545` | ||
|
||
and on the following interfaces from the host machine: | ||
- `127.0.0.1:8545` | ||
- `127.0.0.1:8546` | ||
- `127.0.0.1:8547` | ||
- `127.0.0.1:8548` | ||
|
||
## Deployment process | ||
|
||
The deployment process is as follows: | ||
- Remove all docker containers, files, networks, etc. from the previous deployment | ||
- Create all necessary directories | ||
- Initialize CometBFT testnet by creating `config` and `data` directories using `cometbft` tools | ||
- Read cometbft nodes private keys,derive node IDs and store in `config.toml` for each node | ||
- Create the `genesis` file for Fendermint | ||
- Share the genesis among all Fendermint nodes | ||
- Run Fendermint application in 4 containers | ||
- Run CometBFT in 4 containers | ||
- Run Eth API in 4 containers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
COMETBFT_VERSION=v0.37.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "fendermint_infra" | ||
description = "Workflows for the deployment of Fendermint infrastructure" | ||
version = "0.1.0" | ||
authors.workspace = true | ||
edition.workspace = true | ||
license.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Oops, something went wrong.