Skip to content

Commit

Permalink
fix: more scripts and docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax committed Nov 3, 2023
1 parent c629604 commit bb658fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
34 changes: 7 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,7 @@ docker run -d --name seda_node \
ghcr.io/sedaprotocol/node:latest start
```

where `seda.env` is a `dotenv` described [here](#env-variables-configuration)

Alternatively, you can pass the env variables manually:

```bash
docker run -d --name seda_node \
--env 'MONIKER=' \
--env 'MNEMONIC=' \
--env 'KEYRING_PASSWORD=' \
--env 'NETWORK=' \
--env 'NODE_ADDRESS=' \
--volume ~/.seda-chain:/root/.seda-chain \
--volume $(pwd)/seda.env:/seda-chain/.env \
ghcr.io/sedaprotocol/node:latest start
```

**NOTE**: To run you must have these fields filled out. So to generate a mnemonic check out [here](#key-creation).
where `seda.env` is a `dotenv` described [here](#env-variables-configuration).

##### Stop and Start

Expand All @@ -172,8 +156,8 @@ docker logs seda_node -n 100

Sometimes you may need to execute commands for example:
- To generate a [key](#key-creation)
- Check if the dockerized node is a validator.
- Or to make the dockerized node a validator.
- Check if the dockerized node is a [validator](#checking-validator-status).
- Or how to [stake](#staking)/[unstake](#unstaking).

These commands will all start with `docker exec seda_node`.

Expand All @@ -189,7 +173,6 @@ The `docker` image will handle this for you. If in your passed in env file the m

Otherwise simply have that field filled out, and it will add the account automatically.


#### Checking Chain Status

There are a few things you may like to check as an operator(these assume your container is running):
Expand All @@ -206,7 +189,7 @@ There are a few things you may like to check as an operator(these assume your co

**NOTE**: This assumes you already have funds in your account. If you don't please add some funds to your account before trying.
To become a validator run the following command:
To stake run the following command:
**NOTE**: The amount at the end is the amount of tokens in `aseda` to stake.
```bash
Expand All @@ -233,13 +216,13 @@ txhash: 6C8A6C1925F3B373BBEA4DF609D8F1FAE6CDA094586763652557B527E88893A6
**NOTE**: This assumes you have already staked.
To become a validator run the following command:
To unstake run the following command:
**NOTE**: The amount at the end is the amount of tokens in `aseda` to stake.
```bash
docker exec seda_node /bin/bash -c "./unstaking.sh 1000"
# Which should produce some output:
gas estimate: 181315
gas estimate: 164451
code: 0
codespace: ""
data: ""
Expand All @@ -249,10 +232,7 @@ gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '[]'
timestamp: ""
tx: null
txhash: 6C8A6C1925F3B373BBEA4DF609D8F1FAE6CDA094586763652557B527E88893A6
txhash: 1BA768C240B379E7BBFF74D68148E95A64BFB167497C341842F4C2AF94376A77
```
#### Checking Validator Status
Expand Down
2 changes: 1 addition & 1 deletion scripts/node_setup/unstaking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ source common.sh
validator_pub_key=$($BIN tendermint show-validator --home=$HOME/.seda-chain)

chain_id=$(cat $HOME/.seda-chain/config/genesis.json | jq .chain_id | tr -d '"')
auth_seda_chaind_command tx undbound create-validator $validator_pub_key --amount=$STAKE_AMOUNT --pubkey=$validator_pub_key --moniker=$MONIKER --commission-rate=0.10 --commission-max-rate=0.20 --commission-max-change-rate=0.01 --gas=auto --gas-adjustment=1.2 --gas-prices=0.0025aseda --from=$KEY_NAME --min-self-delegation=1 --yes --home=$HOME/.seda-chain --chain-id=$chain_id
auth_seda_chaind_command tx unbond $validator_pub_key --amount=$STAKE_AMOUNT --pubkey=$validator_pub_key --moniker=$MONIKER --commission-rate=0.10 --commission-max-rate=0.20 --commission-max-change-rate=0.01 --gas=auto --gas-adjustment=1.2 --gas-prices=0.0025aseda --from=$KEY_NAME --min-self-delegation=1 --yes --home=$HOME/.seda-chain --chain-id=$chain_id

0 comments on commit bb658fb

Please sign in to comment.