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

Ordinal Envelopes, but then OP_RETURN? Cost? #10

Open
AngusP opened this issue May 23, 2024 · 0 comments
Open

Ordinal Envelopes, but then OP_RETURN? Cost? #10

AngusP opened this issue May 23, 2024 · 0 comments

Comments

@AngusP
Copy link
Contributor

AngusP commented May 23, 2024

The spec spends a fair amount of time explaining the advantages of the witness discount and the Ord/Rodarmor "envelope" OP_FALSE OP_IF ... construction, but then uses OP_RETURN instead for creation. This doesn't seem that well motivated in the spec. (I did separately PR #8 to add the word 'envelope' which is IIUC correct-er that ordinal/inscription, if you're just borrowing the taproot script bit)

I think it'd be good to explicitly detail why this is done for those less familiar?

  • Envelopes work but require two transactions (1st tx commits to the tapscript, 2ns spends to reveal the script so the envelope can be read) whereas OP_RETURN is one-and-done
  • The Batch Create section gives a table with vBytes for various batch sizes, this could also list the equivalent "what if you did them one by one" vByte cost to illustrate the savings from batching

Also given that Batch Creation uses a different mechanism (the did flag is in the revealed envelope, there's no OP_RETURN if I understand correctly) it may be simpler overall to have that be the only creation mechanism and drop the OP_RETURN? (I'm not that sure of the cost diff, but I'd guess most non-batch DIDs are all going to get an update anyway to add useful stuff to the DID document, so that could be done up-front)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant