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 5 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
106 changes: 0 additions & 106 deletions docs/getting-started/local-setup/premining-balances.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/gno-infrastructure/gno-infra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: gno-infrastructure
---

# Gno Infrastructure
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved

Welcome to the **Gno Infrastructure** section. 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 @@ -10,8 +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.
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved

- [`gnoland` installed](local-setup.md#3-installing-other-gno-tools).
## Installation
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved

To install the `gnoland` binary/tool, clone the Gno monorepo:
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved

```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
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved
```

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)

Expand All @@ -25,7 +76,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 +322,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-infrastructure/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-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](../../../getting-started/local-setup/setting-up-a-local-chain.md).
can [run the local blockchain node](../../../gno-infrastructure/setting-up-a-local-chain.md).
Navigate to the `gno.land` sub-folder and run the appropriate make command:

```bash
Expand Down