lotus/documentation/en/local-dev-net.md

55 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

# Setup Local Devnet
2020-04-18 00:12:39 +00:00
Build the Lotus Binaries in debug mode, This enables the use of 2048 byte sectors.
2019-12-18 18:48:15 +00:00
```sh
2020-04-18 00:12:39 +00:00
make 2k
```
2020-08-12 21:24:41 +00:00
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.
```sh
export LOTUS_SKIP_GENESIS_CHECK=_yes_
```
2020-03-03 22:19:22 +00:00
Download the 2048 byte parameters:
```sh
2020-06-12 08:03:31 +00:00
./lotus fetch-params 2048
```
Pre-seal some sectors:
2019-12-18 18:48:15 +00:00
```sh
./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
```
Create the genesis block and start up the first node:
2019-12-18 18:48:15 +00:00
```sh
2020-02-21 20:56:30 +00:00
./lotus-seed genesis new localnet.json
./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
2020-08-06 18:26:43 +00:00
./lotus daemon --lotus-make-genesis=devgen.car --genesis-template=localnet.json --bootstrap=false
2020-02-22 13:10:46 +00:00
```
Then, in another console, import the genesis miner key:
```sh
./lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
```
Set up the genesis miner:
2019-12-18 18:48:15 +00:00
```sh
2020-07-08 10:38:59 +00:00
./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:
2019-12-18 18:48:15 +00:00
```sh
2020-07-08 10:38:59 +00:00
./lotus-miner run --nosync
```
If all went well, you will have your own local Lotus Devnet running.