diff --git a/README.md b/README.md index 85e3611..0ee446f 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ -# Validators School testnet +# Validators School Sputnik Testnet -## Cosmos Hub binaries installation (gaiad) +## Sputnik app-chain binaries installation (sputnikd) + +Sputnik app testnet binary repo +https://github.com/Distributed-Validators-Synctems/sputnik-app-chain-practice -For the sake of simplicity we decided to use Cosmos Hub service binary. In order to install it please follow steps from this [instruction](https://hub.cosmos.network/main/getting-started/installation.html). It is based on the `v7.0.2` version of `gaiad` binary. -Please check versiob of used bianry by running this command `gaiad version --long`. You should get big list of text and at the beginig of it you should have following lines: ``` -name: gaia -server_name: gaiad -version: v7.0.2 -commit: cd27aaaf39cc7819b5164e4baf3fd5aad23ec52a +name: SputnikApp +server_name: sputnikd +version: v15.2.0 +commit: 7281c9b9dc4e3087ee87f5b24e416802b52e8661 build_tags: netgo ledger ``` @@ -17,38 +18,38 @@ build_tags: netgo ledger ### Init ```bash: -gaiad init "" --chain-id +sputnikd init "" --chain-id ``` ### Generate keys ```bash: # To create new keypair - make sure you save the mnemonics! -gaiad keys add +sputnikd keys add ``` or ``` # Restore existing odin wallet with mnemonic seed phrase. # You will be prompted to enter mnemonic seed. -gaiad keys add --recover +sputnikd keys add --recover ``` or ``` # Add keys using ledger -gaiad keys show --ledger +sputnikd keys show --ledger ``` Check your key: ``` # Query the keystore for your public address -gaiad keys show -a +sputnikd keys show -a ``` ### Create account to genesis ``` -gaiad add-genesis-account 1000000000uatom --keyring-backend +sputnikd add-genesis-account 1000000000uatom --keyring-backend ``` ### Create GenTX @@ -56,8 +57,8 @@ gaiad add-genesis-account 1000000000uatom --keyring-backend 1000000000uatom --output-document=gentx.json \ - --chain-id=dvs-protocol-v1 \ +sputnikd gentx 1000000000uatom --output-document=gentx.json \ + --chain-id= \ --moniker="" \ --website= \ --details= \ diff --git a/gentx/pavel-gentx.json b/gentx/pavel-gentx.json new file mode 100644 index 0000000..615ac49 --- /dev/null +++ b/gentx/pavel-gentx.json @@ -0,0 +1,62 @@ +{ + "body": { + "messages": [ + { + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "description": { + "moniker": "pavel", + "identity": "", + "website": "", + "security_contact": "", + "details": "" + }, + "commission": { + "rate": "0.100000000000000000", + "max_rate": "0.200000000000000000", + "max_change_rate": "0.010000000000000000" + }, + "min_self_delegation": "0", + "delegator_address": "sputnik1adxlv98tncu2cxldv8hd7z78nd4e8ln454wtks", + "validator_address": "sputnikvaloper1adxlv98tncu2cxldv8hd7z78nd4e8ln40fft09", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "1YUbv9gEpx2AmvUmb+H5f1/sPLMrE/7/CgmZtrkhqyg=" + }, + "value": { + "denom": "usputnik", + "amount": "10000000" + } + } + ], + "memo": "d236c62edc593476ad79bb13b028ab80e1c15d3a@128.199.142.104:26656", + "timeout_height": "0", + "extension_options": [], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [ + { + "public_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "A91CspwDo82R4WVPiVVUp9OQpijHhmS549u1B66E3hDZ" + }, + "mode_info": { + "single": { + "mode": "SIGN_MODE_DIRECT" + } + }, + "sequence": "0" + } + ], + "fee": { + "amount": [], + "gas_limit": "200000", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [ + "41SCQOAx2ZlcXc6QMu0xhiyAfR2VwhgEphlxDp9cZAFfRb5ACxzt4vIKrtLsUNlklHVoI2uv7RHm6MehaxBBeg==" + ] +} diff --git a/testnet_instructions.md b/testnet_instructions.md index 9d9caf0..ad917a3 100644 --- a/testnet_instructions.md +++ b/testnet_instructions.md @@ -2,13 +2,13 @@ ## **Quick Links** -Genesis: `link` +Genesis: TBD -Block explorer: `TBA` +Block explorer: TBD -Seeds: TBA +Peers: TBD -Chain Id: TBA +Chain Id: `sputnik-practice-1` ## **Hardware Requirements** @@ -20,73 +20,77 @@ Here are the minimal hardware configs required for running a validator/sentry no ## **Software Requirements** -- Ubuntu 20.04+ or Debian 10+ -- [Go v1.18+](https://golang.org/doc/install) +- Ubuntu 22.04+ +- [Go v1.21+](https://golang.org/doc/install) -## **Install Gaiad, Generate Wallet and Submit GenTx** +## **Install sputnikd, Generate Wallet and Submit GenTx** -### ****Cosmos Hub binaries installation (gaiad)**** +### ****Sputnik app-chain binaries installation (sputnikd)**** -For the sake of simplicity we decided to use Cosmos Hub service binary. In order to install it please follow steps from official Cosmos HUB [instructions](https://hub.cosmos.network/main/getting-started/installation.html). It is based on the `v7.0.2` version of `gaiad` binary. Please check version of used binary by running this command `gaiad version --long`. You should get big list of text and at the beginning of it you should have following lines: +Sputnik app testnet binary repo +https://github.com/Distributed-Validators-Synctems/sputnik-app-chain-practice ``` -name: gaia -server_name: gaiad -version: v7.0.2 -commit: cd27aaaf39cc7819b5164e4baf3fd5aad23ec52a +name: SputnikApp +server_name: sputnikd +version: v15.2.0 +commit: 7281c9b9dc4e3087ee87f5b24e416802b52e8661 build_tags: netgo ledger ``` ### Network init -`cd ~` -`gaiad init "" --chain-id ` +```bash +cd ~ +sputnikd init "" --chain-id sputnik-school-testnet +``` example: -`gaiad init course-participant-1 --chain-id dvs-course-testnet-1` +```bash +sputnikd init course-participant-1 --chain-id dvs-course-testnet-4 +``` ### **Create Validator Key** It's very important that after you run this command that you save the seed phrase that is generated. If you do not save you phrase, you will not be able to recover this account. -`gaiad keys add ` +`sputnikd keys add ` or restore existing wallet with mnemonic seed phrase. You will be prompted to enter mnemonic seed. -`gaiad keys add --recover` +`sputnikd keys add --recover` or add keys using ledger -`gaiad keys add --ledger` +`sputnikd keys add --ledger` Check your key: -`gaiad keys show -a` +`sputnikd keys show -a` ### ****Create account to genesis**** -This command will help you to create account in your local genesis file. It will add funds to your address. Otherwise `gaiad getntx` command will fail because of lack of funds. +This command will help you to create account in your local genesis file. It will add funds to your address. Otherwise `sputnikd getntx` command will fail because of lack of funds. -`gaiad add-genesis-account 1000000000uatom` +`sputnikd add-genesis-account 1000000000uatom` ### ****Create GenTX**** Create the gentx file. Note, your gentx will be rejected if you use any amount greater than 1000000000uatom. ``` -gaiad gentx 1000000000uatom --output-document=gentx.json \ - --chain-id=dvs-course-testnet-1 \ +sputnikd gentx 1000000000uatom \ + --chain-id=sputnik-school-testnet \ --moniker="" \ --website= \ --details= \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ - --commission-max-change-rate="0.01" \ - --min-self-delegation="1" + --commission-max-change-rate="0.01" ``` -After gentx will be ready you can find it in the `~/.gaiad/config/gentx` directory. After that you will be required to upload it into `gentxs` directory of this repository. Please name it using following template `gentx-.json`. +After gentx will be ready you can find it in the `~/.sputnikd/config/gentx` directory. After that you will be required to upload it into `gentxs` directory of this repository. Please name it using following template `gentx-.json`. In order to upload this file you will need to create fork of this repository. Please click on “Fork” button in the top right corner of this page, and name it somehow or leave repository name unchanged. @@ -107,49 +111,77 @@ Please “Open pull request”, check data, put some description into text box f ### Create validator after genesis ``` -gaiad tx staking create-validator \ +sputnikd tx staking create-validator \ --amount=1000000000uatom \ - --pubkey=$(gaiad tendermint show-validator) \ - --chain-id=dvs-course-testnet-1 \ + --pubkey=$(sputnikd tendermint show-validator) \ + --chain-id=sputnik-school-testnet \ --moniker="" \ --website= \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" \ - --min-self-delegation="1" \ --gas="auto" \ - --gas-prices="0.0025uatom" \ + --gas-adjustment=1.3 \ + --gas-prices="0.1usignal" \ --from= ``` ## Run node -### ****Set Up Cosmovisor**** +Install `curl` +``` +sudo apt install curl -y +``` + +### ****Download genesis**** + +To download `genesis.json` file +``` +curl https://raw.githubusercontent.com/Distributed-Validators-Synctems/sputnik-school-testnet/master/genesis.json > ~/.gaia/config/genesis.json +``` +After downloading you need to verify your `genesis.json` checksum + +``` +sha256sum ~/.gaia/config/genesis.json +``` -Set up cosmovisor to ensure any future upgrades happen flawlessly. To install Cosmovisor: +you should see `16f4193398f60a06925a35afe89a164b374634a7397c198a3bb55133cdb5fbea` in the output. -`go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0` +Set the peers +```bash +PEERS="2cdad1c9cd0cdffd180695179928e57f4bfbe519@65.109.229.209:26656,0aaece51c70f806d5d3cdb85371ab2547ada951e@46.8.19.124:27656,ac1011c6c16cbd2cc8740e302781070da040cc4f@81.0.218.67:26656,4a52836783f21058a09082c9179d1bbe2dddb1e7@185.103.132.18:26656" +sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.gaia/config/config.toml +``` -Create the required directories: +### ****Set Up Cosmovisor**** +Set up cosmovisor to ensure any future upgrades happen flawlessly. To install Cosmovisor ``` -mkdir -p ~/.gaiad/cosmovisor/genesis/bin -mkdir -p ~/.gaiad/cosmovisor/upgrades +go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0 ``` -After directories will be ready please copy `gaiad` binaries created in the “Cosmos Hub binaries installation (gaiad)” section into `~/.gaiad/cosmovisor/genesis/bin` directory. You can do it using `cp ~/go/bin/gaiad ~/.gaiad/cosmovisor/genesis/bin/gaiad` command. +Create the required directories and files +``` +mkdir -p ~/.gaia/cosmovisor/genesis/bin +mkdir -p ~/.gaia/cosmovisor/upgrades +echo "" | sed 's/.*/{}/' > ~/.gaia/cosmovisor/genesis/upgrade-info.json +``` -### ****Set Up Gaiad Service**** +After directories will be ready please copy `sputnikd` binaries created in the “Cosmos Hub binaries installation (sputnikd)” section into `~/.sputnikd/cosmovisor/genesis/bin` directory. You can do it using next command +``` +cp ~/go/bin/sputnikd ~/.gaia/cosmovisor/genesis/bin/sputnikd +``` -Set up a service to allow cosmovisor to run in the background as well as restart automatically if it runs into any problems: +### ****Set Up sputnikd Service**** +Set up a service to allow cosmovisor to run in the background as well as restart automatically if it runs into any problems: ``` echo "[Unit] Description=Cosmos Hub daemon After=network-online.target [Service] -Environment="DAEMON_NAME=gaiad" -Environment="DAEMON_HOME=${HOME}/.gaiad" +Environment="DAEMON_NAME=sputnikd" +Environment="DAEMON_HOME=${HOME}/.gaia" Environment="DAEMON_RESTART_AFTER_UPGRADE=true" Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false" Environment="DAEMON_LOG_BUFFER_SIZE=512" @@ -166,8 +198,26 @@ WantedBy=multi-user.target ``` Move this new file to the systemd directory: +``` +sudo mv cosmovisor.service /lib/systemd/system/sputnikd.service +``` -`sudo mv cosmovisor.service /lib/systemd/system/gaiad.service` +And start service: +``` +sudo systemctl daemon-reload +sudo systemctl enable sputnikd +sudo systemctl restart sputnikd +``` + +How you can check the logs +``` +sudo journalctl -u sputnikd -f +``` + +Set chain-id to `sputnik-school-testnet` (for CLI) +``` +sputnikd config chain-id sputnik-school-testnet +``` ## **More about validators** diff --git a/testnet_planning.md b/testnet_planning.md index 8c30fbc..3a91bea 100644 --- a/testnet_planning.md +++ b/testnet_planning.md @@ -2,7 +2,7 @@ ## **Disclaimer** -Everything is subject to change and as close as possible to the realities of testnets that take place in various projects, so at this stage you will learn many useful things in practice**.** Pay attention to the discord validator announcement channel for announcements. We are testing open source beta software. Expect something to break. If the documentation is not enough or you find some kind of bug, make a PR. +Everything is subject to change and as close as possible to the realities of testnets that take place in various projects, so at this stage you will learn many useful things in practice. Pay attention to the discord validator announcement channel for announcements. We are testing open source beta software. Expect something to break. If the documentation is not enough or you find some kind of bug, make a PR. ## **Overview** @@ -10,16 +10,16 @@ Everything is subject to change and as close as possible to the realities of tes - Governance proposals - Enable Transfers - Rewards: `To keep the competitive process going, we see the validators with the most points and they will be rewarded` -- Schedule: `date this` +- Schedule: `25.04.2024 - 03.05.2024` - For the Genesis and Celebrate sections please sign a transaction for each of the tasks and provide the txHash in a PR. ## **Phase - 1: Start chain (max 30 points)** -- GenTx Validator Address Submission : `date and time wiil be refined for a specific course`. Up to `70% of the flow` will be accepted. +- GenTx Validator Address Submission : `25.04.2023 - 26.04.2023 10:00 UTC`. Up to `100% of the flow` will be accepted. - `25 Points = 25 000 atom for successful wallet submissions.` + `25 Points = 25 000 SPUTNIK for successful wallet submissions.` -- Network start time: `time start chain wiil be refined for a specific course` +- Network start time: `26.04.2024 16:00 UTC` `20 Points = 20 000 atom for set up post genesis validators.` @@ -31,17 +31,16 @@ Everything is subject to change and as close as possible to the realities of tes ## **Phase - 2: Governance (max 30 points)** -Lead validator team will create a governance proposal on `date wiil be refined for a specific course`, to update the transfer parameter. You will need to study the proposals, find the correct one and vote. +Lead validator team will create a governance proposal on `27.09.2023 13:00 UTC`, to update the transfer parameter. You will need to study the proposals, find the correct one and vote. -In order to find correct proposal you will need to run query command using your network client binary (`gaiad` in our case). Please issue following command `gaiad query gov proposals`, and find proposal with `title:` ”Vote for me friend”. +In order to find correct proposal you will need to run query command using your network client binary (`sputnikd` in our case). Please issue following command `sputnikd query gov proposals`, and find proposal with `title:` ”Vote for me friend”. -**New to upgrades?** Read [this](https://docs.cosmos.network/master/modules/gov) +**New to governance module?** Read [this](https://docs.cosmos.network/main/modules/gov) -**Update Schedule:** +**Voting Schedule:** -- Proposal: `date and time wiil be refined for a specific course` -- Voting Period: `date and time proposal wiil be refined for a specific course` -- Upgrade Height: `TBD` +- Proposal: `Vote for me friend` +- Voting Period: `27.04.2024 13:00 UTC - 28.04.2024 13:00 UTC` **What should validators do?** @@ -51,67 +50,35 @@ In order to find correct proposal you will need to run query command using your **Bonus challenge** -- Make a detailed thread on Twitter about incorrect props, what number you missed, what does it mean and make a PR to the appropriate directory. +- Make a detailed thread on Twitter about incorrect props, what number you missed, what does it mean and make a PR to the `tweets` directory of this repo. -`5 points = 5000 atom for everyone who provides a peer.` - - +`5 points = 5000 atom for everyone who provides a tweet url.` --- -## P**hase-3: Transactions (max 30 points)** +## **Phase-3: Transactions (max 30 points)** - Send 1atom to DVS validator `5 points = 5000 atom for everyone who do this task.` -- Delegate some DVS to others and redelegate to DVS validator- 10 points +- Delegate some DVS to others and redelegate to DVS validator `5 points = 5000 atom for everyone who do this task.` -- Claim reward \ commision and redelegate to DVS validator - +- Claim reward \ commission and redelegate to DVS validator `5 points = 5000 atom for everyone do this task.` -- Tweet url linked in a memo (Come up with something cool to say about DVS Validator Schoo and experience in Testnet) - -`5 points = 5000 atom for everyone who provides a peer.` +- Tweet url linked in a memo (Come up with something cool to say about DVS Validator School and experience in Testnet) -- Tweet url linked in a memo (Leave your detailed feedback in a thread (from 3 tweets) about the School of Validators. With mark @synctems @POSTHUMAN_DVS @kuraassh. The review must be valid, not just praise. This will be used as a starting point for your twitter accounts and student feedback.) - -`5 points = 5000 atom for everyone who do this task.` +`5 points = 5000 atom for everyone do this task.` --- @@ -124,7 +91,9 @@ cp sample.json .json - 70% ≤ uptime ≥ 80% `20 points = 20000 atom for everyone who have 90+% uptime` + `10 points = 10000 atom for everyone who have 80-90% uptime` + `5 points = 5000 atom for everyone who have 70-80% uptime` - Never jailed validator :