-
Notifications
You must be signed in to change notification settings - Fork 36
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
Rewrite RGB21 spec using Contractum & concept of interfaces #137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of spelling change suggestions.
The update on fractional and collectibles is good. I also like that each collectible can be enumerated, such as like for baseball cards or vehicle VINs, though ideally this would be an Ascii string and not a U16.
I like the idea of Media for things such as embedded thumbnails. There's no long er an explicit limit on the length of the byte array, however.
Also, a question about Uri... I worry that this could be too brittle. Ideally we'd be able to bootstrap with several Sources-- sources [Source]
, and it could search for a unique Identifier amongst those sources. An assumption could be made that the Identifier is concatenated to the Source, so it might need to end in a trailing slash. I think an Identifier should be a [Byte] array, so the hash bytes themselves could be compactly-encoded. It could then have a HashType that is u16 that corresponds to this lookup table:
https://github.com/multiformats/multicodec/blob/master/table.csv
(Probably the only thing Protocol Labs ever made that could be remotely useful to us...)
What's nice is they also have Bitcoin hashes, which is good for interoperability across things like @casey's Ordinals project.
Another benefit to separating sources is that they could perhaps be updated by a separate OwnedRight utxo if source URIs ever need to be updated, without updating the hashes. This helps reduce the size and frequency of that state transition, and it also increases trust in that the sources might change over time (decades, centuries?), but the hashes will stay the same.
Additionally, perhaps there could be an array of Attachments, and each Attachment has a role field, which could be a short Ascii string that would label what it's for, some examples on how this would be used would be "Sample" for an audio file, vs "Lossless". For a video, you'd have Cover, Preview, HD, UHD, etc.
Co-authored-by: Hunter Trujillo <[email protected]>
Thank you for spotting misspellings! Committed them. On your topics:
Each token is a data structure, which includes many fields, among them external attachments or URLs (see
Sorry for confusing, there is: with the Contractum language (and strict encoding type definitions) each array, unless specified otherwise, is restricted to On the sources/attachments/URLs I will comment separatedly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted another mistake
On URIs:
I will work on the sources part |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cryptoquick pls check do I match your suggestions with this improvement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more review, hopefully this isn't too nitpicky.
One question about Nomination... Is this a reference to Denomination? Nomination is a different word with a different meaning, unless there's an archaic use I'm unfamiliar with.
Co-authored-by: Hunter Trujillo <[email protected]>
@cryptoquick committed changes which are non-questionable, to focus on remaining questions |
@cryptoquick seems we are lost in terminological differences. For me,
The only thing which is external to the contract is an attachment content (last thing). I.e. each token may have relation to multiple external files. These files are identified by a hash of the data; i.e. hash of the data can't be ever changed for each specific attachment, i.e. it is a property of attachment (and not a contract, channel/source, token or anything else). What can change is the channel via which the file is accessed. Thus, I propose to have three distinct things:
For instance, a contract may have two sources:
and a token having two attachments:
Which will result in four addresses which can be used for content retrieval:
|
That's perfect! This will be a usage convention we'll definitely want to document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @dr-orlovsky for the thorough review. I think we've thought through everything I'd like to think about for this.
Overall the proposed specification looks very good to me, I just have a couple of small feedback:
I wouldn't limit ourselves with this assumption, in the physical world there are plenty of collectibles that are created in much larger amounts than 64k units (e.g. some Pokemon cards have been printed in the order of millions), and also in the context of gaming I would expect some collectibles to be printed in very large quantities. I suggest therefore to increase it to U64 as we have in RGB20.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fedsten tried to address your proposal with these suggestions - pls confirm if you are ok with them.
I have taken U32
and not U64
for the max token amount, since would like to prevent spamming with NFT transactions. Unlike fungible tokens, non-fungible tokens are transferred one by one (or in fractions), meaning that state transition would have at least one output and one input per each token transferred (!!!), unlike with fungibles. Having trillions of them would grow consignments to enourmous size - and with U32
you already would have up to 4 billion of tokens!
True. U32 is a good compromise, as far as I know, there's no single product model I know of that has shipped more than 4 billion units. |
@cryptoquick @fedsten I propose to merge this if you do not have any other comments |
@dr-orlovsky sorry for being late, I'll do a review by the end of today, could you please wait until then? |
I don't think that Couldn't we remove the The reasoning here is that a media could change source, it's impossible to guarantee that a DNS will be valid forever, so I don't think this should be included in the consignment. |
That's a pretty clever solution, @zoedberg. I like it. It'll make sense to have multiple attachments by their Id, format, and purpose, but omitting the actual source could work so long as a source that's valid for that ID is provided in an invoice as a sort of formalized request format. |
@zoedberg good point. The asset can be provided not only by the creator, and it is not the issue who has to control the distribution of the asset once it is out. Since the token unique id is already there (it is the attachment id), we can remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zoedberg I put your suggestion into the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had more considerations over overall RGB interface and schema capabilities and put some related fixes to the code: see #137 (comment) explanations; other comments are consequence of this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another small fix
Also asking @cryptoquick to review (can't add him to reviewers without him joining this github org first - invite sent).