๐ A CLI to setup and manage Matic validator nodes
Please make sure you have installed following dependencies:
- Build Essentials
sudo apt update sudo apt install build-essential
- Node v10.17.0
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash nvm install 10.17.0
- Go 1.18+
wget https://raw.githubusercontent.com/maticnetwork/node-ansible/master/go-install.sh bash go-install.sh --remove bash go-install.sh
- Docker (https://docs.docker.com/engine/install/ubuntu/, https://docs.docker.com/engine/install/linux-postinstall/)
- Solc v0.5.16
sudo snap install solc
- Python 2
sudo apt install python2 alias python="/usr/bin/python2"
Please make sure you have installed following dependencies:
- Go 1.18+
- Rabbitmq
sudo apt install rabbitmq-server
- Npm (Only required on ganache remote machine)
sudo apt update sudo apt install nodejs npm
- Ganache CLI (Only required on ganache remote machine)
sudo npm install -g ganache-cli
cd ~
git clone https://github.com/maticnetwork/matic-cli.git
cd matic-cli
npm i
mkdir devnet
cd devnet
../bin/matic-cli setup devnet -c ../configs/devnet/docker-setup-config.yaml
You can find more details about configuration options here.
Alternatively, setup a local/remote network interactively
../bin/matic-cli setup devnet -i
Notes:
- We have provided the default values where ever so to ensure smooth functioning of the process
After the setup is done, follow these steps for local docker deployment:
Start ganache
bash docker-ganache-start.sh
Start all heimdall instances (it will run all services - rabbitmq, heimdall, bridge, server)
bash docker-heimdall-start-all.sh
Setup bor
bash docker-bor-setup.sh
Start bor
bash docker-bor-start-all.sh
Logs
Logs will be at logs/
folder
../bin/matic-cli setup devnet -c ../configs/devnet/remote-setup-config.yaml
You can find more details about configuration options here.
Alternatively, setup a local/remote network interactively
../bin/matic-cli setup devnet -i
Notes:
- The host machine and remote machine has to be an linux machine with ubuntu as user
- The ganache URL hostname will be used for ganache - http://<1st machine IP>:9545
- Make sure that the host machines has access to remote machines for transferring the data
- We have provided the default values where ever so to ensure smooth functioning of the process
After the setup is done, follow these steps for local docker deployment:
- Log into first machine and run ganache:
cd ~/
bash ganache-start-remote.sh
- Log into the remote machines and on each machine run the following steps in different terminals:
cd ~/node
bash heimdalld-setup.sh
heimdalld start
heimdalld rest-server
bridge start --all
cd ~/node
bash bor-setup.sh
bash bor-start.sh
Remove the devnet folder and you can start the process once again
MIT