LogoLogo
v1.x (Deprecated)
v1.x (Deprecated)
  • What is Boost?
  • Features
  • Architecture
    • Repository
    • Database
    • DAG store
    • libp2p Protocols
  • Hardware requirements
  • Getting started
    • As a storage provider
    • As a client
  • Migrate from Lotus to Boost
    • Migrate a monolith lotus-miner to Boost
    • Migrate a Lotus markets service process to Boost
    • Roll back to Lotus markets service process
  • Configuration
    • UI Settings
    • HTTP Transfer limit
    • Deal Filters
    • Remote CommP
    • Legacy Deal configuration
    • HTTP indexer announcement
  • Backup and Restore
  • Tutorials
    • How to store files with Boost on Filecoin
    • Using filters for storage and retrieval deals
    • Setting up a monitoring stack for Boost
  • Bitswap Retrieval
  • HTTP Retrieval
    • Serving files with booster-http
  • Troubleshooting
  • Experimental Features
    • FVM Contract Deals
    • Local Index Directory
      • Architecture
      • Requirements
      • Initialisation
  • GraphQL API
  • JSON-RPC API
  • FAQ
  • Need help?
Powered by GitBook
On this page
Edit on GitHub
Export as PDF
  1. Tutorials

How to store files with Boost on Filecoin

This tutorial goes through all the steps required to make a storage deal with Boost on Filecoin.

PreviousTutorialsNextUsing filters for storage and retrieval deals

Last updated 1 year ago

First, you need to initialise a new Boost client and also set the endpoint for a public Filecoin node. In this example we are using

export FULLNODE_API_INFO=https://api.node.glif.io

boost init

The init command will output your new wallet address, and warn you that the market actor is not initialised.

boost init

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

Then you need to send funds to the wallet, and add funds to the market actor (in the example below we are adding 1 FIL).

You can use the boostx utilities to add funds to the market actor:

boostx market-add 1

You can confirm that the market actor has funds by running boost init again.

After that you need to generate a car file for data you want to store on Filecoin, and note down its payload-cid. We recommend using CLI to generate the car file.

car create -f my-data.car --version 1 <my-data>
car root my-data.car

bafykbzacedzjq6jvlqnclrseq8pp5lypa6ozuqgug3wjie3orh67berkwv7e4

Then you need to calculate the commp and piece size for the generated car file:

boostx commp ./my-data.car

CommP CID:  baga6ea4seaqjaxked6ovoj5f3bdisfeuwtjhrzh3s34mg5cyzevgoebe7tdckdi
Piece size:  2097152
Car file size: 1101978 

Place the generated car file on a public HTTP server, so that a storage provider can later fetch it.

Finally, trigger an online storage deal with a given storage provider:

export FULLNODE_API_INFO=https://api.node.glif.io

boost deal --verified=false \
           --provider=f0026876 \
           --http-url=https://public-http-server.com/my-data.car \
           --commp=baga6ea4seaqjaxked6ovoj5f3bdisfeuwtjhrzh3s34mg5cyzevgoebe7tdckdi \
           --car-size=1101978 \
           --piece-size=2097152 \
           --payload-cid=bafykbzacedzjq6jvlqnclrseq8pp5lypa6ozuqgug3wjie3orh67berkwv7e4
https://glif.io
go-car