Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARK M2 Lassie Retrievals #19

Closed
6 tasks done
juliangruber opened this issue May 16, 2023 · 5 comments
Closed
6 tasks done

SPARK M2 Lassie Retrievals #19

juliangruber opened this issue May 16, 2023 · 5 comments
Assignees

Comments

@juliangruber
Copy link
Member

juliangruber commented May 16, 2023

eta: 2023-06-30

Replace the code making HTTP requests to IPFS Gateway with a retrieval client like Lassie.

Important: Retrieval requests from this module should be indistinguishable from “legit” requests made by other actors in the network (e.g. Saturn). Otherwise SPs can prioritise checker requests over regular traffic.

Children:

  • Write a Go/FFI shim to start & stop the Lassie HTTP server. Write Rust bindings for this shim and make sure we can use this from Rust! We will need to configure tooling for CI/CD and also write tests! [5 days]
    feat: proof of concept rusty-lassie#1
  • Integrate Lassie into Zinnia (both zinnia and zinniad). (Start Lassie on start, stop it on exit.) [2 day]
  • Implement Zinnia JS API for retrieving content for a given CID, optionally allowing the caller to specify the address and protocol to use. [3 days]
    • E.g. we can add a small fetch wrapper that will translate URLs like ipfs://bafy... into Lassie HTTP GET requests.
    • Maybe it’s better to create our own API that will allow us to support additional request parameters like the peer address and the protocol to use. This new API can return fetch response under the hood.
      feat: IPFS retrieval client zinnia#243
  • Lassie improvements [2 days]
    • Implement authentication - only Zinnia requests should be handled by Lassie. Requests from other clients must be rejected.
    • We want to configure Lassie HTTP mode to not cache blocks between retrieval requests.
  • Update SPARK to use the new API Lassie spark#5
  • On zinniad start, delete all files in Lassie’s temp dir. These files may be created if Station exits Station while a CID retrieval request is in progress.
    Delete Lassie temp dir when zinniad starts zinnia#245
@bajtos
Copy link
Member

bajtos commented Jun 8, 2023

@juliangruber I think we forgot to add one more task to this milestone - update SPARK to use the new Zinnia/Lassie API.

In Lassie's HTTP spec, I can see that we can ask to retrieve from a specific provider(s) using a specific protocol(s).

I think the SPARK request URL will become something like this:

fetch(`ipfs://${cid}?protocols=bitswap&providers=/ip4/1.2.3.4/tcp/1234/tls/p2p/QmFoo`)

Do you remember if SPARK API includes the protocol and provider multi address when creating a new job? Do we have that data in our CID list?

@juliangruber
Copy link
Member Author

@bajtos
Copy link
Member

bajtos commented Jun 14, 2023

@juliangruber adding you as an assignee for the SPARK related work 🙇🏻‍♂️

@bajtos
Copy link
Member

bajtos commented Jun 26, 2023

Lassie improvements [2 days]

Implement authentication - only Zinnia requests should be handled by Lassie. Requests from other clients must be rejected.

Moved to CheckerNetwork/zinnia#268

We want to configure Lassie HTTP mode to not cache blocks between retrieval requests.

Moved to CheckerNetwork/zinnia#269

Closing this milestone as done.

@bajtos bajtos closed this as completed Jun 26, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Space Meridian Jun 26, 2023
@juliangruber
Copy link
Member Author

@bajtos I've removed the newlines between the items, so that starmaps can properly parse the children. See https://filecoinproject.slack.com/archives/C0418TBQ9CH/p1687850671862689?thread_ts=1687165457.518709&cid=C0418TBQ9CH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ done
Development

No branches or pull requests

2 participants