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

Bucket Pinning Service #2

Merged
merged 33 commits into from
May 20, 2021
Merged

Bucket Pinning Service #2

merged 33 commits into from
May 20, 2021

Conversation

sanderpick
Copy link
Member

@sanderpick sanderpick commented Mar 22, 2021

This adds a bucket-based implementation of the IPFS Pinning Service API using some initial Thread DID work.

Motivation

Buckets are moving to the DID-based network of thread services architecture described in the Thread DIDs discussion. Remote pinning is a nice fit for a thread service for a couple reasons:

  • Pinning is more decentralized when users can "discover" pinning services on the thread network.
  • When backed by a thread node, pinning can happen over Libp2p in addition to HTTP.

A bucket makes for a user-friendly silo of pins: Create a bucket, get a pinning service.

> buck init
Enter a name for your new bucket (optional): █
✗ Encrypt bucket contents:
> Your bucket links:
> https://<host>/thread/<thread>/buckets/<bucket> Thread link
> https://<host>/ipns/<bucket> IPNS link
> https://<host>/bps/<bucket> Pinning Service endpoint
> /dnsaddr/<host>/p2p/<peer>/bps/<bucket> Libp2p Pinning Service endpoint
> Success! Initialized /Users/sander/buckets/test as a new empty bucket

Add the service to an IPFS node:

> ipfs pin remote service add mysrv https://<host>/bps/<bucket> <did_token>

Currently, there's no easy way to generate the DID token using the buck CLI, but we can add that soon.

Add a remote pin:

> ipfs pin remote add /ipfs/bafymydata --service=mysrv --name=myfile --background

Other stuff in here:

  • Adds a multipart push paths endpoint (gRPC uploads are slow)
  • Moves thread related gateway endpoints to go-threads
  • Adds the non-fast-forward option to all bucket methods that mutate state
  • Adds new bucket methods for pushing/pulling user info: PushPathInfo and PullPathInfo
  • Adds basic bucket write transactions needed for pin queue processing (not yet available over gRPC)
  • Adds gateway subdomain support for pinning APIs, e.g., <domain>/<bucket_key>/pins -> <bucket_key>.pins.<domain>
  • Pulls in upstream bucket related changes from https://github.com/textileio/textile

Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
Signed-off-by: Sander Pick <[email protected]>
@sanderpick sanderpick marked this pull request as ready for review May 18, 2021 01:59
Signed-off-by: Sander Pick <[email protected]>
@sanderpick
Copy link
Member Author

Merging this now. I added a warning to the readme regarding the alpha nature of the DID work in go-threads.

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

Successfully merging this pull request may close these issues.

1 participant