Git Product home page Git Product logo

bas-devnet-setup's Introduction

BAS DevNet Setup

This repository contains scripts for running an independent instance of BAS.

Before running command you must do following steps:

  • Buy a dedicated machine that have at least 8 dedicated CPU core and 32GB RAM (it runs 7 nodes)
  • Make sure you have wildcard domain *.example.com set to your machine (use dedicated machine with public IP)
  • Modify config.json file to update parameters you need (you can find all addresses in keystore folder)

Config structure:

  • chainId - identifier of your BAS chain
  • validators - list of initial validator set (make sure that you have the same list in docker compose file)
  • systemTreasury - address of system treasury that accumulates 1/16 of rewards (might be governance)
  • consensusParams - parameters for the consensus and staking
    • activeValidatorsLength - total amount of active validators (suggested values are 3k+1, where k is honest validators, even better, for example 7, 13, 19, 25, 31...)
    • epochBlockInterval - better to use 1 day epoch (86400/3=28800, where 3s is block time)
    • misdemeanorThreshold - after missing this amount of blocks per day validator losses all daily rewards (penalty)
    • felonyThreshold - after missing this amount of blocks per day validator goes in jail for N epochs
    • validatorJailEpochLength - how many epochs validator should stay in jail (7 epochs = ~7 days)
    • undelegatePeriod - allow claiming funds only after 6 epochs (~7 days)
    • minValidatorStakeAmount - how many tokens validator must stake to create a validator (in ether)
    • minStakingAmount - minimum staking amount for delegators (in ether)
  • initialStakes - initial stakes fot the validators (must match with validators list)
  • votingPeriod - default voting period for the governance proposals
  • faucet - map with initial balances for faucet and other needs

You can check Makefile to choose the most interesting commands, but if you just need to set up everything just run next command:

apt update
apt install -y build-essential socat
git clone https://github.com/Ankr-network/bas-devnet-setup bas --recursive
cd bas
make install-docker
make install-acme
export CHAIN_ID=14000
export DOMAIN_NAME=dev-01.bas.ankr.com
make all

P.S: Variable DOMAIN_NAME should be set to your domain

Deployed services can be access though next endpoints:

If you want to run node w/o load balancer and SSL certificates then use next command:

CHAIN_ID=14000 make create-genesis start

Docker compose files exposes next ports:

  • 30303 - bootnode endpoint
  • 8545 - RPC endpoint
  • 8546 - WS endpoint
  • 3000 - faucet UI
  • 3001 - staking UI
  • 3002 - config UI
  • 8080 - genesis config endpoint
  • 7432 - blockscout PostgreSQL database
  • 4000 - blockscout explorer
  • 9000 - explorer

bas-devnet-setup's People

Contributors

bascrew avatar dmitry123 avatar hoanghiep 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.