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

47 lines
1.1 KiB
Markdown
Raw Normal View History

# Setup Local Devnet
Build the Lotus Binaries in debug mode, This enables the use of 1024 byte sectors.
2019-12-18 18:48:15 +00:00
```sh
make debug
```
2020-03-03 22:19:22 +00:00
Download the 2048 byte parameters:
```sh
2020-03-03 22:19:22 +00:00
./lotus fetch-params --proving-params 2048
```
Pre-seal some sectors:
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
```
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-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
```
Set up the genesis miner:
2019-12-18 18:48:15 +00:00
```sh
./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
```
Now, finally, start up the miner:
2019-12-18 18:48:15 +00:00
```sh
./lotus-storage-miner run --nosync
```
If all went well, you will have your own local Lotus Devnet running.