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

DIP-267 Provide a User Data mechanism for links to profiles #277

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

wesbiggs
Copy link
Member

@wesbiggs wesbiggs commented Apr 15, 2024

Problem

#267 discusses the advantages of DSNP profile documents being discoverable based on a user's identifier, rather than being temporal data that must be externally tracked and indexed to be useful.

Solution

This proposal adds a new User Data type, profileResources, which is currently defined for the Activity Content profile document type, but is extensible to other document types that may need to be user-centric in the future.
A profile resource is simply a link type (as an integer) and a CID as a string plus byte length.
We define link type 1 for AC profiles.

This change assumes we are versioning for 1.3, but does not include versioning updates, which are in other open PRs at this time.

Change summary:

  • Updated Spec Versions
  • Added definition for ProfileResource Avro type
  • Added entry in User Data page for profileResource
  • Updated navigation; added ProfileResource, moved Profile announcement to "Migrated" section

@wesbiggs wesbiggs force-pushed the proposal/DIP-267_Use_User_Data_for_Profiles branch from 92ebb67 to d46a05f Compare June 3, 2024 13:50
pages/DSNP/Identity.md Outdated Show resolved Hide resolved
Copy link
Member

@wilwade wilwade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One clarification needed about CID serialization, but otherwise looks like a good improvement to me!

pages/DSNP/Types/ProfileResource.md Show resolved Hide resolved
| Content Hash | `0x1234567890abcdef0123456789abcdef0123456789abcdef0123456789abcdef` |
| Content Hash | `QmQNHNfHnbgJJ6nK4UPx2VtTUCafAKCbqZJ6ZRYUGjoeFj` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this change should also propagate to pages/ActivityContent/Associated/Hash.md Or would that require #273 to be implemented first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is just changing it to a multihash multibase string, as we don't serialize hashes as hex anywhere as far as I know. (The DSNP URI should match the hash from the announcement, which is now a multihash.)

Technically unrelated to the purpose of this PR, just a vestigial issue I happened to run into. I can make it a separate PR if you think it's warranted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fine. Just checking

@wesbiggs wesbiggs self-assigned this Jun 13, 2024
@wesbiggs wesbiggs force-pushed the proposal/DIP-267_Use_User_Data_for_Profiles branch from fafb58f to 7f39e0f Compare June 14, 2024 22:12
Copy link
Member

@wilwade wilwade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement. Matches expected DIP-267

@wesbiggs wesbiggs merged commit 1e3982a into main Jun 17, 2024
1 check passed
@wesbiggs wesbiggs deleted the proposal/DIP-267_Use_User_Data_for_Profiles branch June 17, 2024 14:55
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.

2 participants