2019-12-18 18:53:19 +00:00
|
|
|
# Setup Local Devnet
|
2019-12-18 04:13:18 +00:00
|
|
|
|
2019-12-18 21:46:09 +00:00
|
|
|
Build the Lotus Binaries in debug mode, This enables the use of 1024 byte sectors.
|
2019-12-18 18:40:47 +00:00
|
|
|
|
2019-12-18 18:48:15 +00:00
|
|
|
```sh
|
2019-12-18 04:13:18 +00:00
|
|
|
make debug
|
|
|
|
```
|
|
|
|
|
2020-03-03 22:19:22 +00:00
|
|
|
Download the 2048 byte parameters:
|
2020-01-14 01:15:42 +00:00
|
|
|
```sh
|
2020-03-03 22:19:22 +00:00
|
|
|
./lotus fetch-params --proving-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-03-03 22:19:22 +00:00
|
|
|
./lotus-seed pre-seal --sector-size 2048 --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-02-21 20:56:30 +00:00
|
|
|
./lotus daemon --lotus-make-genesis=dev.gen --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 ~/.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-03-04 02:24:08 +00:00
|
|
|
./lotus-storage-miner init --genesis-miner --actor=t01000 --sector-size=2048 --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
|
2019-12-18 04:13:18 +00:00
|
|
|
./lotus-storage-miner run --nosync
|
|
|
|
```
|
|
|
|
|
2019-12-18 18:53:19 +00:00
|
|
|
If all went well, you will have your own local Lotus Devnet running.
|