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

💡 Writing CIP119 metadata for DRep registration and DRep Updates #1758

Closed
Ryun1 opened this issue Aug 19, 2024 · 6 comments · Fixed by #1811
Closed

💡 Writing CIP119 metadata for DRep registration and DRep Updates #1758

Ryun1 opened this issue Aug 19, 2024 · 6 comments · Fixed by #1811

Comments

@Ryun1
Copy link
Member

Ryun1 commented Aug 19, 2024

Area

Delegation Pillar

Is there new design needed?

Not sure

What?

  • Support all the CIP119 fields for DReps registering and updating their metadata

Why?

  • GovTool should be following the appropriate standards

How?

  • New designs needed for DRep registration/updating form
  • Implement new designs in frontend, with CIP119 metadata template

(Optional) User Story with acceptance criteria

As a DRep
I want to attach rich metadata to my DRep registration
So delegators can have a good understanding of me when looking to delegate

@m-i-k-e
Copy link

m-i-k-e commented Aug 19, 2024

@Ryun1 is this essential for Bootstrapping, or is it a nice to have feature for this phase?

@m-i-k-e
Copy link

m-i-k-e commented Aug 19, 2024

To support this, GovTool need to have for DReps"

Ref: CIP 119 - https://developers.cardano.org/docs/governance/cardano-improvement-proposals/cip-0119/

  • support for "givenName" - I guess this is the DRep's name that we currently have.
  • support for an image - which is a profile photo I guess (how will this be stored?) It's messy as metadata, for sure
  • support for checking the hash of the image - If it's included in the metadata json, then the hash for the JSON would suffice
  • an optional field for DRep's objectives (freeform)
  • an optional field for DRep's motiviations (freeform)
  • an optional field for Drep's qualifications (freeform)
  • an optional field for DRep's references (type, label, URi) type can be link or "Identity" (not exactly sure what the CIP is stating here)
  • optional switch for "do not list" to keep 'private' the info that the DRep has entered from tools like GovTool

Hence, there is some design work, but also we need to understand:

  • How we are going to ask users to store 'metadata' images - could this be encapsulated in the JSON file?
  • I at least need to further understand what the references fields are about.

@m-i-k-e m-i-k-e moved this to To do in Govtool all Aug 19, 2024
@Ryun1 Ryun1 changed the title 💡 Full read and write CIP119 metadata support 💡 Writing CIP119 metadata for DRep registration and DRep Updates Aug 20, 2024
@Ryun1
Copy link
Member Author

Ryun1 commented Aug 20, 2024

Hey @m-i-k-e

support for an image - which is a profile photo I guess (how will this be stored?) It's messy as metadata, for sure

For this, GovTool can just support base64 encoding the images
So at DRep registration time, DReps can upload a profile image,
GovTool will then base64 encode it and add it into the JSON file

an optional field for DRep's references (type, label, URi) type can be link or "Identity" (not exactly sure what the CIP is stating here)

This identity thing is weird and confusing, agreed.

For this we can just reuse the links that GovTool already supports in DRep registration.
But add an option for DReps to label a link as identity.

optional switch for "do not list" to keep 'private' the info that the DRep has entered from tools like GovTool

This is a boolean, that I think GovTool should support and enter a default value of False.
This field gives DReps a way to attach metadata to their registration, but without their metdata being listed within DRep directories.

@m-i-k-e
Copy link

m-i-k-e commented Aug 20, 2024

For this, GovTool can just support base64 encoding the images
So at DRep registration time, DReps can upload a profile image,
GovTool will then base64 encode it and add it into the JSON file

Awesome, just how it should work

@m-i-k-e
Copy link

m-i-k-e commented Aug 20, 2024

From the CIP:

If the imageObject DOES NOT contain a base64 encoded image, the contentUrl MUST contain the URL where the image can be found and the sha256 property MUST be populated with the SHA256 hash of the image file contents found at the contentUrl. The SHA256 hash is needed in order for readers to verify that the image has not been altered since the metadata anchor was submitted on-chain.

So this means that an image is required, and as far as I understand there can be a url for metadata (along with a hash), and a url for the image (along with it's own hash)

However, to maintain sanity, GovTool will only support writing the image into the single JSON file.

What concerns me is that the image is required. I guess we upload a generic avatar for everyone, and they change it or not.

@Ryun1
Copy link
Member Author

Ryun1 commented Aug 22, 2024

For now, lets not support image upload

@MSzalowski MSzalowski moved this from To do to In progress in Govtool all Aug 23, 2024
@MSzalowski MSzalowski self-assigned this Aug 23, 2024
@MSzalowski MSzalowski linked a pull request Aug 23, 2024 that will close this issue
5 tasks
MSzalowski added a commit that referenced this issue Aug 26, 2024
…etadata-for-drep-registration-and-drep-updates

feat(#1758): add CIP-119 support on backend and metadata-validation
@github-project-automation github-project-automation bot moved this from In progress to Done in Govtool all Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment