Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Use tags for extensibility #51

Closed
casey opened this issue Oct 9, 2023 · 2 comments · Fixed by ordinals/ord#2547
Closed

Use tags for extensibility #51

casey opened this issue Oct 9, 2023 · 2 comments · Fixed by ordinals/ord#2547

Comments

@casey
Copy link
Owner

casey commented Oct 9, 2023

Currently, the etching is one or two trailing varints in the runestone, which are the rune, and a small amount of additional metadata. This is simple, but limits us to a small amount of metadata, and gives us limited extensibility. We might want additional metadata, or some way to extend or modify the protocol in the future, and using a separate push for the etching would make that easy.

@casey
Copy link
Owner Author

casey commented Oct 10, 2023

We could also use a similar approach to inscriptions:

  • Runestone is a sequence of varints.
  • Parse as sequence of (tag, value) fields.
  • If an unrecognized even tag is encountered, then all input runes are burned, and if there is an etching, its supply is set to zero.
  • A tag of 0 means that the remaining varints are edicts. If we've previously encountered an unrecognized tag, then the edicts are ignored and all runes are burned.

This increases the size of the runestone by one byte, if there are fields, by one byte per field.

If we do this, we need to emphasize that ALL tags are reserved for the protocol, and should not be used with prior coordination.

@casey
Copy link
Owner Author

casey commented Oct 10, 2023

Things we cannot do:

  • We cannot miss any etchings. If we have unique runes, then in order to avoid conflicts, un-upgraded and upgraded implementations must recognize the same runeset.

@casey casey changed the title Consider using separate push for etching Use tags for extensibility Oct 10, 2023
@casey casey linked a pull request Oct 16, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant