[Lightning-dev] [PATCH] First draft of option_simplfied_commitment
Rusty Russell
rusty at rustcorp.com.au
Thu Oct 31 00:17:56 UTC 2019
Matt Corallo <lf-lists at mattcorallo.com> writes:
> Why not stick with the original design from Adelaide with a spending path with a 1CSV that is anyone can spend (or that is revealed by spending another output).
The original design IIRC was a single anyone-can-spend anchor output.
If we need two anchor outputs, and want the other to turn into an
anyone-can-spend after it's mined, it's possible by gratuitously
mentioning the other key in the script, I think:
# If they provide a signature, they can push this:
OP_DEPTH OP_IF
<key1> OP_CHECKSIG
OP_ELSE
# Reveal the other key so you can spend the other anchor, too.
<key2> OP_DROP
# Now, anyone can spend after 1 block.
1 OP_CHECKSEQUENCEVERIFY
OP_TRUE
OP_ENDIF
The other anchor output reverses <key1> and <key2>.
Cheers,
Rusty.
More information about the Lightning-dev
mailing list