ipfs / go-graphsync

Initial Implementation Of GraphSync Wire Protocol
Other
100 stars 38 forks source link

Add extension for 'do not explore cids' #183

Closed willscott closed 3 years ago

willscott commented 3 years ago

Currently, graphsync supports an extension for doNotSendCIDs, which provides a list of CIDs that should not be sent during a transfer.

It may be the case that the requester wants to receive a dag, but wants to stop graph retrieval whenever a CID is reached. For instance, consider the use case of synchronizing a chain, but only back to the point of previous synchronization.

This could either be done as an extension to graphsync, as proposed here, or incorporated into the IPLD selector syntax.

Adding an extension here may remain useful as a way to more efficiently resume transfers with the ability to collapse the described 'cids i already have' to just roots of subtrees that have been received previously. The graphsync extension path also is likely a faster path for prototyping this behavior than the selector alternative.

welcome[bot] commented 3 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

willscott commented 3 years ago

After considering this more, i think the right way to do this is in selectors. Extended that within the context of existing spec definition in https://github.com/ipld/go-ipld-prime/pull/214

willscott commented 3 years ago

merged at the ipld-prime layer