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

Improve compile-and-run-a-node.md #37

Closed
ryancwalsh opened this issue Jul 11, 2022 · 6 comments · Fixed by #44
Closed

Improve compile-and-run-a-node.md #37

ryancwalsh opened this issue Jul 11, 2022 · 6 comments · Fixed by #44

Comments

@ryancwalsh
Copy link

I'm on the Engineering team of NEAR Foundation.

I'm trying to follow these steps https://github.com/near/node-docs/blob/211d8e0556c6d6ed90fec15ea38597ff033e170b/docs/validator/compile-and-run-a-node.md

Here are a few problems.

  1. I personally would prefer if you'd remove the $ at the beginning of each line so that the commands are easier to copy and paste into the terminal.

brew install cmake protobuf clang llvm awscli
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: No available formula with the name "clang". Did you mean cln, cling, clean, vlang, clingo or clac?
==> Searching for similarly named formulae...
These similarly named formulae were found:
clang-format                                   clang-format@8                                 cln                                            clean                                          clingo
clang-format@11                                emacs-clang-complete-async                     cling                                          vlang                                          clac
To install one of them, run (for example):
  brew install clang-format
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

So I think you might need to remove / replace clang in that MacOS prerequisites section.

  1. At https://github.com/near/node-docs/blob/211d8e0556c6d6ed90fec15ea38597ff033e170b/docs/validator/compile-and-run-a-node.md#3-initialize-working-directory-3-initialize-working-directory-2 it should explain what boot-nodes are and why you'd want to specify them during init or not. A later step about config.json is also confusing because it seems to say to delete it (rm ~/.near/config.json) and download a new copy from S3. That's so weird. An explanation would be helpful.

  2. See my suggestion at https://discord.com/channels/490367152054992913/542945453533036544/996106206189989909 for improving https://github.com/near/node-docs/blob/211d8e0556c6d6ed90fec15ea38597ff033e170b/docs/validator/compile-and-run-a-node.md#5-get-data-backup-5-get-data-backup-1

  3. Typos in https://github.com/near/node-docs/blob/211d8e0556c6d6ed90fec15ea38597ff033e170b/docs/validator/compile-and-run-a-node.md#4-replacing-the-configjson-4-replacing-the-configjson

this field is an empty empty (array?) and "If you had not specify the boot nodes to use during init" should be "If you had not specified the boot nodes to use during init. (change "specify" to "specified" and format init)

I'm doing the massive S3 download now and will see how it goes.

Thanks!

@ryancwalsh
Copy link
Author

  1. At https://github.com/near/node-docs/blob/211d8e0556c6d6ed90fec15ea38597ff033e170b/docs/validator/compile-and-run-a-node.md#5-get-data-backup-5-get-data-backup it says:

NOTE: The .tar file is around 147GB (and will grow) so make sure you have enough disk space to unpack inside the data folder.

Ideally, there would be a way for me to know ahead of time how large the compressed file download will be and how much disk space I'll need for unzipping too. And since that filesize will grow over time and this documentation will immediately become stale and incorrect, what I'm saying is that there should be a "live" / fresh way for someone to check in the moment to see how much disk space I'll need if I want to run a mainnet node.

Some of us have Macbooks with only a few hundred gigs of available space, and it would be a complete waste of time to find out later that I don't have enough space.

We should put this warning at the top of the docs.

@ryancwalsh
Copy link
Author

This has been downloading for 4 hours on a fiber connection and has downloaded 294 GB already, and I have no idea how large it is. I'll probably bail at 350 GB.

@ryancwalsh
Copy link
Author

Hey @bucanero ! I hope my comments here are helpful. 😃

By the way, my .near folder is now 319.5 GB and is now doing the final step of downloading more info after the S3 step. So I think my Macbook will literally run out of space and become unusable, but I'm curious to see whether I can get the node running for at least a minute just to experience it.

@bucanero
Copy link
Collaborator

hi @ryancwalsh , let me ping @mina86 and @janewang as they can provide you with the best technical answers.

mina86 added a commit that referenced this issue Aug 11, 2022
First of, add `--download-config` argument to `neard init`.  This
removes the ‘Replacing the config.json’ stop (since neard already gets
the proper configuration file) and makes mention of boot nodes
unnecessary (since boot nodes are listed in downloaded file).

Secondly, mention that around 500GB of SSD is required to be able to
run and keep up with the network.

Issue: #37
mina86 added a commit that referenced this issue Aug 11, 2022
First of, add `--download-config` argument to `neard init`.  This
removes the ‘Replacing the config.json’ stop (since neard already gets
the proper configuration file) and makes mention of boot nodes
unnecessary (since boot nodes are listed in downloaded file).

Secondly, better document getting data backup including mentioning
it’s an optional step and that around 500GB of SSD is required to be
able to run and keep up with the network.

Fixes: #37
@mina86
Copy link
Contributor

mina86 commented Aug 11, 2022

I personally would prefer if you'd remove the $ at the beginning of
each line so that the commands are easier to copy and paste into the
terminal.

Regarding dollar signs, counter argument is that it forces each
command to be executed one-by-one while verifying that no errors
happen. For example, if cloning breaks in `git clone
https://github.com/near/nearcore; cd nearcore; git fetch
origin --tags’ chain the last error on the terminal will be ‘not a git
repository: .git’.

We’re also including command output in a other places in documentation
so there is some value in consistency.

Though in the end I don’t have strong opinions here.

should explain what boot-nodes are and why you'd want to specify
them during init

The mention of boot nodes is unnecessary. Similarly the whole mention
of replacing config.json can be replaced by adding --download-config
flag.

PS. https://near-nodes.io/validator/hardware does say that 500GB is
minimum for running a node.

@ryancwalsh
Copy link
Author

@mina86 Thanks for your response!

You have a reason for the dollar signs, and I don't feel strongly either; they're fine.

To clarify my point # 3 about boot-nodes: I don't know what they are, and I imagine most people won't either. The docs currently assume that readers will understand, and I'm just questioning that assumption and suggesting that maybe it's a good opportunity to teach what that means. (People won't know how to make configuration choices if they don't know what they are in the first place.)

About the disk space, yep, I see that it warns about 500 GB minimum. However, I still think what I wrote is true:

Ideally, there would be a way for me to know ahead of time how large the compressed file download will be and how much disk space I'll need for unzipping too. And since that filesize will grow over time and this documentation will immediately become stale and incorrect, what I'm saying is that there should be a "live" / fresh way for someone to check in the moment to see how much disk space I'll need if I want to run a mainnet node.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants