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

Multiple ids #39

Merged
merged 4 commits into from
Mar 27, 2020
Merged

Multiple ids #39

merged 4 commits into from
Mar 27, 2020

Conversation

cboettig
Copy link
Owner

This adds preliminary support for multiple identifier formats (#1) in functions taking an identifier as an argument. hash://sha256/xx format remains the internal format, this is just using regex's and base64 decoding to recognize and convert other identifier formats (SSB, SRI, magnet, and NI).

This also starts setting up support for storing multiple hash types in the local tsv registry, but currently these are just placeholders until we can efficiently compute other hashes (#38). Even then, store() will remain sha256-based, these additional hashes will really just be for the local registry. (these multiple hash types are already understood by hash-archive.org: md5, sha1, sha256, sha384, sha512).

covers 4 of the other 5: magnet URI, SSB, subresource, and named-info.  Haven't figured out base58 encoding for multihashes...
This adds support to recognize different identifier formats in functions that take a content identifier as an argument (`retrieve`, `resolve`, `query_sources`).

This also adds potential columns in the local tsv registry to compute multiple hashes, but at this time we have not implemented multiple hash calculations.  Performance issues should be mitigated by streaming, #38
still needs cleaning up and more testing!
@cboettig cboettig merged commit 1619983 into master Mar 27, 2020
@cboettig cboettig deleted the multiple-ids branch March 30, 2020 22:38
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