Did I Improve ThisBlogAbout

Boost - Filecoin deals management tool

19 March, 2023 - 4 min

Setting up and creating a Filecoin deal with Boost

Boost is an open-source tool that has been specifically designed to cater to the needs of Filecoin Storage Providers. It has emerged as a popular choice among storage providers who want to manage their storage deals efficiently. However, it's not just limited to storage providers - clients can also utilize Boost to initiate storage deals with ease.

In this article, I'll guide you through the process of setting Boost up locally and the steps involved in initiating a storage deal, providing you with a comprehensive understanding of how Boost can be utilized to streamline your Filecoin storage deals.

note: I'll be using the hyperspace testnet.

1. Setup BOOST (macos)

For the official guide check here.

1.1 First we need to install the required dependencies

brew install node@16
brew install bzr jq pkg-config hwloc coreutils

1.2 (optional) If you have multiple node versions consider nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash
nvm install 16  # run if you don't have node 16
nvm use 16  # note: not needed if you ran install command

1.3 Now we can download and build boost

export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
git clone https://github.com/filecoin-project/boost
cd boost
make build
sudo make install

2. Init BOOST node

2.1 Run init command

$ export FULLNODE_API_INFO=https://api.hyperspace.node.glif.io
$ boost init

INFO    boost   boost/init_cmd.go:46    default wallet set      {"wallet": "f3wtin6jbsufk5cujufqizrprph5rxyfbyqb6ffxqkb2mweynchk4dlrr574tgwmndh7ik5qfunu2uyfatyt7q"}
INFO    boost   boost/init_cmd.go:53    wallet balance  {"value": "0"}
WARN    boost   boost/init_cmd.go:58    market actor is not initialised, you must add funds to it in order to send online deals

Note the wallet that was just created and use the hyperspace faucet to fund it.

3. Create Storage Deal request

3.1 Create CAR file

$ boostx generate-car ../testing ./testing.car
Payload CID:  bafykbzacebj47nl7u37knizcpzr6cgawifnvv3xb4ezlxiruqvz7skjhxzvw6

3.2 Calculate the CommP and Piece Sice from the CAR file

$ boostx commp testing.car
CommP CID:  baga6ea4seaql3zzi4ctxekhmudaaca2qbz4yqzylq3dtarid424l7n25ffijqiy
Piece size:  4194304
Car file size:  3738170

3.3 Upload file to an HTTP server

In this case you can use for example Lighthouse.

3.4 Create deal

$ boost deal --verified=false \
           --provider=t01036 \
           --http-url=https://data-depot.lighthouse.storage/api/download/download_car\?fileId\=22c92c87-4648-41ac-a6a8-dab1b1aba1d4.car \
           --commp=baga6ea4seaql3zzi4ctxekhmudaaca2qbz4yqzylq3dtarid424l7n25ffijqiy \
           --car-size=3738170 \
           --piece-size=4194304 \
           --payload-cid=bafykbzacebj47nl7u37knizcpzr6cgawifnvv3xb4ezlxiruqvz7skjhxzvw6

sent deal proposal
  deal uuid: e7e18d68-0691-453c-afca-2fd63bfd56a4
  storage provider: f01036
  client wallet: f3wtin6jbsufk5cujufqizrprph5rxyfbyqb6ffxqkb2mweynchk4dlrr574tgwmndh7ik5qfunu2uyfatyt7q
  payload cid: bafykbzacebj47nl7u37knizcpzr6cgawifnvv3xb4ezlxiruqvz7skjhxzvw6
  url: https://data-depot.lighthouse.storage/api/download/download_car?fileId=22c92c87-4648-41ac-a6a8-dab1b1aba1d4.car
  commp: baga6ea4seaql3zzi4ctxekhmudaaca2qbz4yqzylq3dtarid424l7n25ffijqiy
  start epoch: 185096
  end epoch: 703496
  provider collateral: 0

3.5 Check Storage deal status

Unfortunately there seems to be something wrong with the CommP calculated locally and the one calculated by the SP upon responding to the deal.

$ boost deal-status --provider=t01036 --deal-uuid=e7e18d68-0691-453c-afca-2fd63bfd56a4

got deal status response
  deal uuid: e7e18d68-0691-453c-afca-2fd63bfd56a4
  deal status: Error: failed to verify CommP: commP expected=baga6ea4seaql3zzi4ctxekhmudaaca2qbz4yqzylq3dtarid424l7n25ffijqiy, actual=baga6ea4seaqgrqj4ifoog25o5vnizq5kj6vqf4zq3r5wos57qbecqp6mngytqdy: commp mismatch
  deal label: bafykbzacebj47nl7u37knizcpzr6cgawifnvv3xb4ezlxiruqvz7skjhxzvw6
  publish cid: <nil>
  chain deal id: 0

Hope this gives you a boost to start playing around with Filecoin deals.



Hope you enjoyed! Vicente




Articles in this web3 series

  1. Blockchain - What is a Blockchain?
  2. Ethereum Tokens - What are Ethereum Tokens?
  3. Filecoin Lite Node - How to setup a Filecoin Lite Node locally
  4. Lighthouse - A perpectual storage solution using IPFS and Filecoin
  5. Boost - Filecoin deal management tool for Storage Providers