From 2519e1aa39c846bfa08e8a4e02e1f302666fe666 Mon Sep 17 00:00:00 2001 From: itrocket-team Date: Thu, 26 Jun 2025 19:07:13 +0000 Subject: [PATCH 1/3] Docs: Update and refine documentation --- .../babylon_node/babylond-usage-formatted.mdx | 206 +++++++++++++++++- 1 file changed, 202 insertions(+), 4 deletions(-) diff --git a/docs/operators/babylon_node/babylond-usage-formatted.mdx b/docs/operators/babylon_node/babylond-usage-formatted.mdx index 8cc16475..a1bc0d37 100644 --- a/docs/operators/babylon_node/babylond-usage-formatted.mdx +++ b/docs/operators/babylon_node/babylond-usage-formatted.mdx @@ -3,15 +3,213 @@ > Comprehensive command reference for `babylond` --- +## ⚡ Frequently Used CLI Commands -## 🚀 CLI Commands +### Key Management 🔑 +Add new wallet: +``` +babylond keys add +``` -### `# Babylon CLI Usage Guide` +Restore executing wallet: +``` +babylond keys add --recover +``` -```bash -# Babylon CLI Usage Guide +List all wallets: +``` +babylond keys list +``` + +Delete wallet: +``` +babylond keys delete +``` + +Check balance: +``` +babylond q bank balances +``` + +Export key (save it to wallet.backup): +``` +babylond keys export +``` + +Import key (restore from wallet.backup): +``` +babylond keys import wallet.backup +``` + +### Tokens 💰 +Withdraw all rewards: +``` +babylond tx distribution withdraw-all-rewards --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 +``` + +Withdraw rewards and commission from your validator: +``` +babylond tx distribution withdraw-rewards --from --commission --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +``` + +Check your balance: +``` +babylond query bank balances +``` + +Delegate to yourself: +``` +babylond tx epoching delegate $(babylond keys show --bech val -a) 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +``` + +Delegate: +``` +babylond tx epoching delegate 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +``` + +Redelegate stake to another validator: +``` +babylond tx epoching redelegate 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +``` + +Unbond: +``` +babylond tx epoching unbond $(babylond keys show --bech val -a) 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +``` + +Transfer funds: +``` +babylond tx bank send 1000000ubbn --gas auto --gas-adjustment 1.5 -y +``` + +Transfer funds to multiple accounts: +``` +babylond tx bank multi-send 1000000ubbn --gas auto --gas-adjustment 1.5 -y +``` + +### Governance 🗳️ +View proposals list: +``` +babylond query gov proposals ``` +View proposal: +``` +babylond query gov proposal 1 +``` + +Vote: +``` +babylond tx gov vote 1 yes --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +``` + +Submit new proposal: +``` +babylond tx gov submit-proposal path/to/proposal.json +``` + +Where proposal.json contains: +``` +{ + // array of proto-JSON-encoded sdk.Msgs + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1...", + "to_address": "cosmos1...", + "amount":[{"denom": "stake","amount": "10"}] + } + ], + // metadata can be any of base64 encoded, raw text, stringified json, IPFS link to json + // see below for example metadata + "metadata": "4pIMOgIGx1vZGU=", + "deposit": "10stake", + "title": "My proposal", + "summary": "A short summary of my proposal", + "expedited": false +} + +metadata example: +{ + "title": "", + "authors": [""], + "summary": "", + "details": "", + "proposal_forum_url": "", + "vote_option_context": "", +} +``` + +### Validator Operations 👨‍💻 +Create new validator: +``` +babylond tx checkpointing create-validator path/to/validator.json --from +``` + +Where validator.json contains: +``` +{ + "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"oWg2ISpLF405Jcm2vXV+2v4fnjodh6aafuIdeoW+rUw="}, + "amount": "1000000stake", + "moniker": "myvalidator", + "identity": "optional identity signature (ex. UPort or Keybase)", + "website": "validator's (optional) website", + "security": "validator's (optional) security contact email", + "details": "validator's (optional) details", + "commission-rate": "0.1", + "commission-max-rate": "0.2", + "commission-max-change-rate": "0.01", + "min-self-delegation": "1" +} +``` + +Edit validator: +``` +babylond tx epoching edit-validator \ +--commission-rate 0.1 \ +--new-moniker "$MONIKER" \ +--identity "" \ +--details "" \ +--from \ +--chain-id bbn-1 \ +--gas auto --gas-adjustment 1.5 \ +-y +``` + +Unjail validator: +``` +babylond tx slashing unjail --from $WALLET --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +``` + +Your validator details: +``` +babylond query staking validator $(babylond keys show --bech val -a) +``` + +Another validator details: +``` +babylond query staking validator +``` + +Slashing parameters: +``` +babylond query slashing params +``` + +Signing info: +``` +babylond query slashing signing-info +``` + +Active validators list: +``` +babylond query staking validators +``` + +## 🚀 Full List of CLI Commands + +### `# Babylon CLI Usage Guide` + ## babylond add-genesis-account ``` Add a genesis account to genesis.json. The provided account must specify From 7ae30a9a19d69579541d42c1f0974b4617ade766 Mon Sep 17 00:00:00 2001 From: Sam <48280694+itrocket-team@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:49:11 +0400 Subject: [PATCH 2/3] Docs: Updated and refined CLI Usage guide --- .../babylon_node/babylond-usage-formatted.mdx | 131 +++++++----------- 1 file changed, 48 insertions(+), 83 deletions(-) diff --git a/docs/operators/babylon_node/babylond-usage-formatted.mdx b/docs/operators/babylon_node/babylond-usage-formatted.mdx index a1bc0d37..dcafbc57 100644 --- a/docs/operators/babylon_node/babylond-usage-formatted.mdx +++ b/docs/operators/babylon_node/babylond-usage-formatted.mdx @@ -26,12 +26,7 @@ Delete wallet: babylond keys delete ``` -Check balance: -``` -babylond q bank balances -``` - -Export key (save it to wallet.backup): +Export key (saves it to `wallet.backup`): ``` babylond keys export ``` @@ -42,49 +37,54 @@ babylond keys import wallet.backup ``` ### Tokens 💰 +Check balance: +``` +babylond q bank balances +``` + Withdraw all rewards: ``` -babylond tx distribution withdraw-all-rewards --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 +babylond tx distribution withdraw-all-rewards --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 ``` Withdraw rewards and commission from your validator: ``` -babylond tx distribution withdraw-rewards --from --commission --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +babylond tx distribution withdraw-rewards $(babylond keys show --bech val -a) --from --commission --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` -Check your balance: +Delegate to your validator: ``` -babylond query bank balances +babylond tx epoching delegate $(babylond keys show --bech val -a) ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` -Delegate to yourself: +Delegate to another validator: ``` -babylond tx epoching delegate $(babylond keys show --bech val -a) 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +babylond tx epoching delegate ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` -Delegate: +Redelegate stake to another validator: ``` -babylond tx epoching delegate 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +babylond tx epoching redelegate ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` -Redelegate stake to another validator: +Unbond from your validator: ``` -babylond tx epoching redelegate 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +babylond tx epoching unbond $(babylond keys show --bech val -a) ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` -Unbond: +Unbond from another validator: ``` -babylond tx epoching unbond $(babylond keys show --bech val -a) 1000000ubbn --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +babylond tx epoching unbond ubbn --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` Transfer funds: ``` -babylond tx bank send 1000000ubbn --gas auto --gas-adjustment 1.5 -y +babylond tx bank send ubbn --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` Transfer funds to multiple accounts: ``` -babylond tx bank multi-send 1000000ubbn --gas auto --gas-adjustment 1.5 -y +babylond tx bank multi-send ubbn --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` ### Governance 🗳️ @@ -95,90 +95,50 @@ babylond query gov proposals View proposal: ``` -babylond query gov proposal 1 +babylond query gov proposal ``` Vote: ``` -babylond tx gov vote 1 yes --from --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y -``` - -Submit new proposal: -``` -babylond tx gov submit-proposal path/to/proposal.json -``` - -Where proposal.json contains: -``` -{ - // array of proto-JSON-encoded sdk.Msgs - "messages": [ - { - "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "cosmos1...", - "to_address": "cosmos1...", - "amount":[{"denom": "stake","amount": "10"}] - } - ], - // metadata can be any of base64 encoded, raw text, stringified json, IPFS link to json - // see below for example metadata - "metadata": "4pIMOgIGx1vZGU=", - "deposit": "10stake", - "title": "My proposal", - "summary": "A short summary of my proposal", - "expedited": false -} - -metadata example: -{ - "title": "", - "authors": [""], - "summary": "", - "details": "", - "proposal_forum_url": "", - "vote_option_context": "", -} +babylond tx gov vote --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` ### Validator Operations 👨‍💻 Create new validator: ``` -babylond tx checkpointing create-validator path/to/validator.json --from -``` +# Create a validator.json file with validator details (replace moniker, details, etc. with your data): +echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(babylond comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"}, + \"amount\": \"1000000ubbn\", + \"moniker\": \"test\", + \"identity\": \"\", + \"website\": \"\", + \"security\": \"\", + \"details\": \"I love Babylon ❤️\", + \"commission-rate\": \"0.1\", + \"commission-max-rate\": \"0.2\", + \"commission-max-change-rate\": \"0.01\", + \"min-self-delegation\": \"1\" +}" > validator.json -Where validator.json contains: -``` -{ - "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"oWg2ISpLF405Jcm2vXV+2v4fnjodh6aafuIdeoW+rUw="}, - "amount": "1000000stake", - "moniker": "myvalidator", - "identity": "optional identity signature (ex. UPort or Keybase)", - "website": "validator's (optional) website", - "security": "validator's (optional) security contact email", - "details": "validator's (optional) details", - "commission-rate": "0.1", - "commission-max-rate": "0.2", - "commission-max-change-rate": "0.01", - "min-self-delegation": "1" -} +# Create a validator using JSON file +babylond tx checkpointing create-validator validator.json --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 ``` -Edit validator: +Edit validator (from `new-moniker`, `identity`, `details`, `commission-rate` flags, use only those you want to edit): ``` babylond tx epoching edit-validator \ --commission-rate 0.1 \ ---new-moniker "$MONIKER" \ +--new-moniker "" \ --identity "" \ --details "" \ --from \ --chain-id bbn-1 \ ---gas auto --gas-adjustment 1.5 \ +--gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 \ -y -``` Unjail validator: ``` -babylond tx slashing unjail --from $WALLET --chain-id bbn-1 --gas auto --gas-adjustment 1.5 -y +babylond tx slashing unjail --from --chain-id bbn-1 --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 -y ``` Your validator details: @@ -196,9 +156,14 @@ Slashing parameters: babylond query slashing params ``` -Signing info: +Signing and jailing info of your validator: +``` +babylond query slashing signing-info $(babylond tendermint show-validator) +``` + +Signing and jailing info of another validator: ``` -babylond query slashing signing-info +babylond query slashing signing-info '' ``` Active validators list: From bbe7329030f73550cc27f9e63b2c4c3bbf696e19 Mon Sep 17 00:00:00 2001 From: Sam <48280694+itrocket-team@users.noreply.github.com> Date: Tue, 1 Jul 2025 10:04:40 +0400 Subject: [PATCH 3/3] Update babylond-usage-formatted.mdx --- docs/operators/babylon_node/babylond-usage-formatted.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/operators/babylon_node/babylond-usage-formatted.mdx b/docs/operators/babylon_node/babylond-usage-formatted.mdx index dcafbc57..ece03454 100644 --- a/docs/operators/babylon_node/babylond-usage-formatted.mdx +++ b/docs/operators/babylon_node/babylond-usage-formatted.mdx @@ -135,6 +135,7 @@ babylond tx epoching edit-validator \ --chain-id bbn-1 \ --gas auto --gas-prices 0.002ubbn --gas-adjustment 1.5 \ -y +``` Unjail validator: ```