This guide describes the necessary steps to initilize a storage provider on-chain.
Make sure that:
All the prerequisite steps have been completed.
Wallets have been created for the owner and worker address, and the worker address has funds so that the storage provider can be initialized.
The following environment variables have been defined and will be available for all ´lotus-miner` instances:
export LOTUS_MINER_PATH=/path/to/miner/config/storage export LOTUS_PATH=/path/to/lotus/node/folder # When using a local node. export FULLNODE_API_INFO=<api_token>:/ip4/<lotus_daemon_ip>/tcp/<lotus_daemon_port>/http # When using a remote Lotus node. export FIL_PROOFS_PARAMETER_CACHE=/fast/disk/folder # > 100GiB! export FIL_PROOFS_PARENT_CACHE=/fast/disk/folder2 # > 50GiB!
Parameters have been prefetched to the cache folders specified above.
The system has enough swap if needed.
The lotus api has been configured and the variable has been exported in the environment where lotus miner runs.
Before we can run the storage provider we need to initilize it by sending a message to the chain to tell the Filecoin network that we want to start a storage provider:
lotus-miner init --owner=<address> --worker=<needs-bls-address> --no-local-storage --sector-size=<32GiB or 64GiB>
- The Lotus Miner configuration folder is created in
~/.lotusminer/or in your
- The difference between owner and worker addresses is explained in the miner addresses guide. As mentioned above, we recommend using two separate addresses. If the
--workerflag is not provided, the owner address will be used. Control addresses can be added later when the storage provider is running.
--no-local-storageflag is used so that we can later configure specific locations for storage the location of our sealing storage, and our long term storage.
--sector-sizespecifies the sector size, and can not be changed after the init. The default is 32GiB.
Connectivity to the storage provider
Before you run your storage provider, it is important that it is reachable from any peer in the Filecoin network. For this, you will need a stable public IP and edit your
~/.lotusminer/config.toml as follows:
... [Libp2p] ListenAddresses = ["/ip4/0.0.0.0/tcp/24001"] # choose a fixed port AnnounceAddresses = ["/ip4/<YOUR_PUBLIC_IP_ADDRESS>/tcp/24001"] # important! ...
Once you start your storage provider, make sure you can connect to its public IP/port.
Running the storage provider
You are now ready to start the
or if you are using the systemd service file:
systemctl start lotus-miner
Publishing the addresses
Once the storage provider is up and running, publish your address (which you configured above) to the chain so that other nodes can talk to it directly and make deals:
lotus-miner actor set-addrs /ip4/<YOUR_PUBLIC_IP_ADDRESS>/tcp/24001
Your storage provider should now be preliminarily initialized and running, but there are still a few more things you need to configure to be ready for prime-time. We will go through these in the configuration section.