Skip to content

Commit 72d8532

Browse files
nalanerphairGeorgeFlerovsky
authored
CIP-0086 | Remove metadata update transaction restrictions (#521)
* Removed CIP-86 metadata update transaction restrictions * Add reasoning for why the original transaction restrictions were removed * clarify regex metadata update transaction Co-authored-by: George Flerovsky <[email protected]> * clarify tabular metadata update transaction Co-authored-by: George Flerovsky <[email protected]> * clarify simple metadata update transaction Co-authored-by: George Flerovsky <[email protected]> * clarify CIP-25 update transaction Co-authored-by: George Flerovsky <[email protected]> * clarify signing by indexer Co-authored-by: George Flerovsky <[email protected]> * clarify signing by indexer (2nd instance) Co-authored-by: George Flerovsky <[email protected]> * typo fix Co-authored-by: George Flerovsky <[email protected]> * clarify oracle assignment transaction Co-authored-by: George Flerovsky <[email protected]> --------- Co-authored-by: Robert Phair <[email protected]> Co-authored-by: George Flerovsky <[email protected]>
1 parent f59854d commit 72d8532

File tree

1 file changed

+46
-44
lines changed

1 file changed

+46
-44
lines changed

CIP-0086/README.md

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Authors:
77
- Nicolas Ayotte <[email protected]>
88
- George Flerovsky <[email protected]>
99
- Samuel Williams <[email protected]>
10+
- Nathaniel Lane <[email protected]>
1011
Implementors:
1112
- Equine <https://www.equine.gg/>
1213
- MLabs <https://mlabs.city/>
@@ -184,11 +185,10 @@ and keeping the staking key empty.
184185

185186
The metadata oracle assignment for a policy ID can be updated
186187
via a transaction signed by the oracle main address key.
187-
The transaction must only send ADA from the oracle main address to itself
188-
and must not mint any tokens,
189-
but it may contain any number of inputs and outputs.
190-
Otherwise, the transaction is ignored
191-
for the purposes of metadata oracle assignment.
188+
The oracle assignment transaction must be signed
189+
by the signing key of the main oracle address,
190+
but it may contain any inputs and outputs,
191+
as these are ignored for the purposes of metadata oracle assignment.
192192

193193
The schema for updating an oracle assignment is the same as
194194
for the initial assignment in the minting transaction:
@@ -217,11 +217,10 @@ by the new explicit assignment.
217217

218218
### Simple metadata updates
219219

220-
A simple metadata update transaction must only send ADA
221-
from the oracle update address to itself
222-
and must not mint any tokens,
223-
but it may contain any number of inputs and outputs.
224-
Otherwise, the transaction is ignored for the purposes of token metadata.
220+
A simple metadata update transaction must be signed
221+
by the signing key of the oracle update address,
222+
but it may contain any inputs and outputs,
223+
as these are ignored for the purposes of updating token metadata.
225224

226225
The schema for simple metadata updates in CIP-86
227226
is similar to the CIP-25 schema,
@@ -263,10 +262,10 @@ The schema for regex metadata updates is as follows:
263262
}
264263
```
265264

266-
A regex metadata update transaction must only send ADA
267-
from the oracle update address to itself and must not mint any tokens,
268-
but it may contain any number of inputs and outputs.
269-
Otherwise, it is ignored for the purposes of token metadata.
265+
A regex metadata update transaction must be signed
266+
by the signing key of the oracle update address,
267+
but it may contain any inputs and outputs,
268+
as these are ignored for the purposes of updating token metadata.
270269

271270
The only difference from the simple metadata update is that
272271
here the token names are defined in terms of PCRE regular expressions (regex).
@@ -342,11 +341,10 @@ and each inner array of `values` must be equal in length to `field_paths`.
342341
}
343342
```
344343

345-
A tabular metadata update transaction must
346-
only send ADA from the oracle update address to itself
347-
and must not mint any tokens,
348-
but it may contain any number of inputs and outputs.
349-
Otherwise, it is ignored for the purposes of token metadata.
344+
A tabular metadata update transaction must be signed
345+
by the signing key of the oracle update address,
346+
but it may contain any inputs and outputs,
347+
as these are ignored for the purposes of updating token metadata.
350348

351349
For example, the following update would apply updates to six metadata fields
352350
of five Equine horse NFTs:
@@ -500,6 +498,14 @@ To reconstruct the metadata state for a given asset class,
500498
scan through the sequence of transactions in a Cardano node’s blockchain,
501499
applying the CIP-25 and CIP-86 updates
502500
in the order that they are encountered in this sequence.
501+
Should a transaction contain both CIP-25 and CIP-86 updates,
502+
then the CIP-25 updates should be applied first,
503+
followed by the CIP-86 updates.
504+
If a transaction contains both a CIP-25 update
505+
and a CIP-86 explicit oracle assignment,
506+
then the CIP-25 update will be applied as usual
507+
and the oracle addresses (main and/or update) will be set to
508+
those of the explicit CIP-86 oracle assignment.
503509
If the Cardano node rolls back some blocks from the chain tip,
504510
then roll back the updates from those blocks as well.
505511

@@ -510,15 +516,6 @@ Doing so should minimize any confusion about
510516
the order of simultaneous pending metadata updates
511517
while the Cardano network settles toward consensus.
512518

513-
A transaction that contains a CIP-25 update may also
514-
contain an explicit oracle assignment,
515-
but these can be applied in parallel because they do not clash with each other.
516-
On the other hand, a CIP-25 update transaction
517-
cannot contain CIP-86 token metadata updates,
518-
because CIP-25 updates can only occur in minting transactions
519-
while CIP-86 token metadata transactions can
520-
only occur in non-minting transactions.
521-
522519
A transaction can contain CIP-86 token metadata updates of different types,
523520
plus oracle assignment updates.
524521
In this case, apply the updates in the following sequence:
@@ -555,16 +552,16 @@ A CIP-25 metadata update is applied as a wholesale replacement of the metadata
555552
cached in the indexer database for the respective asset classes.
556553

557554
For each oracle main address currently assigned to a policy ID,
558-
the indexer monitors the blockchain for non-minting transactions
559-
that only send ADA from the oracle main address to itself
560-
and contain oracle assignment updates in their metadata.
555+
the indexer monitors the blockchain for transactions
556+
that contain oracle assignment updates in their metadata
557+
and are signed by the signing key of the main address.
561558
The indexer updates its database to reflect these explicit oracle assignments
562559
and removes any implicit assignments that were replaced by explicit assignments.
563560

564561
For each oracle update address currently assigned to a policy ID,
565-
the indexer monitors the blockchain for non-minting transactions
566-
that only send ADA from the oracle update address to itself
567-
and contain CIP-86 token metadata updates.
562+
the indexer monitors the blockchain for transactions
563+
that contain CIP-86 token metadata updates
564+
and are signed by the signing key of the update address.
568565
The indexer applies these metadata updates in the order defined in
569566
[Order of application for updates](#order-of-application-for-updates).
570567
CIP-86 metadata updates are applied to the asset classes and metadata fields
@@ -686,23 +683,28 @@ from a given address in an indexer
686683
than to keep track of all the people who control various authorization tokens,
687684
at a given time.
688685

689-
### Restricting CIP-86 update transactions
686+
### Removing the original CIP-86 update transaction restriction
690687

691-
We prohibit CIP-86 oracle assignment updates and metadata updates
688+
In the first draft of this proposal,
689+
we prohibited CIP-86 oracle assignment updates and metadata updates
692690
from occurring in transactions that mint tokens,
693691
in order to avoid awkward clashes with CIP-25 metadata transactions.
694-
Also, it does not make sense conceptually
695-
for CIP-25 metadata transactions to coincide with CIP-86 updates.
696-
CIP-25 should be used to define the initial metadata for an asset class,
697-
and then CIP-86 updates should be used
698-
for any subsequent changes to that metadata.
692+
This was removed because, while it likely does not make sense
693+
to create CIP-25 and CIP-86 metadata for the same token in one transaction,
694+
it could feasibly make sense to want to update the metadata
695+
for other tokens while minting another one.
699696

700-
We require CIP-86 updates to occur in transactions
697+
We also originally required CIP-86 updates to occur in transactions
701698
that only send ADA from an oracle address (main or update, as appropriate),
702699
to prevent unforeseen interactions with other mechanisms
703700
that may have negative consequences.
704-
CIP-86 update transactions should have the singular purpose of
705-
interacting with the CIP-86 update mechanism.
701+
This requirement was removed for two reasons.
702+
First, the reasoning above does not establish any specific issues
703+
with other transaction types. Second, it is too restrictive
704+
and creates unnecessary additional transactions for long sequences of updates,
705+
causing the update issuer to spend unnecessary transaction fees.
706+
Therefore, we decided to remove these unnecessary restrictions
707+
on CIP-86 update transactions.
706708

707709
### Implicit oracle assignment
708710

0 commit comments

Comments
 (0)