Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update regression test and update docs #279

Merged
merged 8 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ jobs:
files: ./coverage.txt
fail_ci_if_error: false
if: env.GIT_DIFF

regression-test:
name: Regression Test
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ Contains all the PRs that improved the code without changing the behaviors.
## Added
- Thorchain Claims Proto Updates
- Documentation of Testnet Setup using local build and Cosmovisor
- Documentation update and addition of validator setup documentation

## Fixed
- Testnet binary generation using go build
- Fixed Regression Testing
- Updated Docs
- Fixed Consumer in Directory Service
- Fixed Regression Export

# v1.0.0-Prerelease

Expand Down
6 changes: 0 additions & 6 deletions docs/TESTNET.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ TAG=testnet make install
Configure The Binary

```shell

arkeod keys add <key-name>
arkeod config set client node tcp://localhost:${ARKEO_PORT}57
arkeod config set client keyring-backend test
Expand All @@ -73,15 +72,10 @@ curl -s http://seed.innovationtheory.com:26657/genesis | jq '.result.genesis' >
## Configure Pruning, Minimum gas price , enable prometheus and disable indexing

```shell

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.arkeo/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.arkeo/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.arkeo/config/app.toml

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.001uarkeo"|g' $HOME/.arkeo/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.arkeo/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.arkeo/config/config.toml

```

## Configure Seeds and Peers
Expand Down
92 changes: 92 additions & 0 deletions docs/VALIDATOR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Setup Validator
Becoming a validator involves running node and staking arkeo tokens to participate in network consensus

## Prerequisites

- [Prerequisites](./TESTNET.md#prerequisites)
- [Configure Binary](./TESTNET.md#arkeo-binary)
- [Start Node](./TESTNET.md#configure-service)


## Setting Up Wallet
```shell
arkeod keys add <your-wallet-name>
```

### Check the balances
```shell
arkeod query bank balances $(arkeod keys show <your-wallet-name> -a)
```
> For the new account balances wont be there if you're running a testnet validator please request tokens from the faucet

## Create A Validator
> Don’t change anything if you don’t understand what you’re doing.

```shell
arkeod tx staking create-validator \
--chain-id arkeo \
--commission-rate 0.05 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.1 \
--min-self-delegation "1" \
--amount <staking amount>uarkeo \
--pubkey $(arkeod tendermint show-validator) \
--moniker "<your-validator-name>" \
--from <your-wallet-name> \
--fees="5000uarkeo" \
--yes
```

## Restart the Service
Check the node logs
```shell
journalctl -u arkeod -f -o cat
```

Restart the Node
```shell
sudo systemctl restart arkeod
```

Check your node status here;
```shell
curl http://127.0.0.1:26657/status
```

Check node synchronization, if results false – node is synchronized

```shell
curl -s http://127.0.0.1:26657/status | jq .result.sync_info.catching_up
```

## Additionally To Bond More Tokens
Get your valoper address:

```shell
arkeod keys show wallet --bech val -a
```

Bond more tokens (if you want to increase your validator stake you should bond more to your valoper address):

```shell
arkeod tx staking delegate YOUR_VALOPER_ADDRESS <token amount to stake>uarkeo --from wallet --chain-id $CHAIN_ID --fees="500uarkeo"
```

## Check Validators Status
Active validators list

```shell
arkeod query staking validators -o json | jq -r '.validators[] | select(.status=="BOND_STATUS_BONDED") | [.operator_address, .status, (.tokens|tonumber / pow(10; 6)), .description.moniker] | @csv' | column -t -s"," | sort -k3 -n -r
```
Inactive validators list

```shell
arkeod query staking validators -o json | jq -r '.validators[] | select(.status=="BOND_STATUS_UNBONDED") | [.operator_address, .status, (.tokens|tonumber / pow(10; 6)), .description.moniker] | @csv' | column -t -s"," | sort -k3 -n -r
```

## Remove Node:
```shell
systemctl stop arkeod
sudo systemctl disable arkeod
sudo rm -rf ~/.arkeod /etc/systemd/system/arkeod.service
```
5 changes: 3 additions & 2 deletions test/regression/cmd/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"os"
"os/exec"
Expand Down Expand Up @@ -145,8 +146,8 @@ func checkExportChanges(newExport map[string]any, path string) error {
log.Debug().Msg("Comparing exports")
diff := cmp.Diff(oldExport, newExport)
if diff != "" {
// log.Error().Msgf("exports differ: %s", diff)
// return errors.New("exports differ")
log.Error().Msgf("exports differ: %s", diff)
return errors.New("exports differ")
}

log.Info().Msg("State export matches expected")
Expand Down
Loading
Loading