-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add named properties directly to inscription data #2053
Comments
Since metadata isn't relevant to the protocol, if we use this approach, we should stuff all metadata in a single tag. See #943 for some discussion. |
After thinking about metadata a bit, I'm actually warming up to this approach. It's extremely simple, covers the main use case, which seems to be adding simple traits to inscriptions, can be displayed easily, and doesn't require a dependency on a format like JSON or CBOR. We should use odd tags for the key/value pairs, since metadata can be safely ignored:
Keys and values would be UTF-8 encoded text, and would be displayed in a nested
|
@veryordinally Actually thinking now that this might be the best approach. What do you think? Also @raphjaph, take a look at this. |
We are actively using this in our tech demo of quadkey. While you will 100% not be interested in the product (for obvious reasons), the usage is a really cool example of how these can be used. Specifically, we use the following envelope:
I spend a fair bit of time looking at on-chain transactions and the envelope (as well as indexing non-standard inscriptions) so was very comfortable with the current rule that user-defined/application-specific operations needed to be prefixed with a byte that is odd (to avoid conflicts with protocol reserved even bytes), this led to us using 'qey' (q for quadkey instead of k for key) which begins with an odd byte. I would love to engage on this topic as I have already been experimenting with this probably more than most other developers in the space (excluding yourself). Interesting envelope mechanics I have explored include (but are not limited to):
|
We also index this KV store already as it seemed that it's use for application-specific development was always your intent when you reserved the even bytes. Other examples of it's use include Unisat's previous experiment of storing a 6-byte timestamp with a key of 'unisat' that indicated when they received the request for inscription.
|
One thing to keep in mind is that my original intent was that both odd-valued and even-valued keys would be reserved for protocol-level data. The difference in handling is because some fields can be ignored when they aren't understood, for example the proposed parent field, and some can't, for example the proposed offset field. If an implementation doesn't understand the parent field, it just won't display the inscription is having a parent, whereas if an implementation doesnt' understand the offset field, it would display the inscription in the wrong location, which is dangerous. |
Also @cypherpork, you might want to take a look. |
We really should talk more. If this proposal becomes the standard we will 100% index it in addition to the existing data. One of my large goals is to eventually index all non-transaction data about Bitcoin (old OP_RETURNs, counterparty assets, and even oddities like the two cases of identical txid). |
I would additionally propose a collection identifier field (not all collections are inscribed by the creators). I know that projects could simply use one of the k/v pairs, but having a defined place for that would make it a lot easier to pull rarities and rankings in a standardized way. |
Really liked the notion of a prime sat that could render an inscription immutable by burning it, so that creators could choose mutable or immutable, and collectors could easily understand if an inscription or collection is one or the other. If must choose only one, immutable best; but I envisage scenarios where altering metadata could be desirable and legitimate. |
This is what I have been doing in my envelope designs as well. I also use a key to signal if extended metadata exists in an OP_RETURN (for out-of-band non-standard metadata w/o expectation of interpretation/presentation beyond app-specific). Something else I have/had is an inner |
When you all say
This would indicate a change to existing inscription parsing logic of allowing multiple instances of the same key (3/5) AND makes order of tags meaningful. This seems sub-optimal, but is definitely preferable to storing them as json. Value should be an arbitrary type of data (less than 520 bytes in length). This is to avoid using more bytes than are necessary for other primitives. |
Yup, that's correct, updated the spec.
This is actually an intentional choice. This is intended to support human readable metadata, and without a schema arbitrary binary data can't be displayed to the user. |
Unisat did something self-righteous. |
This has been implemented. |
Incorporating named properties can significantly enhance inscriptions, especially with regards to NFT compatibility and other applications involving metadata. Although there have been various attempts to integrate metadata, they often involve a certain degree of complexity and indirection, such as using JSON inscriptions that reference other ordinals. This approach is not only unwieldy but also challenging to maintain.
To streamline this process, I propose adding named properties directly to the inscription data. One way to do it is the following:
Adopting this method for inscriptions would transform them into key-value stores, effectively resolving a multitude of issues and ensuring entirely on-chain operations. Additionally, this approach appears to be feasible for implementation in a way that is both forward and backward compatible.
The text was updated successfully, but these errors were encountered: