Skip to content
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

docs: add infra section intro #2212

Merged
merged 10 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/gno-infra/gno-infra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: gno-infra
---

# Gno Infra
leohhhn marked this conversation as resolved.
Show resolved Hide resolved

Welcome to the **Gno Infra** section for Gno. This section is meant for users
wanting to learn how to run their own Gno node, set up their own faucet, run
an indexer service, and more.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ have ample funds to interact with the chain and facilitate contract deployments.

## Prerequisites

- **`gnoland` and `gnokey` set up. Reference the [Installation](local-setup.md#3-installing-other-gno-tools) guide
- **`gnoland` set up. Reference the [Setting up a local chain](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
for steps**

## 1. Clean chain data
Expand Down Expand Up @@ -78,7 +79,7 @@ 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)
![gnoland start](../assets/getting-started/local-setup/setting-up-funds/gnoland-start.gif)

## 3. Check the account balance

Expand All @@ -95,7 +96,7 @@ Let's break down this command:
- **`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)
![gnokey query](../assets/getting-started/local-setup/setting-up-funds/gnokey-query.gif)

## Conclusion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,59 @@ In this tutorial, you will learn how to start a local Gno node (and chain!).
Additionally, you will see the different options you can use to make your Gno instance unique.

## Prerequisites
- **Git**
- **`make` (for running Makefiles)**
- **Go 1.21+**
- **Go Environment Setup**:
- Make sure `$GOPATH` is well-defined, and `$GOPATH/bin` is added to your `$PATH` variable.

- [`gnoland` installed](local-setup.md#3-installing-other-gno-tools).
## Installation

To install the `gnoland` binary/tool, clone the Gno monorepo:

```bash
git clone https://github.com/gnolang/gno.git
```

After cloning the repo, go into the `gno.land/` folder, and use the existing
Makefile to install the `gnoland` binary:

```bash
cd gno.land
make install.gnoland
```

To verify that you've installed the binary properly and that you are able to use
it, run the `gnoland` command:

```bash
gnoland
```

If everything was successful, you should get the following output:

```bash
❯ gnoland
USAGE
<subcommand> [flags] [<arg>...]

starts the gnoland blockchain node.

SUBCOMMANDS
start run the full node
secrets gno secrets manipulation suite
config gno config manipulation suite
genesis gno genesis manipulation suite
```

If you do not wish to install the binary globally, you can build and run it
with the following command from the `gno.land/` folder:

```bash
make build.gnoland
```

And finally, run it with `./build gnoland`.
## Starting a local node (lazy init)

You can start a Gno blockchain node with the default configuration by navigating to the `gno.land` sub-folder and
Expand All @@ -25,7 +75,7 @@ gnoland start --lazy
The command will trigger a chain initialization process (if you haven't run the node before), and start the Gno node,
which is ready to accept transactions and interact with other Gno nodes.

![gnoland start](../../assets/getting-started/local-setup/setting-up-a-local-chain/gnoland-start.gif)
![gnoland start](../assets/getting-started/local-setup/setting-up-a-local-chain/gnoland-start.gif)

:::info Lazy init

Expand Down Expand Up @@ -271,7 +321,7 @@ That's it! 🎉

Your new Gno node (chain) should be up and running:

![gnoland start](../../assets/getting-started/local-setup/setting-up-a-local-chain/gnoland-start-manual.gif)
![gnoland start](../assets/getting-started/local-setup/setting-up-a-local-chain/gnoland-start-manual.gif)

## Chain runtime options

Expand Down
6 changes: 3 additions & 3 deletions docs/gno-tooling/cli/faucet/faucet.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ id: running-a-faucet

In this tutorial, we will cover how to run a local native currency faucet that works seamlessly with a Gno node.
Using the faucet, any address can get a hold of native currency funds in case they
haven't [premined a balance beforehand](../../../getting-started/local-setup/premining-balances.md).
haven't [premined a balance beforehand](../../../gno-infra/premining-balances.md).

## Prerequisites

Expand All @@ -19,14 +19,14 @@ haven't [premined a balance beforehand](../../../getting-started/local-setup/pre

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](../../../getting-started/local-setup/premining-balances.md) to a high value.
Ensure the faucet account will have enough funds by [premining its balance](../../../gno-infra/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](../../../getting-started/local-setup/setting-up-a-local-chain.md).
can [run the local blockchain node](../../../gno-infra/setting-up-a-local-chain.md).
Navigate to the `gno.land` sub-folder and run the appropriate make command:

```bash
Expand Down