2019-12-18 18:53:19 +00:00
|
|
|
# Setup Local Devnet
|
2019-12-18 04:13:18 +00:00
|
|
|
|
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:40:47 +00:00
|
|
|
|
2019-12-18 18:48:15 +00:00
|
|
|
```sh
|
2020-04-18 00:12:39 +00:00
|
|
|
make 2k
|
2019-12-18 04:13:18 +00:00
|
|
|
```
|
|
|
|
|
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:
|
2020-01-14 01:15:42 +00:00
|
|
|
```sh
|
2020-06-12 08:03:31 +00:00
|
|
|
./lotus fetch-params 2048
|
2020-01-14 01:15:42 +00:00
|
|
|
```
|
|
|
|
|
2019-12-18 04:13:18 +00:00
|
|
|
Pre-seal some sectors:
|
2019-12-18 18:40:47 +00:00
|
|
|
|
2019-12-18 18:48:15 +00:00
|
|
|
```sh
|
2020-06-01 16:20:44 +00:00
|
|
|
./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
|
2019-12-18 04:13:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Create the genesis block and start up the first node:
|
2019-12-18 18:40:47 +00:00
|
|
|
|
2019-12-18 18:48:15 +00:00
|
|
|
```sh
|
2020-02-21 20:56:30 +00:00
|
|
|
./lotus-seed genesis new localnet.json
|
2020-02-21 21:02:30 +00:00
|
|
|
./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
|
2020-08-06 20:34:11 +00:00
|
|
|
./lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
|
2019-12-18 04:13:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Set up the genesis miner:
|
2019-12-18 18:40:47 +00:00
|
|
|
|
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
|
2019-12-18 04:13:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Now, finally, start up the miner:
|
2019-12-18 18:40:47 +00:00
|
|
|
|
2019-12-18 18:48:15 +00:00
|
|
|
```sh
|
2020-07-08 10:38:59 +00:00
|
|
|
./lotus-miner run --nosync
|
2019-12-18 04:13:18 +00:00
|
|
|
```
|
|
|
|
|
2019-12-18 18:53:19 +00:00
|
|
|
If all went well, you will have your own local Lotus Devnet running.
|