-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Problem
- I'd like to repost someone's claim using a newer schema that has additional fields, and I want to fill in those fields for the reposted claim
- I'd like to repost a claim while changing some of the fields
- I'd like to repost a claim while adding or removing some tags
Proposed solution
Add two new fields to ClaimReference as follows
message ClaimReference {
bytes claim_hash = 1;
optional Claim deletions = 2;
optional Claim edits = 3;
}edits and deletions are used to change parts of the referenced claim.
- if
deletionsincludes a field that is not in the referenced claim, ignore it - if
deletionsincludes a repeated field that is in the reference claim, then any values indeletionsshould be removed from the referenced claim - if
deletionsincludes a non-repeated field that is in the reference claim, delete those fields from that claim (the value in thedeletedfield does not matter. it can be anything except the default value for that field) - if
editsincludes fields that the referenced claim does not include, or if it includes repeated fields, treat them as added to the claim - if
editsincludes non-repeated fields that are also in the referenced claim, treat them as overwriting the existing fields
Deletions must be applied first, and edits applied after.
The type of the deletions and edits Claims must match the type of the claim that is referenced. if it does not match, the edits will not make sense and downstream apps may ignore them or even ignore the claim as a whole.
Downstream apps should make clear to users which values come from the underlying claim and which come from edits/deletions.
If a referenced claim is updated after it is referenced, the values in deletions and edits may no longer make sense. Downstream apps should highlight to the user any fields that were updated in the referenced claim after being edited/deleted.
Outstanding Questions
- What to do if the referenced claim is updated to change the claim type? This gives the original claim's owner a way to "remove" the edits of the repost while still being reposted.
Corner Cases
- Claim A points to a 3-minute-long video, but the
durationin the claim is set to 5 minutes - I repost claim A and fix the
durationto be 3 minutes using theeditsfield - The owner of claim A updates it to point to a longer video which is 6 minutes long. They set the
durationin the metadata to 6 minutes (which is now correct for the new video) - My repost still has a
durationof 3 minutes, which is now wrong