feat: remaining record content types to support #79

Closed
0xmuralik wants to merge 35 commits from murali/record-attributes into main
3 changed files with 16 additions and 10 deletions
Showing only changes of commit 4ba723a384 - Show all commits

View File

@ -30,10 +30,10 @@ message ServiceProviderRecord {
message WebsiteRegistrationRecord { message WebsiteRegistrationRecord {
Review

This was underspecified on my part, instead of a raw_multicodec field and a raw_binary field, all we need is a hash_reference field. And this reference will be a CID or multihash which uses the raw mutliformat prefix and references the binary as an IPLD object.

This was underspecified on my part, instead of a `raw_multicodec` field and a `raw_binary` field, all we need is a `hash_reference` field. And this reference will be a CID or multihash which uses the [raw mutliformat prefix](https://github.com/multiformats/multicodec/blob/master/table.csv#L40) and references the binary as an IPLD object.
Review

Let's rename this to JSPackage and add a string name=5; field

Let's rename this to `JSPackage` and add a `string name=5;` field
Review

This will reference a registered GitRepository record by CID/multihash

GitRepository also has a repo_reference field which will contain a qualitative/non-content-hash-reference e.g. a github or gitea web url.

It might be helpful to signal in the naming of the various reference fields which references are content-hash => content references vs one's that are not. E.g. hash_reference vs reference.

This will reference a registered `GitRepository` record by CID/multihash `GitRepository` also has a `repo_reference` field which will contain a qualitative/non-content-hash-reference e.g. a github or gitea web url. It might be helpful to signal in the naming of the various `reference` fields which references are content-hash => content references vs one's that are not. E.g. `hash_reference` vs `reference`.
Review

Note: hash_reference to a GitRepository IPLD object

Note: `hash_reference` to a `GitRepository` IPLD object
Review

Note: hash_reference to binary IPLD object

Note: `hash_reference` to binary IPLD object
Review

Note: hash_reference to a GitRepository IPLD object

Note: `hash_reference` to a `GitRepository` IPLD object
Review

Note: hash_reference to a ChainRegistrationRecord IPLD object

Note: `hash_reference` to a `ChainRegistrationRecord` IPLD object
Review

Note: hash_reference to a WASM IPLD object

Note: `hash_reference` to a WASM IPLD object
Review

Note: hash_reference to ServiceProviderRecord IPLD object

Note: `hash_reference` to `ServiceProviderRecord` IPLD object
Review

Note: hash_reference to WatcherRegistrationRecord IPLD object

Note: `hash_reference` to `WatcherRegistrationRecord` IPLD object
Review

Note: hash_reference to auction result IPLD object

Note: `hash_reference` to auction result IPLD object
Review

Note: hash_reference to JSPackage IPLD object

Note: `hash_reference` to `JSPackage` IPLD object
0xmuralik commented 2023-01-17 05:43:47 +00:00 (Migrated from github.com)
Review

There is also a npm_package_reference (CID) in this message. Should we go with renaming repo_reference with repo_hash_reference and npm_package_reference with js_package_hash_ref?

There is also a npm_package_reference (CID) in this message. Should we go with renaming repo_reference with repo_hash_reference and npm_package_reference with js_package_hash_ref?
Review

We can avoid adding hash to the field names and instead we should revert to using a / sub-mapping to denote CID/link

We can avoid adding `hash` to the field names and instead we should revert to using a `/` sub-mapping to denote CID/link
string url = 1 [(gogoproto.moretags) = "json:\"url\" yaml:\"url\""]; string url = 1 [(gogoproto.moretags) = "json:\"url\" yaml:\"url\""];
string repo_registration_record_cid = 2 HashReference repo_hash_reference = 2
[(gogoproto.moretags) = "json:\"repoRegistrationRecordCID\" yaml:\"repoRegistrationRecordCID\""]; [(gogoproto.moretags) = "json:\"repoHashReference\" yaml:\"repoHashReference\""];
string build_artifact_cid = 3 [(gogoproto.moretags) = "json:\"buildArtifactCID\" yaml:\"buildArtifactCID\""]; HashReference build_artifact_hash_ref = 3 [(gogoproto.moretags) = "json:\"buildArtifactHashRef\" yaml:\"buildArtifactHashRef\""];
string tls_cert_cid = 4 [(gogoproto.moretags) = "json:\"TLSCertCID\" yaml:\"TLSCertCID\""]; HashReference tls_cert_hash_ref = 4 [(gogoproto.moretags) = "json:\"tlsCertHashRef\" yaml:\"tlsCertHashRef\""];
string type = 5 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""]; string type = 5 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""]; string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
} }

View File

@ -1,7 +1,10 @@
record: record:
type: WebsiteRegistrationRecord type: WebsiteRegistrationRecord
url: https://cerc.io url: https://cerc.io
repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D repo_hash_reference:
build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR build_artifact_hash_ref:
/: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9
tls_cert_hash_ref:
/: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
version: 1.0.0 version: 1.0.0

View File

@ -1,7 +1,10 @@
record: record:
type: WebsiteRegistrationRecord type: WebsiteRegistrationRecord
url: https://cerc.io url: https://cerc.io
repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D repo_hash_reference:
build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
tls_cerc_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR build_artifact_hash_ref:
/: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9
tls_cert_hash_ref:
/: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
version: 1.0.0 version: 1.0.0