opentensor / developer-docs

Developer documentation for Bittensor.
https://docs.bittensor.com
19 stars 23 forks source link

Write subtensor installation docs #188

Open rajkaramchedu opened 5 months ago

rajkaramchedu commented 5 months ago

Community is facing difficulties installing subtensor local nodes or public nodes successfully. Create a separate "Subtensor" section in the docs and cover the following:

Document tested and validated steps of running local blockchain with:

  1. Docker images. Call out which Linux versions and which macOS versions are supported.
  2. Compile and run from source code in subtensor repo. Call out which Linux versions and which macOS versions are supported.
  3. Document the meaning of all the parameters. For example, all the command line parameters in a command like below: ./target/release/node-subtensor --chain raw_spec.json --base-path /tmp/blockchain --sync=warp --execution wasm --wasm-execution compiled --port 30333 --max-runtime-instances 64 --rpc-max-response-size 2048 --rpc-cors all --rpc-port 9933 --ws-port 9944 --bootnodes /ip4/13.58.175.193/tcp/30333/p2p/12D3KooWDe7g2JbNETiKypcKT1KsCEZJbTzEHCn8hpd4PHZ6pdz5 --ws-max-connections 16000 --no-mdns --in-peers 8000 --out-peers 8000 --prometheus-external --rpc-external --ws-external
  4. Clearly specify settings for archive node and lite node. (--sync=warp and pruning set to archive etc.) (Update from https://github.com/opentensor/developer-docs/pull/192: Done)
  5. Call out how to configure lite node # of blocks. Currently there is an assumption that it is 300 blocks, but where is this setting? Can the user change it? Substantiate the "300 blocks" assumption.
    (Update from https://github.com/opentensor/developer-docs/pull/192: This 300 should not be understood as specified anywhere. It is just a soft guideline. In fact both a lite node and an archive node eventually download the entire blockchain from genesis onwards. It is just that a lite node will get up and going immediately. The PR has the description for this.)
  6. Can we provide a way to test and confirm that the archive or lite node is indeed running correctly and syncing blocks accurately? One way would be to look at the block number in the terminal log and compare it to block number on scan.bittensor.com, and if they match or close together, the node is syncing properly. Accurate? Does this apply for both archive and lite nodes?
  7. Provide any helpful links to the substrate docs (which are poorly organized, btw, because I haven't found a way to link to a subsection within those docs. Annoying.)
  8. Also update the README in the subtensor repo.
  9. (Adding from below comment by @sam0x17: Document the process for bootstrapping an archive node from a snapshot and/or where snapshots can be found reliably, especially now that it is no longer possible to just start from genesis (a fact that we should also document somewhere).
  10. Document the fact that it is no longer possible to just start from genesis (taken from immediate above).
  11. Document this → @hey-michal had posted this request in another private thread: "when I run my own local subtensor, can I somehow fill it with a custom chain state? Like wallets, balances, subnets and registered validators and miners? I mean, automatically fill it with this data on each start, and maybe even keep this state in the repo somehow I'd be surprised if this is not possible, I just can't find any information about that"
  12. Also, would we be able to give a solution to this community question? "Does anyone know how to sync local subtensor to current block? My local subtensor seems to be 5000 blocks behind finney." Discord thread: https://discord.com/channels/799672011265015819/799672011814862902/1226233124208513105
  13. Another Discord user who says they are still stuck: https://discord.com/channels/799672011265015819/1222421128417640508/1226835644744073319
  14. Request by the same above user who is stuck: "Just as a suggestion, probably would make life easier for everyone to tag version on the repo?"
rajkaramchedu commented 5 months ago

cc: @sam0x17

sam0x17 commented 5 months ago

I would also add we need to document the process for bootstrapping an archive node from a snapshot and/or where snapshots can be found reliably, especially now that it is no longer possible to just start from genesis (a fact that we should also document somewhere)

rajkaramchedu commented 5 months ago

Issues in this context: