🐥

Filecoin Storage and Retrival tutorials

2023/06/06に公開

https://www.youtube.com/watch?v=BecGGm-YnPc

sectorが32GiB/64GiB なので 少ないデータのばあいはaggregataorが必要になる


related explanation:https://pl-strflt.notion.site/Data-FVM-234b7f4c17624cd8b972f92806732ca9

deal request

Aggregatorによって、一つにまとめられて一つのSectorとして効率的にProofされる。

HugeData : DirectDeal

https://github.com/filecoin-project/filecoin-fvm-localnet
https://github.com/filecoin-project/fevm-hardhat-kit

  1. docker compose up to launch filecoin on local
  2. deploy deal client contract to localnet with hardhat
  3. check deals localhost:8080/storage-deals/
  4. DL data with `lassie fetch --providers XX
  5. unpack data with `ipfs-car --unpack {CAR_NAME}.car
  6. original file extract to {CAR_NAME} dir

small Data. aggregator

Javascript which monitor event and call Edge.

  1. node fdt-deal-monitor-ethers.js
  2. yarn hardhat store-data --contract {$LOCAL_CONTRACT_ADR} --url {LIGHTOUHSE_CAR_URL} --network localnet
  3. wait 15 seconds on fdt-monitor, then showing sending payload logs(including Download)
  4. you can download with curl {$DOWNLOAD_URL} > out.car
  5. ipfs-car --unpack out.car
  6. the file will be extracted to {CID} dir
  7. we can check aggregate status with `curl {$AGGREGATE_URL} | jq .

Discussion