Skip to content

Commit

Permalink
fix: update validator docs styling, links (#2439)
Browse files Browse the repository at this point in the history
## Description

This PR updates the broken styling, links in #2285.

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
zivkovicmilos authored Jun 26, 2024
1 parent f74e5f0 commit 22c4d17
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
21 changes: 19 additions & 2 deletions docs/gno-infrastructure/premining-balances.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ have ample funds to interact with the chain and facilitate contract deployments.

## Prerequisites

- **`gnoland` set up. Reference the [Setting up a local chain](validators/setting-up-a-local-chain.md#installation) guide for steps**
- **`gnokey` set up. Reference the [Installation](../getting-started/local-setup/installation.md#2-installing-the-required-tools-) guide
- **`gnoland` set up. Reference
the [Setting up a local chain](validators/validators-setting-up-a-new-chain#installation)
guide for steps**
- **`gnokey` set up. Reference
the [Installation](../getting-started/local-setup/installation.md#2-installing-the-required-tools-) guide
for steps**

## 1. Clean chain data
Expand Down Expand Up @@ -52,36 +55,50 @@ An example of how this looks like in the initial `genesis.json` file after the c
"g127jydsh6cms3lrtdenydxsckh23a8d6emqcvfa=1000000000000ugnot"
],
```
The `genesis_balances.txt` file is located at `./gno.land/genesis/genesis_balances.txt`.
To add a new entry to the premine table, simply append a line to the end of the file:
```bash
g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt=10000000000ugnot # My address
```
Replace `g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt` with the address you want balance on, and `10000000000ugnot` with the
desired `ugnot` balance.
## 3. Start the local chain
Now that our address and the desired premine balance are located in the `genesis_balances.txt` file, we can start the
local Gno node.
To run the local Gno node, make sure you are in the `gno.land` sub-folder, and run the appropriate make command:
```bash
cd gno.land
gnoland start
```
This command will initialize the Gno node, generate the `genesis.json` with our newly added premine information, and
start the chain.
![gnoland start](../assets/getting-started/local-setup/setting-up-funds/gnoland-start.gif)
## 3. Check the account balance
To check the balance of any account (or the account we just premined), we can use the following ABCI query:
```bash
gnokey query --remote localhost:26657 bank/balances/g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt
```
Let's break down this command:
- **`--remote`** - the JSON-RPC URL of the running Gno node. In the case of a local deployment, the default value
is `localhost:26657`
- **`bank/balances/g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt`** - the ABCI query targets the `bank` module to find
the `balances` for address `g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt`. Replace the address with your desired address
![gnokey query](../assets/getting-started/local-setup/setting-up-funds/gnokey-query.gif)
## Conclusion
That's it 🎉
You have successfully premined a native currency balance on a locally-running Gno chain!
Additionally, you have also learned how to query the native currency balance for an address, using built-in ABCI queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In this tutorial, you will learn how to start a local Gno node and connect to an
## 1. Initialize the node directory

To initialize a new Gno.land node working directory (configuration and secrets), make sure to
follow [Step 1](setting-up-a-new-chain#1-generate-the-node-directory-secrets--config) from the
follow [Step 1](./validators-setting-up-a-new-chain#1-generate-the-node-directory-secrets--config) from the
chain setup tutorial.

## 2. Obtain the `genesis.json` of the remote chain
Expand Down Expand Up @@ -85,7 +85,7 @@ gnoland config set p2p.persistent_peers "g19d8x6tcr2eyup9e2zwp9ydprm98l76gp66tmd
We should configure the list of seed nodes. Seed nodes provide information about other nodes for the validator to
connect with the chain, enabling a fast and stable initial connection. These seed nodes are also called _bootnodes_.

:::warn
:::warning

The option to activate the Seed Mode from the node is currently missing.

Expand Down
6 changes: 3 additions & 3 deletions docs/gno-infrastructure/validators/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ the `gnoland genesis generate` command. Refer
to [this section](../../gno-tooling/cli/gnoland.md#gnoland-genesis-generate-flags) for various flags that allow you to
manipulate the file.

:::warn
:::warning

Editing generated genesis.json manually is extremely dangerous. It may corrupt chain initial state which leads chain to
not start
Expand Down Expand Up @@ -173,10 +173,10 @@ the configurations file.
### How do I initialize and start a new gno chain?

To start an independent gno chain, follow the initialization process available
in [this section](./start-a-new-gno-chain-and-validator.md).
in [this section](./setting-up-a-new-chain.md).

### How do I connect to an existing gno chain?

To join the validator set of a gno chain, you must first establish a connection. Refer
to [this section](./connect-to-an-existing-gno-chain.md) for a step-by-step guide on how to connect to an existing gno
to [this section](./connect-to-existing-chain.md) for a step-by-step guide on how to connect to an existing gno
chain.
2 changes: 1 addition & 1 deletion docs/gno-infrastructure/validators/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following minimum hardware requirements are recommended for running a valida
- CPU: 2 cores (Recommended: 4 cores)
- Disk: 100 GB SSD (Depends on the level of pruning)

:::warn
:::warning

These hardware requirements are currently approximate based on the Cosmos validator specifications. Final requirements
will be determined following thorough testing and optimization experiments in Testnet 4.
Expand Down
4 changes: 2 additions & 2 deletions docs/gno-infrastructure/validators/running-a-validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ consensus layer.

# Start a New Gno Chain and a Validator

- [start a new gno chain and a validator](./start-a-new-gno-chain-and-validator.md)
- [start a new gno chain and a validator](./setting-up-a-new-chain.md)

# Connect to an Existing Gno Chain

- [connect to an existing gno chain](./connect-to-an-existing-gno-chain.md)
- [connect to an existing gno chain](./connect-to-existing-chain.md)
4 changes: 3 additions & 1 deletion docs/gno-infrastructure/validators/setting-up-a-new-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ command:
gnoland config set moniker node01
```

:::warn Modify existing secrets
:::

:::warning Modify existing secrets

We can modify existing secrets, or utilize our own (if we have them backed up, for example) for the Gno.land node.
Each secret needs to be placed in the appropriate path within `<data-dir>/secrets`, and it can be replaced or
Expand Down
5 changes: 3 additions & 2 deletions docs/gno-tooling/cli/faucet/faucet.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ haven't [premined a balance beforehand](../../../gno-infrastructure/premining-ba

The Gno faucet works by designating a single address as a faucet address that will distribute funds.

Ensure the faucet account will have enough funds by [premining its balance](../../../gno-infrastructure/premining-balances.md) to a high value.
Ensure the faucet account will have enough funds
by [premining its balance](../../../gno-infrastructure/premining-balances.md) to a high value.
In case you do not have an existing address added to `gnokey`, you can consult
the [Working with Key Pairs](../../../getting-started/local-setup/working-with-key-pairs.md) guide.

## 2. Start the local chain

After ensuring the faucet address will have enough funds in the premine, we
can [run the local blockchain node](../../../gno-infrastructure/validators/setting-up-a-local-chain.md).
can [run the local blockchain node](../../../gno-infrastructure/validators/setting-up-a-new-chain.md).
Navigate to the `gno.land` sub-folder and run the appropriate make command:

```bash
Expand Down

0 comments on commit 22c4d17

Please sign in to comment.