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: update Namespaces page & fix minor typos #2599

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
91 changes: 0 additions & 91 deletions docs/concepts/namespaces.md

This file was deleted.

109 changes: 109 additions & 0 deletions docs/concepts/package-paths.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
id: package-paths
---

# Package Paths

A package path is a unique identifier for each package/realm. It specifies the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there needs to be package/realm everywhere. We can just refer to them generally as packages and make the distinction between pure packages and realms when it is necessary.

Edit after looking through this and existing package docs more:
IMO we should refer to things throughout the docs as "pure packages" or "realms" as necessary and reserve "package" as a term that refers to both. This way the term "package path" makes sense that is should apply to both pure packages and realms, not only to what we currently refer to as packages (actually pure packages). What do you think?

location of the package source code which helps differentiate it from others.
You can use a package path to:

- Call a specific function from a package/realm. (e.g using `gnokey maketx call`)
- Import it in other packages/realms.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Import it in other packages/realms.
- Import it from other packages/realms.


Here's a breakdown of the structure of a package path:

- Domain: The domain of the blockchain where the package is deployed.
Currently, only `gno.land/` is supported.
- Type: Defines the type of package.
- `p/`: [Package](packages.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `p/`: [Package](packages.md)
- `p/`: [Pure Package](packages.md)

- `r/`: [Realm](realms.md)
- Namespace: A namespace can be included after the type (e.g., user or organization name). Namespaces are a
way to group related packages or realms. A user can register a namespace for
themselves, or use the anonymous namespace. Read more [below](#namespaces).

Here are some examples of package paths:

- `gno.land/p/demo/avl`: This signifies a package named `avl` within the `demo` namespace.
- `gno.land/r/gnoland/home`: This signifies a realm named `home` within the `gnoland` namespace.

## Namespaces

Namespaces provide users with the exclusive ability to publish code under
their designated namespaces, similar to GitHub's user and organization model.
A namespace follows these rules:
- Needs to be between 6 and 17 characters.
- Can only contain alphanumeric characters.
- No special characters are allowed (except underscore).
- Cannot consist solely of underscores. A namespace must have at least one
allowed alphanumeric character.
- Cannot start with a number. A namespace must begin with a letter.
- Cannot end with a trailing slash (`/`).

:::warning Namespaces on gno.land testnets

This feature is currently only enabled on the [Test4 testnet](./testnets.md#test4).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe reword this to clarify it is enabled on all networks from test4 and beyond, excluding portal loop. This way it won't have to be updated when we launch (test5? 😅 ) mainnet.

Other networks, such as the Portal Loop, do not have this feature enabled.

:::

## Registering a namespace

To register a namespace, you need to use the `r/demo/users` realm. It allows
users to register a username for a fee of 200 `GNOTs`, which is in turn used as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
users to register a username for a fee of 200 `GNOTs`, which is in turn used as
users to register a username, for a fee of 200 `GNOTs`, which is in turn used as

Makes it clear that the username is the thing being used as a reference for the namespace of the user.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I've not typed out a lot of digital currency amounts in markdown, but it seems like 200 GNOT seems more natural than 200 GNOTs. I don't know of any other digital tokens where people use the plural of the token's symbol to reference more than one -- 5 "eth", 10 "sol", 7 "atom", etc.

a reference for the namespace of the user.

Once a username is registered, `r/sys/users` is used as a filtering mechanism
which will allow code deployments from the registering address to the namespace
matching the username.

A username can be registered by calling the `Register()` function in `r/demo/users`.
The `Register()` function will also allow you to add a string as a description
of your profile. Check out [`r/demo/users` on Test4](https://test4.gno.land/r/demo/users).

For example, the following `gnokey` command will register `patrick` as the username
for the address `mykey`.

```bash
$ gnokey maketx call -pkgpath gno.land/r/demo/users \
-func Register \
-gas-fee 1000000ugnot -gas-wanted 2000000 \
-broadcast \
-chainid=test4 \
-remote https://rpc.test4.gno.land
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-remote https://rpc.test4.gno.land
-remote https://rpc.test4.gno.land \

-send=20000000ugnot \
-args '' \
-args 'patrick' \
-args 'My Profile Quote' mykey
```

:::note Interacting with the correct network

Make sure to use the proper chain ID and remote when interacting with a
gno.land network. Check out the [Network Configurations](../reference/network-config.md)
page for a list of all available endpoints.

:::

After successful registration, you can add a package under your registered namespace.

## Anonymous Namespace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't describe the namespace as anonymous -- there is an address associated with it. Perhaps "Eponymous Namespace" is more fitting here.


gno.land offers the ability to deploy code without having a registered namespace.
You can do this by using your own address as a namespace. This is formatted as `{p,r}/{std.Address}/**`.

For example, with `mykey` being `g1zmgrq5y2vxuqc8shkuc0vr5dj23eklf2xr720x`,
the following deployment would work:

```bash
$ gnokey maketx addpkg \
--pkgpath "gno.land/r/g1zmgrq5y2vxuqc8shkuc0vr5dj23eklf2xr720x/myrealm" \
--pkgdir "." \
--deposit 100000000ugnot \
--gas-fee 1000000ugnot \
--gas-wanted 2000000 \
--broadcast \
--chainid test4 \
-remote https://rpc.test4.gno.land
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-remote https://rpc.test4.gno.land
--remote https://rpc.test4.gno.land \

Also when we have blocks of multiline commands in the same doc like this, it would be good to keep the flags consistent -- one dash vs two for example. You and I know there is no difference, but it might be confusing to a newbie just getting started with command line tools.

mykey
```
2 changes: 1 addition & 1 deletion docs/concepts/testnets.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This page documents all gno.land testnets, what their properties are, and how
they are meant to be used. For testnet configuration, visit the
[reference section](../reference/network-config.md).

Gno.land testnets are categorized by 4 main points:
Kouteki marked this conversation as resolved.
Show resolved Hide resolved
gno.land testnets are categorized by 4 main points:
- **Persistence of state**
- Is the state and transaction history persisted?
- **Timeliness of code**
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/local-setup/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ go run ./cmd/gno --help

### `gnodev`
`gnodev` is the go-to Gno development helper tool - it comes with a built in
Gno.land node, a `gnoweb` server to display the state of your smart contracts
gno.land node, a `gnoweb` server to display the state of your smart contracts
(realms), and a watcher system to actively track changes in your code. Read more
about `gnodev` [here](../../gno-tooling/cli/gnodev.md).

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/playground-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ making it the perfect tool to get started with Gno development.

- **A gno.land compatible wallet**
- Currently, [Adena](https://www.adena.app/) is the preferred wallet for
Gno.land, with more wallets being introduced in the future.
gno.land, with more wallets being introduced in the future.

## Playground Features

Expand Down Expand Up @@ -94,8 +94,8 @@ It provides a command-line interface for hands-on learning, iterative testing, a

## Learning about gno.land & writing Gno code

If you're new here, don't worry—content is regularly produced to breakdown
Gno.land to explain its features. Dive into the essentials of gno.land by
If you're new here, don't worry—content is regularly produced to break down
gno.land to explain its features. Dive into the essentials of gno.land by
exploring the [Concepts](../concepts/concepts.md) section.

To get started writing Gno code, check out the
Expand Down
14 changes: 7 additions & 7 deletions docs/gno-infrastructure/validators/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ id: validators-faq

### What is a gno.land validator?

Gno.land is based on [Tendermint2](https://docs.gno.land/concepts/tendermint2) that relies on a set of validators
gno.land is based on [Tendermint2](https://docs.gno.land/concepts/tendermint2) that relies on a set of validators
selected based on [Proof of Contribution](https://docs.gno.land/concepts/proof-of-contribution) (PoC) to secure the
network. Validators are tasked with participating in consensus by committing new blocks and broadcasting votes.
Validators are compensated with a portion of transaction fees generated in the network. In gno.land, the voting power of
Expand Down Expand Up @@ -45,7 +45,7 @@ network.

### What stage is the gno.land project in?

Gno.land is currently in Testnet 3, the single-node testnet stage. The next version, Testnet 4, is scheduled to go live
gno.land is currently in Testnet 3, the single-node testnet stage. The next version, Testnet 4, is scheduled to go live
in Q3 2024, which will include a validator set implementation for a multinode environment.

## Becoming a Validator
Expand All @@ -68,12 +68,12 @@ validators for their work. All validators fairly receive an equal amount of rewa
### How many validators will there be in mainnet?

The exact plans for mainnet are still TBD. Based on the latest discussions between contributors, the mainnet will likely
have an inital validator set size of 20~50, which will gradually scale with the development and decentralization of the
Gno.land project.
have an initial validator set size of 20~50, which will gradually scale with the development and decentralization of the
gno.land project.

### How do I make my first contribution?

Gno.land is in active development and external contributions are always welcome! If you’re looking for tasks to begin
gno.land is in active development and external contributions are always welcome! If you’re looking for tasks to begin
with, we suggest you visit
the [Bounties &](https://github.com/orgs/gnolang/projects/35/views/3) [Worx](https://github.com/orgs/gnolang/projects/35/views/3)
board and search for open tasks up for grabs. Start from small challenges and work your way up to the bigger ones. Every
Expand Down Expand Up @@ -113,8 +113,8 @@ manipulate the file.

:::warning

Editing generated genesis.json manually is extremely dangerous. It may corrupt chain initial state which leads chain to
not start
Editing generated genesis.json manually is extremely dangerous. It may corrupt the initial chain state which would lead the chain to
not start.

:::

Expand Down
12 changes: 6 additions & 6 deletions docs/gno-infrastructure/validators/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ id: validators-overview

## Introduction

Gno.land is a blockchain powered by the Gno tech stack, which consists of
gno.land is a blockchain powered by the Gno tech stack, which consists of
the [Gno Language](https://docs.gno.land/concepts/gno-language/) (
Gno), [Tendermint2](https://docs.gno.land/concepts/tendermint2/) (TM2),
and [GnoVM](https://docs.gno.land/concepts/gnovm/). Unlike
existing [Proof of Stake](https://docs.cosmos.network/v0.46/modules/staking/) (PoS) blockchains in the Cosmos ecosystem,
Gno.land runs on [Proof of Contribution](https://docs.gno.land/concepts/proof-of-contribution/) (PoC), a novel
gno.land runs on [Proof of Contribution](https://docs.gno.land/concepts/proof-of-contribution/) (PoC), a novel
reputation-based consensus mechanism that values expertise and alignment with the project. In PoC, validators are
selected via governance based on their contribution to the project and technical proficiency. The voting power of the
network is equally distributed across all validators to achieve a high nakamoto coefficient. A portion of all
transaction fees paid to the network are evenly shared between all validators to provide a fair incentive structure.

| **Blockchain** | Cosmos | Gno.land |
| **Blockchain** | Cosmos | gno.land |
|--------------------------------------|-------------------------|-------------------------------|
| **Consensus Protocol** | Comet BFT | Tendermint2 |
| **Consensus Mechanism** | Proof of Stake | Proof of Contribution |
Expand Down Expand Up @@ -78,9 +78,9 @@ be expected from a good, reliable validator.
Join the official gno.land community in various channels to receive the latest updates about the project and actively
communicate with other validators and contributors.

- [Gno.land Blog](https://gno.land/r/gnoland/blog)
- [Gno.land Discord](https://discord.gg/w2MpVEunxr)
- [Gno.land Twitter](https://x.com/_gnoland)
- [gno.land Blog](https://gno.land/r/gnoland/blog)
- [gno.land Discord](https://discord.gg/w2MpVEunxr)
- [gno.land Twitter](https://x.com/_gnoland)

:::info

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/connecting-from-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Before running your code, make sure your keypair has enough funds to send the
transaction.

If everything went well, you've just sent a state-changing transaction to a
Gno.land chain!
gno.land chain!


## Reading on-chain state
Expand Down
14 changes: 7 additions & 7 deletions docs/overview.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
---
id: overview
slug: /
description: "Gno.land is a Layer 1 blockchain platform that enables the execution of Smart Contracts using an interpreted
description: "gno.land is a Layer 1 blockchain platform that enables the execution of Smart Contracts using an interpreted
version of the Go programming language called Gno."
---

# Overview

## What is gno.land?

Gno.land is a Layer 1 blockchain platform that enables the execution of Smart Contracts using an interpreted
gno.land is a Layer 1 blockchain platform that enables the execution of Smart Contracts using an interpreted
version of the Go programming language called Gno.

### Key Features and Technology

1. **Interpreted Gno**: Gno.land utilizes the Gno programming language, which is based on Go. It is executed
1. **Interpreted Gno**: gno.land utilizes the Gno programming language, which is based on Go. It is executed
through a specialized virtual machine called the GnoVM, purpose-built for blockchain development with built-in
determinism and a modified standard library. While Gno
shares similarities with Go in terms of syntax, it currently lacks go routine support. However, this feature is
planned for future development, ensuring deterministic GnoVM executions.
2. **Consensus Protocol - Tendermint2**: Gno.land achieves consensus between blockchain nodes using the Tendermint2
2. **Consensus Protocol - Tendermint2**: gno.land achieves consensus between blockchain nodes using the Tendermint2
consensus protocol. This approach ensures secure and reliable network operation.
3. **Inter-Blockchain Communication (IBC)**: In the future, gno.land will be able to communicate and exchange data with
other blockchain networks within the Cosmos ecosystem through the Inter-Blockchain Communication (IBC) protocol.
Expand All @@ -37,19 +37,19 @@ The decision to base gno.land's language on Go was influenced by the following f

In comparison to Ethereum, gno.land offers distinct advantages:

1. **Transparent and Auditable Smart Contracts**: Gno.land Smart Contracts are fully transparent and auditable by users
1. **Transparent and Auditable Smart Contracts**: gno.land Smart Contracts are fully transparent and auditable by users
because the actual source code is uploaded to the blockchain. In contrast, Ethereum requires contracts to be
precompiled into bytecode, leading to less transparency as bytecode is stored on the blockchain, not the
human-readable source code. Smart contracts in gno.land can be used as libraries with a simple import statement, making
gno.land a defacto source-code repository for the ecosystem.

2. **General-Purpose Language**: Gno.land's Gno is a general-purpose language, similar to Go, extending its
2. **General-Purpose Language**: gno.land's Gno is a general-purpose language, similar to Go, extending its
usability beyond the context of blockchain. In contrast, Solidity is designed specifically for Smart Contracts on the
Ethereum platform.

## Using the gno.land Documentation

Gno.land's documentation adopts the [Diataxis](https://diataxis.fr/) framework, ensuring structured and predictable content. It includes:
gno.land's documentation adopts the [Diataxis](https://diataxis.fr/) framework, ensuring structured and predictable content. It includes:
- A [Getting Started](getting-started/local-setup/local-setup.md) section, covering simple instructions on how to begin your journey into gno.land.
- Concise how-to guides for specific technical tasks.
- Conceptual explanations, offering context and usage insights.
Expand Down
Loading