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 gnoland tutorial #2162

Closed
wants to merge 31 commits into from
Closed

Conversation

leohhhn
Copy link
Contributor

@leohhhn leohhhn commented May 21, 2024

Description

This PR adds a page on gnoland in the Getting Started section, which covers all commands available in this binary, as requested per #2127.

It also audits all of the subcommands, and fixes some wrong command and flag descriptions.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@leohhhn leohhhn added the 📖 documentation Improvements or additions to documentation label May 21, 2024
@leohhhn leohhhn self-assigned this May 21, 2024
@zivkovicmilos zivkovicmilos self-requested a review May 22, 2024 08:49
@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label May 24, 2024
@leohhhn
Copy link
Contributor Author

leohhhn commented Jun 7, 2024

Not sure if this flag is in the right place. If it is, I don't really understand what it's supposed to do. Also, I found that the genesis add subcommand is with the wrong description. I have edited it out in this PR.

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.59%. Comparing base (9686033) to head (71574fa).
Report is 244 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2162   +/-   ##
=======================================
  Coverage   54.59%   54.59%           
=======================================
  Files         579      579           
  Lines       77896    77896           
=======================================
  Hits        42528    42528           
  Misses      32195    32195           
  Partials     3173     3173           
Flag Coverage Δ
gno.land 61.67% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leohhhn
Copy link
Contributor Author

leohhhn commented Jun 7, 2024

Created an issue on genesis txs remove: #2304

@leohhhn leohhhn marked this pull request as ready for review June 7, 2024 17:08
@leohhhn leohhhn requested review from a team and moul as code owners June 7, 2024 17:08
Copy link
Contributor

@deelawn deelawn left a comment

Choose a reason for hiding this comment

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

Lots of great information here. I'd recommend trimming it down a bit. This can be done by removing some of the content that should be available on a reference page. I think it would be better for two reasons:

  1. Content like program flags won't have to be maintained in more than one location
  2. Giving a command example that works is sufficient for a getting started guide and a link to more in depth reference materials will enable the reader to dive deeper if they want to.

I think perhaps this could be split into two pages under the getting started using gnoland parent.

  1. Configuring gnoland genesis
  2. Configuring and running gnoland

@@ -24,7 +24,7 @@ func newTxsRemoveCmd(txsCfg *txsCfg, io commands.IO) *commands.Command {
return commands.NewCommand(
commands.Metadata{
Name: "remove",
ShortUsage: "txs remove <tx-hash ...>",
ShortUsage: "txs remove [flags] <tx-hash ...>",
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the txs add command need this too?


## Overview

In this tutorial, you will learn how to use the `gnoland` binary. This guide covers
Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably worth it to mention this early on -- this is for running a full node -- maybe mention and link back to gnodev for someone that isn't ready to go through all of this yet. They should understand that this is probably not the first thing they want to do to experiment with building on gno.land.

By default, the node will start listening on `localhost:26657`.

#### Flags
- `-chainid dev` - the ID of the chain.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just link to a reference page so they same information mustn't be maintained in two places?

This command will initialize a configuration directory and file in the default
path. The node is highly configurable. Some of the main configuration options
which are available are listed below:
- Database which is used for storing node data
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure people care about all these in a getting started section; a link to a reference page with this information might be better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Coming back to this after reading the rest of this section -- it would be great to have this link to a doc that shows all the available categories and fields.

A full configuration category, such as `consensus`, can also be read via this command:

```bash
gnoland config get rpc
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be consensus instead of rpc?

all configuration fields inside it, similar to the following:

```bash
{ tcp://127.0.0.1:26657 [*] [HEAD GET POST OPTIONS] [Origin Accept Content-Type X-Requested-With X-Server-Time] 900 false 900 10s 1000000 1048576 }
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit confusing. The example went from rpc, to consensus, and back to rpc again. Is there an option to have the output labeled by field? That would be more helpful for people imo. Otherwise maybe omit the output; I'm no sure it adds much.


The node genesis file contains the initial parameters with which to set up the node.
It contains the following fields:
- Genesis time
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as previous comments -- would be good to link this to a reference doc rather than just listing everything here.


#### Adding a Transaction

To import transactions into the `genesis.json` file, use the following command:
Copy link
Contributor

Choose a reason for hiding this comment

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

Link to the doc that shows how to created a transaction and direct the output to a file?

@Kouteki
Copy link
Contributor

Kouteki commented Oct 8, 2024

@leohhhn is this PR still relevant? I see some good stuff here, but I'm not sure if it will live here after the docs get reorganized.

cc @wyhaines

Copy link
Member

@moul moul left a comment

Choose a reason for hiding this comment

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

Can we remove this tutorial from the docs/ folder and keep some documentation in the gno.land/cmd/gnoland/README.md?

Let's focus on providing the best tutorials for developers who want to write contracts. Gnodev is the way to go at the moment. Running custom Gnoland nodes is an advanced case that we prefer not to simplify for now.

@leohhhn
Copy link
Contributor Author

leohhhn commented Oct 8, 2024

@Kouteki @moul Closing this but we can reuse it for the gnoland readme.

@leohhhn leohhhn closed this Oct 8, 2024
@thehowl
Copy link
Member

thehowl commented Oct 15, 2024

@zivkovicmilos it might be useful to bring some of this to README in gno.land/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation 📦 ⛰️ gno.land Issues or PRs gno.land package related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants