Skip to content

Asphere-xyz/bas-devnet-setup

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published