decentralized-identity / decentralized-identity/decentralized-web-node

Records Commit Example Shows a `data` Field But Description Requires Clarification

Open
#207 5 comments 0 reactions 1 assignee Claimed by @csuwildcat View on GitHub
artifact: spec type: bug
Dominant language
HTML
Stars
413
Forks
75
PR merge metrics
No merged PRs in 30d

Description

On https://identity.foundation/decentralized-web-node/spec/#recordscommit, request for further clarity on the `data` field within a records commit. Shown in the example, but not expanded upon in the description section.

Example Given:

```json
{ // Message
"data": {...},
"recordId": "b65b7r8n7bewv5w6eb7r8n7t78yj7hbevsv567n8r77bv65b7e6vwvd67b6",
"descriptor": { // Message Descriptor
"method": "RecordsCommit",
"dataCid": CID(data),
"parentId": CID(ANCESTOR_CID),
"dateCreated": 123456789,
"commitStrategy": "json-merge",
"dataFormat": DATA_FORMAT
}
}
```

Description:

> RecordsCommit messages are JSON objects that include general [Message Descriptor](https://identity.foundation/decentralized-web-node/spec/#message-descriptors) properties and the following additional properties, which MUST be composed as follows:
>
> The message object MUST contain a recordId property, and its value MUST be the recordId of the logical record the entry corresponds with.
> If the message object is attached to a Protocol, and its value MUST be a [Computed Context ID](https://identity.foundation/decentralized-web-node/spec/#computed-context-ids). If the message is not attached to a Protocol, it MUST NOT contain a contextId property.
> The message object MUST contain a descriptor property, and its value MUST be a JSON object composed as follows:
> The object MUST contain a method property, and its value MUST be the string RecordsCommit.
> The object MUST include a parentId property, and its value MUST be the stringified [Version 1 CID](https://docs.ipfs.io/concepts/content-addressing/#identifier-formats) of the [DAG CBOR](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md) encoded descriptor object of the previous RecordsWrite or RecordsCommit ancestor in the record’s lineage.
> The object MUST contain a commitStrategy property, and if present its value MUST be a string from the table of registered [Commit Strategies](https://identity.foundation/decentralized-web-node/spec/#commit-strategies).
> The object MUST contain a dateCreated property, and its value MUST be an [[RFC3339](https://identity.foundation/decentralized-web-node/spec/#ref:RFC3339)] ISO 8601 timestamp that MUST be set and interpreted as the time the commit was generated.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.