From 0ffc60a8ddac1893a568d5ca9f59f53b305834ec Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 15 Jan 2021 16:08:46 -0500 Subject: [PATCH] Add SoftWare Heritage persistent IDentifiers See https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html for the technical details of that spec. Software Heritage has done a superb job promoting content addressing in general, and their identifier scheme (SWHIDs, for short) in particular. By supporting them in CIDs / IPLD, I hope the IPFS ecosystem can align itself with that effort. Per the linked documentation, SWHIDs have their own nested grammar and versioning scheme. I have taken the version 1 core identifier grammar, unrolled it, and replaced `:` with `-` per the guidelines on separators, with the result being these 5 rows. Also note that some of those schemes coincide with certain forms of `git-raw`, already in this table. However, adding them here is not redundant, because the deserialization direction. While a git-raw CID may legally point to any sort of git object, the relevant SWHIDs specify in the identifier what sort of git object is expected, and if it points to a different type of valid git object, deserialization fails. That means there is no way to losslessly convert a git-coinciding SWHID into a git-raw CID. --- table.csv | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/table.csv b/table.csv index a8aa20dc..b05f57b2 100644 --- a/table.csv +++ b/table.csv @@ -110,6 +110,11 @@ ws, multiaddr, 0x01dd, wss, multiaddr, 0x01de, p2p-websocket-star, multiaddr, 0x01df, http, multiaddr, 0x01e0, +swhid-v1-snp, ipld, 0x01f0, SoftWare Heritage persistent IDentifier version 1 snapshot +swhid-v1-rel, ipld, 0x01f1, SoftWare Heritage persistent IDentifier version 1 release +swhid-v1-rev, ipld, 0x01f2, SoftWare Heritage persistent IDentifier version 1 revision +swhid-v1-dir, ipld, 0x01f3, SoftWare Heritage persistent IDentifier version 1 directory +swhid-v1-cnt, ipld, 0x01f4, SoftWare Heritage persistent IDentifier version 1 content json, serialization, 0x0200, JSON (UTF-8-encoded) messagepack, serialization, 0x0201, MessagePack libp2p-peer-record, libp2p, 0x0301, libp2p peer record type