lotus/documentation/en/building/local-devnet.md
Hector Sanjuan fe52c47570 Docs review and re-organization
This:

* Re-organizes the docs into sections that align with what docs.filecoin.io becoming:
  * An installation section
  * A "getting started" section (lotus client focused)
  * A "storing" section (lotus client focused)
  * A "mining" section (miner focused)
  * A "build" section (developer focused)
  * An legacy "architecture" section is left in the last place.

A few high-value documentation pages have been reviewed and updated with the latest recommendations:

* Installation section and lotus setup
* Miner setup
* etc.
...

Other pages have been correctly merged into the new relevant sections. Some pages have not been touched. The filesystem layout of the documentation has been changed into folders corresponding to the sections (as requested by @cw). Some pages that were not linked at all and/or where hidden, have been moved to "unclassified".

This should make the porting of the Lotus documentation to docs.filecoin.io much easier, while ensuring it is more up to date than it was before.

For the moment, this breaks most links as link-aliasing is not supported in lotus-docs.
2020-09-03 16:35:16 +02:00

1.3 KiB

Setup Local Devnet

Build the Lotus Binaries in debug mode, This enables the use of 2048 byte sectors.

make 2k

Set the LOTUS_SKIP_GENESIS_CHECK environment variable to _yes_. This tells your Lotus node that it's okay if the genesis being used doesn't match any baked-in genesis.

export LOTUS_SKIP_GENESIS_CHECK=_yes_

Download the 2048 byte parameters:

./lotus fetch-params 2048

Pre-seal some sectors:

./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2

Create the genesis block and start up the first node:

./lotus-seed genesis new localnet.json
./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
./lotus daemon --lotus-make-genesis=devgen.car --genesis-template=localnet.json --bootstrap=false

Then, in another console, import the genesis miner key:

./lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key

Set up the genesis miner:

./lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync

Now, finally, start up the miner:

./lotus-miner run --nosync

If all went well, you will have your own local Lotus Devnet running.