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

Add IPFS support #3

Open
cyberj0g opened this issue Sep 14, 2022 · 3 comments
Open

Add IPFS support #3

cyberj0g opened this issue Sep 14, 2022 · 3 comments

Comments

@cyberj0g
Copy link
Contributor

Implement same interface as for S3 and other storage providers.

Suggested cloud provider: pinata.cloud

@victorges @red-0ne I believe you already worked on IPFS support, could you share findings or suggestions, which may be helpful?

@thomshutt tagging for visibility

@red-0ne
Copy link

red-0ne commented Sep 15, 2022

It seems that we can either have it by implementing an object store (https://github.com/livepeer/go-tools) for pinata.cloud or use a custom impl.
Victor has a pinata client on the task runner codebase https://github.com/livepeer/task-runner/blob/1ff546da1d51496d276cf84765b3abcbc387c1fc/clients/ipfs.go#L36 that could help.

@victorges
Copy link
Member

Added some comments in the other issue on catalyst: livepeer/catalyst#154

The suggestion I have is that you could reuse some code from the existing Pinata client when creating the OS driver. It's currently here: https://github.com/livepeer/task-runner/blob/1ff546da1d51496d276cf84765b3abcbc387c1fc/clients/ipfs.go#L36

Might help you skip some of their idiosyncrasies like not using CIDv1 by default and dealing with their multi-part requests format.

Also don't worry about implementing the drivers.Driver interface extensively. Some methods may not be possible on Pinata/IPFS and it's ok to just panic or return an errors.New("not supported") or something like that. On Arweave for example we won't be able to delete things. On Pinata we can delete, but the List method makes much less sense. I've only created it to use in some clean-up scripts, but not really in production. So I wouldn't bother too much in translating that into the Driver interface (but if you do, that's a nice thing to have anyway).

@victorges
Copy link
Member

Oh for some reason Github didn't show @red-0ne's comment before mine so I repeated some things =P

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

No branches or pull requests

3 participants