Code Monkey home page Code Monkey logo

testnets's Introduction

Stargaze Bellatrix Testnet Instructions

TLDR

Block explorer: https://explorer.bellatrix-1.publicawesome.dev/ (Coming soon)

Binaries: v0.6.0

Genesis file: to be released

Seeds: c36b75183e4047fb788dcc526e751439a6fda1f0@seed.bellatrix-1.publicawesome.dev:36656

Minimum hardware requirements

  • 2GB RAM
  • 25GB of disk space
  • 1.4 GHz CPU

Software requirements

Stargaze has releases for Linux here.

Install Stargaze

You can install Stargaze by downloading the binary (easiest), or compiling from source.

Option 1: Download binary

  1. Download the binary for your platform: releases.
  2. Copy it to a location in your PATH, i.e: /usr/local/bin or $HOME/bin.

i.e:

# libwasmvm.so is needed by cgo bindings
> sudo wget https://github.com/CosmWasm/wasmvm/raw/v0.13.0/api/libwasmvm.so -O /lib/libwasmvm.so
> wget https://github.com/public-awesome/stargaze/releases/download/v0.6.0/stargaze_0.6.0_linux_amd64.tar.gz
> sudo tar -C /usr/local/bin -zxvf stargaze_0.6.0_linux_amd64.tar.gz

Option 2: Build from source

Requires Go version v1.15+.

> mkdir -p $GOPATH/src/github.com/public-awesome
> cd $GOPATH/src/github.com/public-awesome
> git clone https://github.com/public-awesome/stargaze && cd stargaze
> git fetch origin --tags
> git checkout v0.6.0
> FAUCET_ENABLED=true make install

Verify installation

To verify if the installation was successful, execute the following command:

> starsd version --long

It will display the version of starsd currently installed:

name: stargaze
server_name: starsd
version: 0.6.0
commit: 3f7bed1cd9384eeca878277e4dcb92d1aa3aea1b
build_tags: netgo,faucet
go: go version go1.15.8 linux/amd64

NOTE: Make sure build_tags includes "faucet", which is required for testnet.

Setup validator node

If you are looking to join the testnet post genesis time (MAR 23 2021 1600 UTC), skip to Create Testnet Validator

Below are the instructions to generate & submit your genesis transaction

Generate genesis transaction (gentx)

  1. Initialize the Stargaze directories and create the local genesis file with the correct chain-id

    > starsd init <moniker-name> --chain-id=bellatrix-1
  2. Create a local key pair

    > starsd keys add <key-name>
  3. Add your account to your local genesis file with a given amount and the key you just created. Use only 100000000ustarx, other amounts will be ignored. STARX is testnet STAR.

    > starsd add-genesis-account $(starsd keys show <key-name> -a) 100000000ustarx
  4. Create the gentx

    > starsd gentx <key-name> 90000000ustarx --chain-id=bellatrix-1

    If all goes well, you will see a message similar to the following:

    Genesis transaction written to "/home/user/.starsd/config/gentx/gentx-******.json"

Submit genesis transaction

NOTE: To prevent malicious validators, and to ensure a fair and decentralized launch, the following rules will be enforced:

  1. Github accounts must be at least 6 months old and have history; accounts with little activity may not be accepted.
  2. Only one gentx per Github account is allowed
  3. We reserve the right to exercise our best judgement to protect the network against Sybil attacks. Preference will be given to validators with a proven track record of validating for other networks.

Submit your gentx in a PR here

  • Fork the testnets repo into your Github account

  • Clone your repo using

    > git clone https://github.com/<your-github-username>/testnets
  • Copy the generated gentx json file to <repo_path>/bellatrix-1/gentx/

    > cd testnets
    > cp ~/.starsd/config/gentx/gentx*.json ./bellatrix-1/gentx/
  • Commit and push to your repo

  • Create a PR onto https://github.com/public-awesome/testnets

Start your validator node

Once after the genesis is released (MAR 22 2021 1600 UTC), follow the instructions below to start your validator node.

Genesis & seeds

Fetch genesis.json into starsd's config directory.

> curl https://raw.githubusercontent.com/public-awesome/testnets/master/bellatrix-1/genesis.json > $HOME/.starsd/config/genesis.json

Verify you have the correct genesis file:

> shasum -a 256 ~/.starsd/config/genesis.json
fb13172f39d0e888601b828aea104e830aa64c3893ff478194e4d41b2e61f793  genesis.json

Add seed nodes in config.toml.

> vi $HOME/.starsd/config/config.toml

Find the following section and add the seed nodes.

# Comma separated list of seed nodes to connect to
seeds = "c36b75183e4047fb788dcc526e751439a6fda1f0@seed.bellatrix-1.publicawesome.dev:36656"
# Comma separated list of persistent peers to connect to
persistent_peers = ""

Set validator gas fees

You can set the minimum gas prices for transactions to be accepted into your node's mempool. This sets a lower bound on gas prices, preventing spam. Stargaze can accept gas in any currency. To accept both ATOM and STARX for example, set minimum-gas-prices in app.toml.

> vi $HOME/.starsd/config/app.toml
minimum-gas-prices = "0.025ustarx"

Start node automatically (Linux only)

Create a systemd service

> sudo vi /etc/systemd/system/starsd.service

Copy and paste the following and update <your_username> and <go_workspace>:

[Unit]
Description=starsd
After=network-online.target

[Service]
User=<your_username>
ExecStart=/home/<your_username>/<go_workspace>/bin/starsd start
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

This assumes $HOME/go_workspace to be your Go workspace. Your actual workspace directory may vary.

> sudo systemctl enable starsd
> sudo systemctl start starsd

Check node status

> starsd status

Check logs

> journalctl -u starsd -f

Create testnet validator

This section applies to those who are looking to join the testnet post genesis.

  1. Init Chain and start your node

    > starsd init <moniker-name> --chain-id=bellatrix-1 --stake-denom=ustarx

    After that, please follow all the instructions from Start your validator node

  2. Create a local key pair

    > starsd keys add <key-name>
    > starsd keys show <key-name> -a
  3. Create validator

    $ starsd tx staking create-validator \
    --amount 9000000000ustarx \
    --commission-max-change-rate "0.1" \
    --commission-max-rate "0.20" \
    --commission-rate "0.1" \
    --min-self-delegation "1" \
    --details "validators write bios too" \
    --pubkey=$(starsd tendermint show-validator) \
    --moniker <your_moniker> \
    --chain-id bellatrix-1 \
    --from <key-name>
  4. Request tokens from the Stargaze Discord #validator channel if you need more.

testnets's People

Contributors

awatin avatar blockproduction avatar cfl0ws avatar elsehow avatar gaia avatar gavinly avatar jakehartnell avatar jhernandezb avatar shanev avatar stan-bl avatar syngoquy avatar tolon 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.