Giter Site home page Giter Site logo

bootstrap's Introduction

Pontem Bootstrap

IMPORTANT: If you are using an Apple computer on the M1 chip or any other non x86_64 architecture (like the Raspberry Pi and others), you need to use the source build. In the .env file specify DOCKERFILE=source.Dockerfile instead of DOCKERFILE=Dockerfile. You need at least 16gb of RAM for the build!

Step 1: Install docker and docker-compose

For this option to work you'll need Docker (v18.06.0+) and docker-compose (v1.29+).

Step 2: Clone this repo

git clone https://github.com/pontem-network/bootstrap.git pontem-bootstrap
cd pontem-bootstrap

Step 3 - Set environment in .env

Application uses .env file as config.

If to testnet, then you need .env.testnet:

cp .env.testnet .env

You can customize it, but for the first run it's not that important.

nano .env # or vi .env # or any editor you choose

Step 4: Generate keys

Note: If you want to build image from the source, uncomment the build section.

The first thing to do is pull the docker container:

docker-compose pull

Now you need to generate an mnemonic phrase for your account (if you don't have one):

# Important!!!
# You need to save the output of this command.
# Do not give this data to anyone!
docker-compose run pontem-node pontem key generate --scheme sr25519

Add Nimbus key:

# Replace <you_mnemonic> with your mnemonic phrase.
docker-compose run pontem-node pontem key insert --suri "<you_mnemonic>" --keystore-path /opt/pontem/keys --key-type nmbs

Step 5: Become collator

Ignore this step if you just want to launch node and don't want to become collator

Get your public key:

# Replace <you_mnemonic> with your mnemonic phrase.
docker-compose run pontem-node pontem key inspect --keystore-path /opt/pontem/keys "<you_mnemonic>"

Now you need to navigate to Pontem Docs and follow all the steps given there.

Step 6: Launch node

Run node: Note: the collator will start its work in the next round, each round lasts 300 blocks.

docker-compose up -d

Show logs:

docker-compose logs -f --tail 10

Stop node:

docker-compose down

If you need additional node configuration, you can add additional arguments to the docker-compose.yml file in the command line. To view all parameters of a node:

docker-compose run pontem-node pontem --help

Optional: Monitoring

You can also easily add monitoring to your node (grafana + prometheus):

docker-compose -f monitoring.docker-compose.yml up -d

After that open <your-server-ip>:3000 in browser. Login and password admin

Optional: Node autorestart

You can also enable automatic node auto restart in case of errors:

docker run -d --name autorestart-pontem --restart always -v /var/run/docker.sock:/var/run/docker.sock pontem/pontem-scripts:latest autorestart pontem-node 300 5

Documentation

See Move VM Pallet documentation.

FAQ

See Staking FAQ.

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.