Skip to content

Commit

Permalink
update build script and instructions (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb authored Jul 17, 2021
1 parent 3417750 commit 8ee81e7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 31 deletions.
15 changes: 9 additions & 6 deletions build-genesis.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

set -ex
DENOM=ustarx
CHAIN_ID=cygnusx-1a
CHAIN_ID=cygnusx-1
GENTXS=cygnusx-1
ONE_HOUR=3600
ONE_DAY=$(($ONE_HOUR * 24))
ONE_YEAR=$(($ONE_DAY * 365))
VALIDATOR_COINS=1000000000000$DENOM
REQUIRED_VERSION="0.9.3"
REQUIRED_VERSION="0.10.0"
VERSION="$(starsd version | awk '{print $NF}')"
if [ "$VERSION" != "$REQUIRED_VERSION" ]; then
echo "starsd required $REQUIRED_VERSION, current $VERSION"
Expand All @@ -29,8 +29,8 @@ echo "Processing airdrop snapshot..."
if ! [ -f genesis.json ]; then
curl -O https://archive.interchain.io/4.0.2/genesis.json
fi
starsd export-airdrop-snapshot uatom genesis.json snapshot.json
starsd init testmoniker --chain-id $CHAIN_ID
starsd export-airdrop-snapshot uatom genesis.json snapshot.json
starsd prepare-genesis testnet $CHAIN_ID
starsd import-genesis-accounts-from-snapshot snapshot.json

Expand Down Expand Up @@ -77,5 +77,8 @@ done
starsd collect-gentxs
starsd validate-genesis

cp ~/.starsd/config/genesis.json $GENTXS
jq -S -f normalize.jq ~/.starsd/config/genesis.json > $GENTXS/sorted_genesis.json
cp ~/.starsd/config/genesis.json $GENTXS/pre-built.json
jq -S -f normalize.jq ~/.starsd/config/genesis.json > $GENTXS/genesis.json
cp $GENTXS/genesis.json ~/.starsd/config/genesis.json
sha256sum $GENTXS/genesis.json
sha256sum ~/.starsd/config/genesis.json
24 changes: 12 additions & 12 deletions cygnusx-1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@

Block explorer: [https://explorer.cygnusx-1.publicawesome.dev/](https://explorer.cygnusx-1.publicawesome.dev/)

Genesis file: https://github.com/public-awesome/networks/releases/download/cygnusx-1a/genesis.json
Genesis file: https://github.com/public-awesome/networks/releases/download/cygnusx-1-final/genesis.json

Hash: `sha256sum eacabd1f92a3d750610c53f27641aca0d38ec5fda370b4e821a05003e8b866f2`
Hash: `sha256sum d5baa2f54fbd4b0c84967e0b8a59bfa26ee5da6230da44f1f13624626cb3e927`

Seeds: `b5c81e417113e283288c48a34f1d57c73a0c6682@seed.cygnusx-1.publicawesome.dev:36656`
Seeds: `b5c81e417113e283288c48a34f1d57c73a0c6682@seed.cygnusx-1.publicawesome.dev:36657`

Peers: https://hackmd.io/ruGVasSzR9iUhIirVff44Q?both

## Overview

Thank you for submitting a gentx! This guide will provide instructions on getting ready for the testnet.

**The Chain Genesis Time is 17:00 UTC on July 15, 2021.**
**The Chain Genesis Time is 17:00 UTC on July 19, 2021.**

Please have your validator up and ready by this time, and be available for further instructions if necessary
at that time.
Expand All @@ -32,14 +32,14 @@ This guide assumes that you have completed the tasks involved in [Part 1](cygnus

These examples are written targeting an Ubuntu 20.04 system. Relevant changes to commands should be made depending on the OS/architecture you are running on.

### Update starsd to v0.9.3
### Update starsd to v0.10.0

Please update to the `v0.9.3` tag and rebuild your binaries.
Please update to the `v0.10.0` tag and rebuild your binaries.

```sh
git clone https://github.com/public-awesome/stargaze
cd stargaze
git checkout v0.9.3
git checkout v0.10.0

make install
```
Expand All @@ -53,10 +53,10 @@ starsd version --long

name: starsd
server_name: starsd
version: '"0.9.3"'
commit: a6ecce88b17428836041caf0fff8ada3c15afd00
version: 0.10.0
commit: eaa79abdf2942b143362aa15cfc204b4d977270b
build_tags: netgo,ledger
go: go version go1.16.3 darwin/amd64
go: go version go1.16.4 linux/amd64
```

If the software version does not match, then please check your `$PATH` to ensure the correct `starsd` is running.
Expand Down Expand Up @@ -148,8 +148,8 @@ _NOTE: This can take 10-30 minutes depending on your setup._
Verify your genesis file was created properly:

```sh
./checkgen.sh
42bf3aa2154bfa33deaa77c3a70d2aac94e382eb847ed3f07dbb71be695cd4d0
sha256sum ~/.starsd/config/genesis.json
d5baa2f54fbd4b0c84967e0b8a59bfa26ee5da6230da44f1f13624626cb3e927
```

_NOTE: You will need to install [jq](https://stedolan.github.io/jq/download/) if you haven't already for the above to work_.
Expand Down
26 changes: 13 additions & 13 deletions cygnusx-1/part1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
## Software requirements

- [Ubuntu Setup Guide](./ubuntu.md)
- Latest version : [v0.8.1](https://github.com/public-awesome/stargaze/releases/tag/v0.8.1)
- Latest version : [v0.10.0](https://github.com/public-awesome/stargaze/releases/tag/v0.10.0)

### Install Stargaze

#### Install Go

Stargaze is built using Go and requires Go version 1.15+. In this example, we will be installing Go on Ubuntu 20.04:
Stargaze is built using Go and requires Go version 1.16+. In this example, we will be installing Go on Ubuntu 20.04:

```sh
# First remove any existing old Go installation
sudo rm -rf /usr/local/go

# Install the latest version of Go using this helpful script
# Install the latest version of Go using this helpful script
curl https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash

# Update environment variables to include go
Expand Down Expand Up @@ -66,10 +66,10 @@ It will display the version of `starsd` currently installed:
```sh
name: stargaze
server_name: starsd
version: 0.8.1
commit: 7c5d8ed4379158ea6045697c55cda288efce8eff
build_tags: netgo
go: go version go1.16.5 darwin/amd64
version: 0.10.0
commit: eaa79abdf2942b143362aa15cfc204b4d977270b
build_tags: netgo,ledger
go: go version go1.16.4 linux/amd64
```

## Setup validator node
Expand All @@ -96,12 +96,12 @@ Below are the instructions to generate and submit your genesis transaction.
3. Add your account to your local genesis file with a given amount and the key you
just created. Use only `1000000000000ustarx`, other amounts will be ignored.

```sh
starsd add-genesis-account $(starsd keys show <key-name> -a) 1000000000000ustarx \
--vesting-amount 1000000000000ustarx \
--vesting-start-time 1626292800 \
--vesting-end-time 1626379200
```
```sh
starsd add-genesis-account $(starsd keys show <key-name> -a) 1000000000000ustarx \
--vesting-amount 1000000000000ustarx \
--vesting-start-time 1626292800 \
--vesting-end-time 1626379200
```

4. Generate the genesis transaction (gentx) that submits your validator info to the chain.
The amount here is how much of your own funds you want to delegate to your validator (self-delegate).
Expand Down

0 comments on commit 8ee81e7

Please sign in to comment.