stevenroose / covenants.info

Creative Commons Zero v1.0 Universal
18 stars 15 forks source link

improve apo page #11

Closed fiatjaf closed 8 months ago

stevenroose commented 8 months ago

Let me take this and rephrase a bit and merge.

stevenroose commented 8 months ago

Does this make sense to you? a4ad57aec324ec2c2ef6975cee14d512d3e4dc83

stevenroose commented 8 months ago

Please close this MR by way of ack, or make comments and I'll try to address.

fiatjaf commented 8 months ago

I like my version more than your changes. What are "real covenants"? Why did you remove the mentions to Statechains and Spacechains?, these are use cases that are better served by APO than by CTV, that's why I included them.

Of course TXHASH also works to implement them and is probably even better than APO, but it wouldn't hurt to leave these two things mentioned here as a tribute to the fact that they were originally proposed with APO in mind.

Anyway, I'm fine with the way you wrote it.

stevenroose commented 8 months ago

But APO can be used to do anything that CTV can do "in some way", so I didn't understand why mention statechains and spacechains specifically. The way you'd use APO for spacechains seems pretty hackish to me if I understand what you mean. For statechains maybe it makes more sense than templating opcodes.

stevenroose commented 8 months ago

What I mean with real covenants is an explicit restriction on the spending transaction of an output. APO doesn't really do that explicitly, but you can do CTV by doing the APO sigcheck in the spendscript which is kinda roundabout. Maybe the distinction is quite arbitrary :sweat_smile:

stevenroose commented 8 months ago

Reworded again, leaning more on your phrasing :)

fiatjaf commented 8 months ago

Thank you, I like it more now.

Weirdly, CTV is bad for Spacechains. It delivers a thing that can work but is fragile and may cause transaction fees to be wasted and hurt the incentives of BMM. APO is better because it allows including outputs after the fact in the presigned transactions (APO+SINGLE+ANYONECANPAY). I think TXHASH and others should be good for Spacechains too, but I didn't look very closely.

For Statechains, the mechanism is the same of Eltoo/LN Simmetry, so as far as I understand it requires APO or CSFS? Or can we do that with TXHASH?