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

Create multiple inscriptions in a single transaction #876

Closed
casey opened this issue Dec 1, 2022 · 3 comments
Closed

Create multiple inscriptions in a single transaction #876

casey opened this issue Dec 1, 2022 · 3 comments

Comments

@casey
Copy link
Collaborator

casey commented Dec 1, 2022

Should be possible to make multiple inscriptions in a single transaction.

How to assign inscriptions to sats in the output?

Fifo order: Inscriptions are extracted in order from all inputs (just consecutive OP_FALSE OP_IF … OP_ENDIF). Inscriptions are assigned to the first sat of each output in FIFO order, wrapping back to the first output if there are more inscriptions than outputs.

Explicit offset: Inscriptions can have a "padding" field, which is a positive integer. When processing multiple inscriptions, an index is maintained that starts at 0, when a padding field is encountered, it is added to the index. Inscriptions are assigned to the padding % output_valueth sat in the output. This allows for maximum flexibility, at the cost of an additional few bytes per inscription.

Uses:

  • Lower cost to issue multiple inscriptions
  • Can create multiple identical inscriptions using multiple outputs
  • HTML inscriptions can publish multiple resources in a single transaction and refer to them in the HTML
@casey casey added this to the Production Inscriptions milestone Dec 1, 2022
@casey casey changed the title Need for more than one inscription per transaction? Allow more than one inscription per transaction Dec 13, 2022
@casey casey modified the milestones: Mainnet Inscriptions, Later Dec 14, 2022
@casey casey modified the milestones: Later, Mainnet Dec 23, 2022
@casey
Copy link
Collaborator Author

casey commented Jan 13, 2023

@haribosan The main issue with multiple inscriptions in a single UTXO is that the wallet can only currently deal with one inscription per UTXO. It's a simplifying assumption that makes the code much simpler. The wallet won't lose inscriptions if there's more than one per UTXO, but it doesn't have functionality for splitting UTXOs automatically to send particular inscriptions. In general, this can require multiple transactions in order to avoid creating dust outputs. We may want to revisit that assumption later on, but only if we absolutely have to.

So I think that the wallet making one inscription per UTXO is the way to go. However, we might want the protocol to be more flexible. See my comment above, but I'm deciding between automatically hopping to the next UTXO, or having an optional padding field in each inscription, which gives a number of sats to skip before assigning an inscription.

@casey casey mentioned this issue Jan 16, 2023
@casey casey changed the title Allow more than one inscription per transaction Multiple inscriptions per transaction Jan 16, 2023
@casey casey changed the title Multiple inscriptions per transaction Bundles Jan 16, 2023
@casey casey modified the milestone: Beta Jan 19, 2023
@Aervue
Copy link

Aervue commented Mar 28, 2023

Can't we just use multiple inputs and and treat each vout separately?

This is an example tx: https://mempool.space/tx/84c5ab8d08c769274213cb7554454a30a9d5c4a77ffee7fffdc8e11d6292568c

@casey
Copy link
Collaborator Author

casey commented Oct 24, 2023

IT IS DONE #2504.

@casey casey closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants