Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

24
Persistent Data Sticker Contract with Native Introspection Opcodes
Post Flair (click to view more posts with a particular flair)
Post Body

I think I have nailed down a contract primitive that could be used to construct a covenant with genesis provable by a fixed-size proof. I imagined it to work by entangling 2 contracts and requiring them to always be spent together. This is the 1st contract, still working on the other one. Edit: never mind, can't work even with entangled contract, they're both at one side of the barrier and have no access to grandparent. I was thinking some staggered arrangement, but there's no overlap between local TX scope windows

Looking for feedback from any Script wizard out there, does this achieve what I think it achieves?

Persistent Data Sticker Contract

Local transaction introspection will make it possible to design a contract owned by another contract. Here we present one such contract that:

  1. Hardcodes some data inside its redeem script.
  2. Requires no signature.
  3. Requires self-replication.
  4. Requires that another contract from the same parent TX is spent from.

With only 1., 2., and 3. the contract would be an anyone-can-spend persistent data entity. With 4., another contract becomes the owner by transitive relation.

Redeem script:
<sticker> OP_DROP // This is my data
<1> OP_OUTPUTBYTECODE <1> OP_UTXOBYTECODE OP_EQUAL // I couldn't have changed my data from when it was first set
<1> OP_INPUTINDEX OP_EQUAL
<1> OP_OUTPOINTINDEX <1> OP_EQUAL
<2> OP_OUTPOINTINDEX <2> OP_EQUAL
<1> OP_OUTPOINTTXHASH <2> OP_OUTPOINTTXHASH OP_EQUAL // My owner got spent, therefore I can be spent
OP_AND OP_AND OP_AND OP_AND

Signature script:
NULL

For the sticker to be spendable its owner must be spent in the same TX. The sticker will be replicated as the 1st output, and the 2nd output will become the new owner.

The sticker proves only that it couldn't have changed its data from when it was first set, but it can't prove when the data was set or which owner originally set it. It can't prove that it's not a new instance created in the parent TX. To prove genesis would require tracing the whole chain back to genesis.

License

CC0 1.0 Universal (CC0 1.0) Public Domain Dedication

Author
Account Strength
100%
Account Age
4 years
Verified Email
Yes
Verified Flair
No
Total Karma
10,768
Link Karma
3,555
Comment Karma
6,306
Profile updated: 2 days ago
Posts updated: 10 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago