This section describes how to roll back to Lotus markets service process if you are not happy with boostd
Before you begin migration from Lotus markets service process to Boost, make sure you have a backup of your Lotus repository, by following the Lotus documentation. You can also do a full backup of the Lotus markets repository directory.
If you haven't made any legacy deals with Boost:
Stop boostd
Run your lotus-miner
markets
service process as you previously did
If you have made new legacy deals with Boost, and want to migrate them back:
Stop boostd
Copy the dagstore
directory from boost
repository to markets
repository.
Export Boost deals datastore keys/values:
lotus-shed market export-datastore --repo <repo> --backup-dir <backup-dir>
Wrote backup file to <backup-dir>/markets.datastore.backup
Import the exported deals datastore keys/values from boost
to lotus markets
:
lotus-shed market import-datastore --repo <repo> --backup-path <backup-path>
Completed importing from backup file <backup-path>
This section describes how to upgrade your lotus-miner markets service to boostd
If you are running a monolith
lotus-miner
and have not yet split the markets
service into an individual process, follow the steps in Migrate a monolith lotus-miner to Boost.
If you are running a markets
service as a separate lotus-miner
process:
1. Stop accepting incoming deals
2. Wait for incoming deals to complete
3. Shutdown the markets process
4. Backup the markets repository
5. Backup the markets datastore (in case you decide to roll back from Boost to Lotus) with:
6. Make sure you have a Lotus node and miner running
7. Create and send funds to two new wallets on the lotus node to be used for Boost
Boost currently uses two wallets for storage deals:
The publish storage deals wallet - This wallet pays the gas cost when Boost sends the PublishStorageDeals
message.
If you already have a PublishStorageDeal control wallet setup then it can be reused in boost as the PUBLISH_STORAGE_DEALS_WALLET
.
The deal collateral wallet - When the Storage Provider accepts a deal, they must put collateral for the deal into escrow. Boost moves funds from this wallet into escrow with the StorageMarketActor
.
If you already have a wallet that you want to use as the source of funds for deal collateral, then it can be reused in boost as the COLLAT_WALLET
.
8. Boost keeps all data in a directory called the repository. By default the repository is at ~/.boost
. To use a different location pass the --boost-repo
parameter.
9. Export the environment variables needed for boostd migrate-markets
to connect to the lotus daemon and lotus miner.
Export environment variables that point to the API endpoints for the sealing and mining processes. They will be used by the boost
node to make JSON-RPC calls to the mining/sealing/proving
node.
10. Set the publish storage deals wallet as a control wallet.
Add the value ofPUBLISH_STORAGE_DEALS_WALLET
to the parameter DealPublishControl
in the Address
section of lotus-miner configuration if not present. Restart lotus-miner if configuration has been updated.
11. Run boostd migrate-markets
to initialize the repository and start the migration:
The migrate-markets
command
Initializes a Boost repository
Migrates markets datastore keys to Boost
Storage and retrieval deal metadata
Storage and retrieval ask data
Migrates markets libp2p keys to Boost
Migrates markets config to Boost (libp2p endpoints, settings etc)
Migrates the markets DAG store to Boost
12. Run the boostd
service, which will start:
libp2p listeners for storage and retrieval
the JSON RPC API
the graphql interface (used by the react front-end)
the web server for the react front-end
In your firewall you will need to open the ports that libp2p listens on, so that Boost can receive storage and retrieval deals.
See the Libp2p
section of config.toml
in the Repository
Open http://localhost:8080 in your browser.
To access a web UI running on a remote server, you can open an SSH tunnel from your local machine:
Boost API can be accessed by setting the environment variable BOOST_API_INFO
same as LOTUS_MARKET_INFO
.
If you have already split a your lotus-miner into a separate markets process (MRA), follow the steps in Migrate a Lotus markets service process to Boost.
Please note that a monolith miner can only split into boost(market)+miner on the same physical machine as it requires access to the miner repo to migrate the deal metadata.
1. Make sure you have a Lotus node and miner running
2. Create and send funds to two new wallets on the lotus node to be used for Boost
Boost currently uses two wallets for storage deals:
The publish storage deals wallet - This wallet pays the gas cost when Boost sends the PublishStorageDeals
message.
If you already have a PublishStorageDeal control wallet setup then it can be reused in boost as the PUBLISH_STORAGE_DEALS_WALLET
.
The deal collateral wallet - When the Storage Provider accepts a deal, they must put collateral for the deal into escrow. Boost moves funds from this wallet into escrow with the StorageMarketActor
.
If you already have a wallet that you want to use as the source of funds for deal collateral, then it can be reused in boost as the COLLAT_WALLET
.
3. Set the publish storage deals wallet as a control wallet.
Add the value ofPUBLISH_STORAGE_DEALS_WALLET
to the parameter DealPublishControl
in the Address
section of lotus-miner configuration if not present. Restart lotus-miner if configuration has been updated.
4. Set up environment variables needed for Boost migration
Export the environment variables needed for boostd migrate-monolith
to connect to the lotus daemon and lotus miner.
Export environment variables that point to the API endpoints for the sealing and mining processes. They will be used by the boost
node to make JSON-RPC calls to the mining/sealing/proving
node.
1. Stop accepting incoming deals
2. Wait for incoming deals to complete
3. Shutdown the lotus-miner
4. Backup the lotus-miner repository
5. Backup the lotus-miner datastore (in case you decide to roll back from Boost to Lotus) with:
6. Set the environment variable LOTUS_FULLNODE_API
to allow access to the lotus node API.
Run boostd migrate-monolith
to create and initialize the boost repository:
The migrate-monolith
command
Initializes a Boost repository
Migrates markets datastore keys to Boost
Storage and retrieval deal metadata
Storage and retrieval ask data
Migrates markets libp2p keys to Boost
Migrates markets config to Boost (libp2p endpoints, settings etc)
Migrates the markets DAG store to Boost
1. Backup lotus-miner's config.toml
2. Disable the markets subsystem in miner config:
Boost replaces the markets subsystem in the lotus-miner, so we need to disable the subsystem in config:
Under the [Subsystems]
section set EnableMarkets = false
3. Change the miner's libp2p port
Boost replaces the markets subsystems, and listens on the same libp2p port, so we need to change the libp2p port that the miner is listening on.
Under the [Libp2p]
section change the port in ListenAddresses
Start lotus-miner up again so that Boost can connect to the miner when it starts.
boostd
serviceThe boostd
service will start:
libp2p listeners for storage and retrieval
the JSON RPC API
the graphql interface (used by the react front-end)
the web server for the react front-end
In your firewall you will need to ensure that the libp2p ports that Boost listens on are open, so that Boost can receive storage and retrieval deals.
See the Libp2p
section of config.toml
in the Repository
Open http://localhost:8080 in your browser.
To access a web UI running on a remote server, you can open an SSH tunnel from your local machine:
Boost API can be accessed by setting the environment variable BOOST_API_INFO
same as LOTUS_MARKET_INFO
.
Once the Boost has been split from the monolith miner, it can be moved to another physical or virtual machine by following the below steps.
Build the boost binary on the new machine by following the Getting Started step.
Copy the boost repo from the original monolith miner machine to the new dedicated boost machine.
Set the environment variable LOTUS_FULLNODE_API
to allow access to the lotus node API.
Open the required port on the firewall on the monolith miner machine to allow connection to lotus-miner API.
In your firewall you will need to ensure that the libp2p ports that Boost listens on are open, so that Boost can receive storage and retrieval deals.
See the Libp2p
section of config.toml
in the Repository
Start the boostd
process.
This section describes how to upgrade your lotus-miner markets service to boostd, as well as how to roll-back if you are not happy with boostd
A storage provider can run the lotus as a monolith process where everything is handled by a single lotus-miner
process or separate the mining and market subsystems on different machines.
Boost supports migration from both monolith and a split-market miner. You can follow the below guides to migrate to boost.
Please note that Boost uses a SQLite database for the deal metadata and logs. Once Boost has been enabled, the new deals cannot be rolled back to the Lotus markets. If you decide to roll back after making Boost deals, you will lose all the metadata for the deal made with Boost. However, this will have no impact on the sealed data itself.