This little software provides an emulated storage provider for demo purpose only.
It accepts all boost 1.2.0 deal proposals.
If the proposal comes with HTTP link to download CAR file, it will download the file and construct the blockstore to serve retrievals.
It accepts all retrieval types, including
- IPFS Gateway
- Payload Retrieval
- Block Retrieval
It accepts bitswap retrieval but only if the block exists in downloaded CAR files.
The SP will return the corresponding retrieval protocols so below commands will work
boost provider retrieval-transports f02815405
lassie fetch --provider \
/ip4/127.0.0.1/tcp/24001/p2p/12D3KooWDeNSud283YaRmhqbZDynLNmtATBxjUPAUJxtPyEXXp9u \
--protocols http ...
lassie fetch --provider \
/ip4/127.0.0.1/tcp/24001/p2p/12D3KooWDeNSud283YaRmhqbZDynLNmtATBxjUPAUJxtPyEXXp9u \
--protocols bitswap ...The provider does not make advertisements to IPNI.
go install github.com/data-preservation-programs/sim-sp@latest$ sim-sp run -h
NAME:
sim-sp run - Run the simulated storage provider f02815405
USAGE:
sim-sp run [command options] [arguments...]
OPTIONS:
--listen value [ --listen value ] Addresses to listen on for listening for incoming storage deals or retrieval deals (default: "/ip4/0.0.0.0/tcp/24001", "/ip6/::/tcp/24001") [$SIM_SP_LISTEN]
--key value Private key to use for libp2p identity encoded with base64 (default: Built-in key for 12D3KooWDeNSud283YaRmhqbZDynLNmtATBxjUPAUJxtPyEXXp9u) [$SIM_SP_KEY]
--http value HTTP bind address for serving HTTP retrieval (default: ":7778") [$SIM_SP_HTTP]
--car-dir value Directory to store CAR files in (default: "./cars") [$SIM_SP_CAR_DIR]
--help, -h show helpYou just need to send deals to f02815405 and make sure sim-sp is running locally.
f02815405 is a real miner on the chain with a real peer ID and libp2p address. The private key and the address is provided as the default value for --key and --listen options.
When you make a deal with f02815405, it will lookup the multiaddr of the miner which will connect to sim-sp that runs locally.
- Copy Download docker-compose.yaml from https://github.com/filecoin-project/motion/blob/main/docker-compose.yml
docker compose -f ./docker-compose.yml -f ./sim-sp.yml up --build- POST a file to Motion and make sure it is larger than
MOTION_SINGULARITY_PACK_THRESHOLDin.env - Log from
singularity-dataset-workershould show the data is being prepared - Log from
singularity-deal-pushershould push the deal tosim-spat the start of the next minute - Log from
sim-spshould tell the deal proposal is accepted, CAR files downloaded and Deal activated - Log from
singularity-deal-trackershould show the deal is updated toActivestate within the next minute - After a minute, the local cached files will be cleaned up so retrieval will come directly from
sim-sp