Skip to content

Commit

Permalink
Merge 'brent/cleanup' (#351)
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
brentstone authored Jun 12, 2024
2 parents df0a689 + 460b482 commit a5769e5
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 56 deletions.
6 changes: 3 additions & 3 deletions packages/docs/pages/introduction/installing-cometbft.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ You can download the precompiled CometBFT binaries from their [official GitHub r
If you have `go` installed and downloaded, you may want to add the CometBFT binary to your `$GOPATH/bin` directory. This can be done by running the following command in the root directory of the repository

```bash copy
cp <path-to-cometbft-binary> $GOPATH/bin/
cp /path/to/cometbft/binary $GOPATH/bin/
```

Otherwise, we recommend you simply copy it to your `/usr/local/bin` which may require `sudo` permissions.

`sudo cp <path-to-cometbft-binary> /usr/local/bin/`
`sudo cp /path/to/cometbft/binary /usr/local/bin/`

In order to check that the installation was successful, you can run the following command

Expand All @@ -30,4 +30,4 @@ Which should output something like:

```bash copy
0.37.2
```
```
2 changes: 1 addition & 1 deletion packages/docs/pages/introduction/public-rpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ with the network by using the `--node` flag and providing the address of a publi

For example, to query the balance of an account using a public RPC, you can run:
```bash copy
namadac balance --owner <tnam address> --token nam --node https://some-node.xyz:443
namadac balance --owner $TNAM_ADDRESS --token nam --node https://some-node.xyz:443
```

In fact, this is not fundamentally different from normal usage of `namadac` -- except that normally an rpc address of `localhost:26657` (corresponding to your own local full node) is implied.
6 changes: 3 additions & 3 deletions packages/docs/pages/introduction/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can join a [testnet](../networks/testnets.mdx), [localnet](../operators/netw

You will need to know the chain-id of the network you wish to join. You can then join as a full (non-validator) node by running:
```shell copy
namadac utils join-network --chain-id <chain-id> --add-persistent-peers
namadac utils join-network --chain-id $CHAIN_ID --add-persistent-peers
```

The newly initialized chain data will be found in your [base directory](../operators/ledger/base-directory.mdx).
Expand Down Expand Up @@ -56,7 +56,7 @@ This can take several hours depending on the chain height and your system specs.
Create a new [implicit](../users/transparent-accounts.mdx) account in order to receive tokens:

```shell copy
namadaw gen --alias <your-go-to-alias>
namadaw gen --alias $YOUR_ALIAS
```
This will generate a new account and store it in the default keychain. You can view the account address with:

Expand All @@ -66,7 +66,7 @@ namadaw list --addr
# Sample output:
Known transparent addresses:
...
"<your-go-to-alias>": Implicit: tnam1qzegva94xdnvtahqqetys9zzua6sdlm8sve05r9u
"<your-alias>": Implicit: tnam1qzegva94xdnvtahqqetys9zzua6sdlm8sve05r9u
```

{/* #TODO: ADD some output */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ It is the public keys that the pre-genesis network participants must submit to t
```toml
# Example wallet.toml
[public_keys]
bengt = "ED25519_PK_PREFIXtpknam1qq2vscpcvhdwht9tldj9ntxnknandhnerhzd6d42xqzukw2kpcfpudh3dl2"
alice = "ED25519_PK_PREFIXtpknam1qq2vscpcvhdwht9tldj9ntxnknandhnerhzd6d42xqzukw2kpcfpudh3dl2"

...

[addresses]
bengt = "tnam1qq97eqvv4lam8ds00j9em2s2f0r8e7r60qw9fdfq"
alice = "tnam1qq97eqvv4lam8ds00j9em2s2f0r8e7r60qw9fdfq"
```

It is then the right hand side of each of these fields that is submitted to the network coordinator, i.e `ED25519_PK_PREFIXtpknam1qq2vscpcvhdwht9tldj9ntxnknandhnerhzd6d42xqzukw2kpcfpudh3dl2` and `tnam1qq97eqvv4lam8ds00j9em2s2f0r8e7r60qw9fdfq` in the example above.
Expand Down
8 changes: 4 additions & 4 deletions packages/docs/pages/operators/validators/jailing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ When the protocol determines that a validator will be jailed, the jailing and va
You can check if a validator is jailed by querying its state with the following command:

```bash copy
namadac validator-state --validator <validator_address>
namadac validator-state --validator $VALIDATOR_ADDRESS
```

## Unjailing a validator

Once jailed, validators remain jailed indefinitely. They can only be unjailed by an `unjail-validator` transaction using the validator's signing keys. This can be done with the following command:

```bash copy
namadac unjail-validator --validator <validator_address>
namadac unjail-validator --validator $VALIDATOR_ADDRESS
```

<Callout type="info">
Because the validator alias sometimes clashes with the alias for the implicit account and or established account in the wallet, it is recommended to use the validator address instead of the alias.
In order to find the validator address, you can use the following command:
```bash copy
namadaw list --addr | grep <validator-alias>
namadaw list --addr | grep $VALIDATOR_ADDRESS
```
then make sure it is the corresponding `tnam` address.
</Callout>
Expand All @@ -48,7 +48,7 @@ The validator will also be considered to be *frozen* until it no longer has any
A validator's slash history, with previously processed slashes and enqueued slashes for future processing, can be queried with the following command:

```bash copy
namadac slashes --validator <validator_address>
namadac slashes --validator $VALIDATOR_ADDRESS
```

Additionally, all slashes in the network can be queried without the `--validator` flag.
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/pages/operators/validators/staking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The result of this query will inform the epoch from which your bonds will be act
Because the PoS system is just an account, you can query its balance, which is the sum of all currently bonded tokens as well as the unbonded tokens that have not yet been withdrawn:

```shell copy
namada client balance --owner PoS
namada client balance --owner pos
```

## Self-bonding
Expand Down Expand Up @@ -140,5 +140,5 @@ These rewards will immediately be credited to the validtor's account.
Additionally, you can query the pending reward tokens without claiming by running:

```bash copy
namadac rewards --validator <validator-address>
namadac rewards --validator $VALIDATOR_ADDRESS
```
22 changes: 11 additions & 11 deletions packages/docs/pages/operators/validators/validator-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ A validator can update their metadata at any time with the `change-metadata` com

```bash copy
namadac change-metadata \
--validator <validator> \
--description <description> \
--email <email> \
--discord-handle <discord-handle> \
--website <website> \
--avatar <avatar>
--validator $VALIDATOR_ADDRESS \
--description $DESCRIPTION \
--email $EMAIL \
--discord-handle $DISCORD_HANDLE \
--website $WEBSITE \
--avatar $AVATAR
```
Apart from `--validator`, not all of the fields are required (but at least one of them is).

Expand All @@ -42,7 +42,7 @@ Apart from `--validator`, not all of the fields are required (but at least one o
You can deactivate your validator with the `deactivate` command:

```bash copy
namadac deactivate-validator --validator <validator-address>
namadac deactivate-validator --validator $VALIDATOR_ADDRESS
```
Once deactivated, the validator will no longer participate in the consensus protocol.
This will take effect at the end of the current epoch + `pipeline_length`. All bonds and delegations associated with the validator remain intact.
Expand All @@ -51,7 +51,7 @@ Delegators can still delegate to the validator, but as the validator is inactive
To reactivate your validator, use the `reactivate` command:

```bash copy
namadac reactivate-validator --validator <validator-address>
namadac reactivate-validator --validator $VALIDATOR_ADDRESS
```
This will reactivate the validator at the end of the current epoch + `pipeline_length`.

Expand Down Expand Up @@ -86,7 +86,7 @@ It is essential for validators to plan the key rotation accordingly to ensure co
To generate a new consensus key, use the following command:

```bash
namadaw convert --alias <new-consensus-key>
namadaw convert --alias $NEW_CONSENSUS_KEY
```

This command will create a new consensus key, which validators should securely store and use to replace the existing `priv_validator_key.json` file.
Expand All @@ -95,15 +95,15 @@ It is critical for validators to perform this step correctly.
After updating the consensus key, validators can find their new validator address with the following command:

```bash
namadaw find --alias <new-consensus-key>
namadaw find --alias $NEW_CONSENSUS_KEY
```

### Withdrawing rewards
When a delegator bonds tokens to an active validator, [staking rewards](./staking.mdx) accrue in the form of the native token. These rewards need to be claimed
before they are credited to the delegator's account. The same holds true for when the validator has self-bonded. Rewards can be withdrawn with the command:

```bash
namadac claim-rewards --validator <validator>
namadac claim-rewards --validator $VALIDATOR_ADDRESS
```

### Submitting an unjail transaction
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/pages/operators/validators/validator-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ The required arguments to initialize a validator are:
namadac init-validator \
--commission-rate 0.05 \
--max-commission-rate-change 0.01 \
--email <your-security-email> \
--alias <account-wallet-alias>
--email $EMAIL \
--alias $ALIAS
```
__Note:__
- `commission-rate` is the percentage of staking rewards kept by the validator for all tokens bonded to it. A validator can change its commission rate
Expand Down
24 changes: 12 additions & 12 deletions packages/docs/pages/users/delegators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@ namadac bonded-stake
If you have a specific tenderimnt key of a validator but do not know the address, you can use the following command to find the address:

```bash copy
namadac find-validator --tendermint-key <validator-tendermint-key> # Similarly you can find the tendermint key from the address by providing the argument --validator <validator-address> instead
namadac find-validator --tendermint-key $VALIDATOR_TENDERMINT_KEY # Similarly you can find the tendermint key from the address by providing the argument --validator <validator-address> instead
```

<Callout>
Before bonding to a validator, it is important to know their commision rate. This is the percentage of the block rewards that the validator will take as a fee for their services. You can find this information by running the following command:
```bash copy
namadac commission-rate --validator <validator-address>
namadac commission-rate --validator $VALIDATOR_ADDRESS
```
Typically, the commission rate is between 0% and 5%.
</Callout>

Once you've found the address of your favorite validator, you can bond to them with the following command:

```bash copy
namadac bond --source <delegator-address> --validator <validator-address> --amount <amount>
namadac bond --source $DELEGATOR_ADDRESS --validator $VALIDATOR_ADDRESS --amount $AMOUNT
```

<Callout type="info">
Because the validator alias sometimes clashes with the alias for the implicit account and or established account in the wallet, it is recommended to use the validator address instead of the alias.
In order to find the validator address, you can use the following command:
```bash copy
namadaw list --addr | grep <validator-alias>
namadaw list --addr | grep $VALIDATOR_ALIAS
```
then make sure it is the corresponding `tnam` address.
</Callout>

The `<delegator-address>` is your account address from which you would like to stake NAM tokens. Validators who would like to self-bond do not need to provide the `--source` argument.
The `$DELEGATOR_ADDRESS` is your account address from which you would like to stake NAM tokens. Validators who would like to self-bond do not need to provide the `--source` argument.

If you have the alias for an address saved in your wallet, you can also pass it as an argument.

Expand All @@ -66,7 +66,7 @@ namadac query-protocol-parameters
It is possible to query processed delegations through the client

```shell copy
namadac delegations --owner <delegator-address>
namadac delegations --owner $DELEGATOR_ADDRESS
```

## Unbonding
Expand All @@ -77,7 +77,7 @@ This process is identical to [unbonding tokens from a validator](../operators/va
The command to unbond is similar to the bonding command:

```bash copy
namadac unbond --source <delegator-address> --validator <validator-address> --amount <amount>
namadac unbond --source $DELEGATOR_ADDRESS --validator $VALIDATOR_ADDRESS --amount $AMOUNT
```

After a successful unbond transaction, the unbonded NAM tokens will be available for withdrawal after `pipeline_length + unbonding_length + cubic_slashing_window_length` epochs. Once again, the values of these three parameters can be queried from the chain.
Expand All @@ -86,15 +86,15 @@ After a successful unbond transaction, the unbonded NAM tokens will be available
When the full unbonding period has passed, you can withdraw the unbonded NAM using the following command:

```bash copy
namadac withdraw --source <delegator-address> --validator <validator-address>
namadac withdraw --source $DELEGATOR_ADDRESS --validator $VALIDATOR_ADDRESS
```

This transaction will immediately transfer all fully unbonded NAM tokens back to the `delegator-address` account, increasing your transferable balance.

You may also query some information regarding how many NAM tokens are available for withdrawal with the following command:

```bash copy
namadac bonds --owner <delegator-address>
namadac bonds --owner $DELEGATOR_ADDRESS
```

## Redelegating
Expand All @@ -103,7 +103,7 @@ In certain circumstances, you may want to switch the validator that holds your b
You can accomplish this with a redelegating the bonded tokens rather than unbonding, withdrawing, and then bonding again. Use the following command:

```bash copy
namadac redelegate --owner <delegator-address> --source-validator <source-validator> --destination-validator <destination-validator> --amount <amount>
namadac redelegate --owner $DELEGATOR_ADDRESS --source-validator $SOURCE_VALIDATOR_ADDRESS --destination-validator $DEST_VALIDATOR_ADDRESS --amount $AMOUNT
```

The `delegator-address` is your address, the `source-validator` is the validator that currently holds your bond, and the `destination-validator` is your desired new validator to hold your bond.
Expand All @@ -116,15 +116,15 @@ Inflationary rewards for proof-of-stake are computed and minted once per epoch,
In order to claim rewards that are owed to you for bonded NAM tokens, run the following command:

```bash copy
namadac claim-rewards --source <delegator-address> --validator <validator-address>
namadac claim-rewards --source $DELEGATOR_ADDRESS --validator $VALIDATOR_ADDRESS
```

Successful execution of this transaction will immediately transfer the the reward tokens you are owed to your `delegator-address`, incrementing your transparent balance.

Additionally, you can query the pending reward tokens without claiming by running:

```bash copy
namadac rewards --source <delegator-address> --validator <validator-address>
namadac rewards --source $DELEGATOR_ADDRESS --validator $VALIDATOR_ADDRESS
```

## Interacting with jailed validators
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/pages/users/governance/on-chain-governance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ A correct Steward proposal example is shown below:
"id": 1,
"content": {
"title": "One Small Step for Namada, One Giant Leap for Memekind",
"authors": "bengt@heliax.dev",
"authors": "alice@heliax.dev",
"discussions-to": "forum.namada.net/t/namada-proposal/1",
"created": "2069-04-20T00:04:44Z",
"license": "MIT",
Expand Down Expand Up @@ -214,7 +214,7 @@ Only delegators and delegates can vote on proposals. Assuming you fall into one
namada client vote-proposal \
--proposal-id 0 \
--vote yay \
--address <your-address>
--address $YOUR_ADDRESS
```

<Callout type="info">
Expand Down
10 changes: 5 additions & 5 deletions packages/docs/pages/users/ibc/transparent-ibc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ software such as [Hermes](https://github.com/heliaxdev/hermes).
To make an outgoing IBC transfer from a Namada transparent address:
```bash copy
namadac ibc-transfer \
--source <your-transparent-address> \
--receiver <address-on-receiving-chain> \
--token <token-address> \
--amount <amount>
--channel-id <channel-id>
--source $YOUR_TRANSPARENT_ADDRESS \
--receiver $ADDRESS_ON_RECEIVING_CHAIN \
--token $TOKEN_ADDRESS \
--amount $AMOUNT
--channel-id $CHANNEL_ID
```
Note:
- the `receiver` address is the address on the receiving chain -- if you are sending to another Namada chain, this would start with `tnam...`,
Expand Down
8 changes: 4 additions & 4 deletions packages/docs/pages/users/public-goods-stewards/electing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ The CLI command to submit a proposal is:
```shell copy
namadac init-proposal \
--pgf-stewards \
--data-path <path/to/steward_proposal.json>
--data-path $PATH_TO/steward_proposal.json
```
where `<path/to/steward_proposal.json>` is the path to the `steward_proposal.json` file.
where `$PATH_TO/steward_proposal.json` is the path to the `steward_proposal.json` file.

### Becoming elected

Expand All @@ -86,7 +86,7 @@ Resigning as a steward can be done at any point.
Through the CLI it can be done with the command:

```shell copy
namadac resign-steward --steward my-steward-address
namadac resign-steward --steward $STEWARD_ADDRESS
```

Read more about the other methods of losing stewardship in the [specs](https://specs.namada.net/modules/goverance/public-goods-funding/becoming-a-steward#losing-stewardship-status).
Expand All @@ -107,5 +107,5 @@ Update steward commissions can be done at any point.
Through the CLI it can be done with the command:

```shell copy
namadac update-steward-rewards --steward my-steward-address --data-path <path/to/commissions.json>
namadac update-steward-rewards --steward $STEWARD_ADDRESS --data-path $PATH_TO/commissions.json
```
Loading

0 comments on commit a5769e5

Please sign in to comment.