From ed98f92e0c67883b57f0cbabcc106b5ad726a8da Mon Sep 17 00:00:00 2001 From: leohhhn Date: Wed, 17 Jul 2024 15:55:35 +0200 Subject: [PATCH 1/6] update warns --- docs/concepts/namespaces.md | 10 +++++----- docs/concepts/testnets.md | 2 +- docs/overview.md | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/concepts/namespaces.md b/docs/concepts/namespaces.md index 0f9176bcbf1..6851094ea0e 100644 --- a/docs/concepts/namespaces.md +++ b/docs/concepts/namespaces.md @@ -4,12 +4,13 @@ id: namespaces # Namespaces -Namespaces provide users with the exclusive capability to publish contracts under their designated namespaces, -similar to GitHub's user and organization model. +Namespaces provide users with the exclusive ability to publish contracts under +their designated namespaces, similar to GitHub's user and organization model. :::warning Not enabled -This feature isn't enabled by default on the portal loop chain and is currently available only on test4.gno.land. +This feature is currently only enabled on the [Test4 testnet](./testnets.md#test4). +Other networks, such as Portal Loop, do not have this feature enabled. ::: @@ -28,8 +29,7 @@ Here's a breakdown of the structure of a package path: - `p/`: [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, but currently ownership cannot be claimed. (see - [Issue#1107](https://github.com/gnolang/gno/issues/1107) for more info) +way to group related packages or realms, but currently ownership cannot be claimed. - Remaining Path: The remaining part of the path. - Can only contain alphanumeric characters (letters and numbers) and underscores. - No special characters allowed (except underscore). diff --git a/docs/concepts/testnets.md b/docs/concepts/testnets.md index 730795d3742..131bf1e1ab2 100644 --- a/docs/concepts/testnets.md +++ b/docs/concepts/testnets.md @@ -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: +gno.land testnets are categorized by 4 main points: - **Persistence of state** - Is the state and transaction history persisted? - **Timeliness of code** diff --git a/docs/overview.md b/docs/overview.md index 3619e507dba..a687c878dde 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,7 +1,7 @@ --- 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." --- @@ -9,17 +9,17 @@ version of the Go programming language called Gno." ## 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. @@ -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. From e661b22b5fa1ceb04688873869eb7bde46c600b3 Mon Sep 17 00:00:00 2001 From: leohhhn Date: Wed, 17 Jul 2024 16:18:30 +0200 Subject: [PATCH 2/6] update namespaces --- docs/concepts/namespaces.md | 91 --------------------------- docs/concepts/package-paths.md | 109 +++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 91 deletions(-) delete mode 100644 docs/concepts/namespaces.md create mode 100644 docs/concepts/package-paths.md diff --git a/docs/concepts/namespaces.md b/docs/concepts/namespaces.md deleted file mode 100644 index 6851094ea0e..00000000000 --- a/docs/concepts/namespaces.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -id: namespaces ---- - -# Namespaces - -Namespaces provide users with the exclusive ability to publish contracts under -their designated namespaces, similar to GitHub's user and organization model. - -:::warning Not enabled - -This feature is currently only enabled on the [Test4 testnet](./testnets.md#test4). -Other networks, such as Portal Loop, do not have this feature enabled. - -::: - -# Package Path - -A package path is a unique identifier for each package/realm. It specifies the 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. - -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) - - `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, but currently ownership cannot be claimed. -- Remaining Path: The remaining part of the path. - - Can only contain alphanumeric characters (letters and numbers) and underscores. - - No special characters allowed (except underscore). - - Cannot consist solely of underscores. It must have at least one allowed alphanumeric character. - - Cannot start with a number. It should begin with a letter. - - Cannot end with a trailing slash (`/`). - -Examples: - -- `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. - -## Registration Process - -The registration process is contract-based. The `AddPkg` command references -`sys/users` for filtering, which in turn is based on `r/demo/users`. - -When `sys/users` is enabled, you need to register a name using `r/demo/users`. You can call the -`r/demo/users.Register` function to register the name for the caller's address. - -> ex: `test1` user registering as `patrick` -```bash -$ gnokey maketx call -pkgpath gno.land/r/demo/users \ - -func Register \ - -gas-fee 1000000ugnot -gas-wanted 2000000 \ - -broadcast \ - -chainid=test4 \ - -send=20000000ugnot \ - -args '' \ - -args 'patrick' \ - -args 'My Profile Quote' test1 -``` - -:::note Chain-ID - -Do not forget to update chain id, adequate to the network you're interacting with - -::: - - -After successful registration, you can add a package under the registered namespace. - -## Anonymous Namespace - -Gno.land offers the ability to add a package 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}/**`. - -> ex: with `test1` user adding a package `microblog` using his own address as namespace -```bash -$ gnokey maketx addpkg \ - --pkgpath "gno.land/r/g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5/microblog" \ - --pkgdir "examples/gno.land/p/demo/microblog" \ - --deposit 100000000ugnot \ - --gas-fee 1000000ugnot \ - --gas-wanted 2000000 \ - --broadcast \ - --chainid test4 \ - test1 -``` diff --git a/docs/concepts/package-paths.md b/docs/concepts/package-paths.md new file mode 100644 index 00000000000..71c7fe5bef5 --- /dev/null +++ b/docs/concepts/package-paths.md @@ -0,0 +1,109 @@ +--- +id: package-paths +--- + +# Package Paths + +A package path is a unique identifier for each package/realm. It specifies the +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. + +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) + - `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. +Namespaces have the following rules: + - Need to be between 6 and 17 characters. + - Can only contain alphanumeric characters. + - No special characters 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). +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 +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 + -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 + +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 + mykey +``` From e8edcbd132150563ad490a4a7728786fe13e90d7 Mon Sep 17 00:00:00 2001 From: leohhhn Date: Wed, 17 Jul 2024 16:22:28 +0200 Subject: [PATCH 3/6] fixup --- docs/concepts/package-paths.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/concepts/package-paths.md b/docs/concepts/package-paths.md index 71c7fe5bef5..8b28dfec4bf 100644 --- a/docs/concepts/package-paths.md +++ b/docs/concepts/package-paths.md @@ -31,10 +31,10 @@ Here are some examples of package paths: Namespaces provide users with the exclusive ability to publish code under their designated namespaces, similar to GitHub's user and organization model. -Namespaces have the following rules: - - Need to be between 6 and 17 characters. +A namespace follows these rules: + - Needs to be between 6 and 17 characters. - Can only contain alphanumeric characters. - - No special characters allowed (except underscore). + - 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. From 40c4a2c6cf85e275f19a3945c3cef24605487360 Mon Sep 17 00:00:00 2001 From: leohhhn Date: Wed, 17 Jul 2024 16:24:00 +0200 Subject: [PATCH 4/6] fix Gno.land --- docs/getting-started/local-setup/installation.md | 2 +- docs/getting-started/playground-start.md | 6 +++--- docs/gno-infrastructure/validators/faq.md | 8 ++++---- docs/gno-infrastructure/validators/overview.md | 12 ++++++------ docs/how-to-guides/connecting-from-go.md | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/getting-started/local-setup/installation.md b/docs/getting-started/local-setup/installation.md index 58f71f93026..abf29e9d75a 100644 --- a/docs/getting-started/local-setup/installation.md +++ b/docs/getting-started/local-setup/installation.md @@ -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). diff --git a/docs/getting-started/playground-start.md b/docs/getting-started/playground-start.md index f62e2748efe..a01ddf9e43f 100644 --- a/docs/getting-started/playground-start.md +++ b/docs/getting-started/playground-start.md @@ -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 @@ -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 diff --git a/docs/gno-infrastructure/validators/faq.md b/docs/gno-infrastructure/validators/faq.md index c345b49724a..11816c756c2 100644 --- a/docs/gno-infrastructure/validators/faq.md +++ b/docs/gno-infrastructure/validators/faq.md @@ -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 @@ -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 @@ -69,11 +69,11 @@ validators for their work. All validators fairly receive an equal amount of rewa 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. +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 diff --git a/docs/gno-infrastructure/validators/overview.md b/docs/gno-infrastructure/validators/overview.md index 7128a8c6b75..18c9a1fdae6 100644 --- a/docs/gno-infrastructure/validators/overview.md +++ b/docs/gno-infrastructure/validators/overview.md @@ -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 | @@ -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 diff --git a/docs/how-to-guides/connecting-from-go.md b/docs/how-to-guides/connecting-from-go.md index 4926f700a4d..846cd7c8603 100644 --- a/docs/how-to-guides/connecting-from-go.md +++ b/docs/how-to-guides/connecting-from-go.md @@ -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 From 7c8f169a589aa18eaf425e035b4ed2a1c2a7b922 Mon Sep 17 00:00:00 2001 From: leohhhn Date: Wed, 17 Jul 2024 16:26:12 +0200 Subject: [PATCH 5/6] fix typo --- docs/gno-infrastructure/validators/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gno-infrastructure/validators/faq.md b/docs/gno-infrastructure/validators/faq.md index 11816c756c2..058932dff4b 100644 --- a/docs/gno-infrastructure/validators/faq.md +++ b/docs/gno-infrastructure/validators/faq.md @@ -68,7 +68,7 @@ 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 +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? From af80f0a687e90723f54b2e832daa8f1917b03a4f Mon Sep 17 00:00:00 2001 From: leohhhn Date: Wed, 17 Jul 2024 16:27:06 +0200 Subject: [PATCH 6/6] fix typo --- docs/gno-infrastructure/validators/faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/gno-infrastructure/validators/faq.md b/docs/gno-infrastructure/validators/faq.md index 058932dff4b..1be076eab2f 100644 --- a/docs/gno-infrastructure/validators/faq.md +++ b/docs/gno-infrastructure/validators/faq.md @@ -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. :::