Git Product home page Git Product logo

matic-cli's Introduction

Matic CLI

๐Ÿ— A CLI to setup and manage Matic validator nodes

Installation (Host Machine, Ubuntu for e.g.)

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"

Installation (Remote Machine, Ubuntu for e.g.)

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

Usage

cd ~
git clone https://github.com/maticnetwork/matic-cli.git
cd matic-cli
npm i
mkdir devnet
cd devnet

To setup multi-node local network

../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:

  1. 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

To setup multi-node remote network

../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:

  1. The host machine and remote machine has to be an linux machine with ubuntu as user
  2. The ganache URL hostname will be used for ganache - http://<1st machine IP>:9545
  3. Make sure that the host machines has access to remote machines for transferring the data
  4. 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:

  1. Log into first machine and run ganache:
cd ~/
bash ganache-start-remote.sh
  1. 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

Clean Setup

Remove the devnet folder and you can start the process once again

License

MIT

matic-cli's People

Contributors

jdkanani avatar temaniarpit27 avatar cffls avatar mankenavenkatesh avatar ssandeep avatar arp avatar harsh-98 avatar tokamak-git avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.