generated from okp4/template-oss
-
Notifications
You must be signed in to change notification settings - Fork 24
Add Validator Setup Guide #683
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
Open
opsmanager1
wants to merge
17
commits into
axone-protocol:main
Choose a base branch
from
opsmanager1:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
332563e
Create validator.md
opsmanager1 1f8838b
Update validator.md
opsmanager1 3491d59
Update validator.md
opsmanager1 98f60ce
Update validator.md
opsmanager1 db81b54
Update installation.md
opsmanager1 82edd57
Update installation.md
opsmanager1 21da159
Update validator.md
opsmanager1 100374a
Update validator.md
opsmanager1 7743fb2
Update validator.md
opsmanager1 651466a
Update validator.md
opsmanager1 ecbdc1e
Update validator.md
opsmanager1 11ddf3c
Update validator.md
opsmanager1 e9b28b0
Update validator.md
opsmanager1 02c8888
Update validator.md
opsmanager1 f9137d0
Update validator.md
opsmanager1 e065d22
Update validator.md
opsmanager1 6707d3b
Update docs/nodes/validator.md
opsmanager1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Create a Validator | ||
|
||
This guide walks you through the basic steps to set up a validator on the Axone testnet. It focuses on the setup process and does not discuss validator architecture or security measures. | ||
|
||
## Prerequisites | ||
|
||
Before following these steps, ensure you have a fully synchronized full node running. If you haven’t set one up yet, refer to the [Node Installation Guide](installation) instructions. | ||
|
||
## 1. Create or restore a key pair | ||
|
||
The first step is to create a new key pair for your validator. Replace `WALLET_NAME` with a key name of your choice and run the following: | ||
|
||
```bash | ||
axoned keys add WALLET_NAME | ||
``` | ||
|
||
:::warning | ||
After generating a new key, you’ll receive its information along with a seed phrase. This phrase is critical: store it in a safe place, as it’s the sole backup for restoring your keys. Losing it means losing access to your $AXONE tokens forever. | ||
::: | ||
|
||
Alternatively, you can restore an existing wallet with a mnemonic seed phrase. Replace `WALLET_NAME` with a key name of your choice and run the following: | ||
|
||
```bash | ||
axoned keys add WALLET_NAME --recover | ||
``` | ||
|
||
Then get your public address: | ||
|
||
```bash | ||
axoned keys show WALLET_NAME --address | ||
``` | ||
|
||
## 2. Get testnet $AXONE | ||
|
||
The validator registration process involves sending a create-validator transaction, which requires gas fees. Before proceeding, make sure to send funds to the address you generated earlier. | ||
|
||
You can get testnet $AXONE tokens from faucet: | ||
|
||
- [Axone testnet faucet](https://faucet.axone.xyz) | ||
|
||
To verify your balance, use this command: | ||
|
||
```bash | ||
axoned query bank balances WALLET_NAME | ||
``` | ||
|
||
## 3. Create a validator | ||
|
||
Once your node is fully synchronized and you've acquired the necessary $AXONE tokens, you can proceed with validator registration. | ||
|
||
To establish a validator with an initial self-delegation, prepare a `validator.json` configuration file and execute the create-validator transaction. | ||
|
||
1. Obtain your validator public key by running the following command: | ||
|
||
```bash | ||
axoned comet show-validator | ||
``` | ||
|
||
The command output will resemble the following example (with a different validator key): | ||
|
||
```bash | ||
{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A/iJGMhwsd5J4y0weGxmSqT2q1G9g0nFo6GgCHBopwc0"} | ||
``` | ||
|
||
2. Create a file named `validator.json` with the following contents: | ||
|
||
```json | ||
{ | ||
"pubkey": { | ||
"@type": "/cosmos.crypto.ed25519.PubKey", | ||
"key": "A/iJGMhwsd5J4y0weGxmSqT2q1G9g0nFo6GgCHBopwc0" | ||
}, | ||
"amount": "1000000uaxone", | ||
"moniker": "your validator human-readable name (moniker)", | ||
"identity": "your validator identity signature", | ||
"website": "(optional) your validator website", | ||
"security": "(optional) your validator security contact", | ||
"details": "(optional) your validator details", | ||
"commission-rate": "0.1", | ||
"commission-max-rate": "0.2", | ||
"commission-max-change-rate": "0.01", | ||
"min-self-delegation": "1" | ||
} | ||
``` | ||
|
||
Max-change-rate, set the initial self-delegation `amount`, and must replace the key field with your own validator `key` from earlier. | ||
|
||
opsmanager1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
:::warning | ||
When setting commission parameters, the `commission-max-change-rate` is measured **in percentage points** of the `commission-rate`. | ||
For example: changing from `1%` to `2%` represents a `100%` relative increase, | ||
but the `commission-max-change-rate` value would be `0.01` (1 percentage point). | ||
::: | ||
|
||
|
||
4. You're now ready to submit the transaction and create your validator | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```bash | ||
axoned tx staking create-validator validator.json \ | ||
--from=WALLET_NAME \ | ||
--chain-id=axone-dentrite-1 \ | ||
--fees=900000uaxone \ | ||
--gas auto \ | ||
--gas-adjustment 1.6 | ||
``` | ||
:::tip | ||
This is just a sample transaction. To explore all available parameters and customization flags for your validator, run: `axoned tx staking create-validator --help` | ||
::: | ||
|
||
## 4. Make sure to create backups of all important files before proceeding | ||
|
||
To ensure validator recovery in case of failure or data loss, you must create encrypted backups of these critical files: | ||
|
||
- `priv_validator_key.json` | ||
- `node_key.json` | ||
|
||
## 5. Check your validator | ||
|
||
Check if your validator is in the active set by running this command: | ||
|
||
```bash | ||
axoned query consensus comet validator-set | grep "$(axoned comet show-address)" | ||
``` | ||
|
||
An empty output indicates your validator is not currently in the active set. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.