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

47 lines
1.1 KiB
Markdown
Raw 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-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-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=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
./lotus-storage-miner run --nosync
```
If all went well, you will have your own local Lotus Devnet running.