public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp•com.au>
To: Luke Dashjr <luke@dashjr•org>, bitcoin-dev@lists•linuxfoundation.org
Subject: Re: [bitcoin-dev] Making OP_TRUE standard?
Date: Thu, 17 May 2018 12:14:53 +0930	[thread overview]
Message-ID: <87vabnq9ui.fsf@rustcorp.com.au> (raw)
In-Reply-To: <201805100227.42217.luke@dashjr.org>

Luke Dashjr <luke@dashjr•org> writes:
> An OP_TRUE-only script with a low value seems like a good example of where the 
> weight doesn't reflect the true cost: it uses a UTXO forever, while only 
> costing a weight of 4.
>
> I like Johnson's idea to have some template (perhaps OP_2-only, to preserve 
> expected behaviour of OP_TRUE-only) that when combined with a 0-value is 
> always valid only if spent in the same block.
>
> I wonder if it would make sense to actually tie it to a transaction version 
> bit, such that when the bit is set, the transaction is serialised with +1 on 
> the output count and 00000000000000000181 is simply injected into the 
> transaction hashing... But for now, simply having a consensus rule that a bit 
> MUST be set for the expected behaviour, and the bit may ONLY be set when the 
> last output is exactly 00000000000000000181, would allow us to code the 
> transaction serialisation up later. (Maybe it should be the first output 
> instead of the last... Is there any legitimate reason one would have multiple 
> such dummy outputs?)

Your zero-val-OP_TRUE-can't-be-spent-after-same-block SF is interesting,
but if we want a SF just give us SIGHASH_NOINPUT and we'll not need this
at all (though others still might).  It's nicer than the previous
discussions on after-the-fact feebumping[1] though.

Meanwhile, our best mitigation against UTXO bloat is:
1. Make the fees as low as possible[2]
2. Put a CSV delay on the to-remote output (currently there's asymmetry)
3. Attach more value to the OP_TRUE output, say 1000 satoshi.

But turns out we probably don't want an OP_TRUE output nor P2SH, because
then the spending tx would be malleable.  So P2WSH is is.

This brings us another theoretical problem: someone could spend our
OP_TRUE with a low-fee non-RBF tx, and we'd not be able to use it to
CPFP the tx.  It'd be hard to do, but possible.  I think the network
benefits from using OP_TRUE (anyone can clean, and size, vs some
only-known-to-me pubkey) outweighs the risk, but it'd be nice if OP_TRUE
P2WSH spends were always considered RBF.

Thanks,
Rusty.
[1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-April/015864.html
[2] Because bitcoin core use legacy measurements, this is actually 253
satoshi per kilosipa for us, see https://github.com/ElementsProject/lightning/commit/2e687b9b352c9092b5e8bd4a688916ac50b44af0


  parent reply	other threads:[~2018-05-17  2:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 23:57 Rusty Russell
2018-05-09  0:24 ` Olaoluwa Osuntokun
2018-05-09  3:02   ` ZmnSCPxj
2018-05-10  2:08   ` Rusty Russell
2018-05-09 17:56 ` Johnson Lau
2018-05-09 19:27   ` Peter Todd
2018-05-09 20:19     ` Johnson Lau
2018-05-09 20:59       ` Peter Todd
2018-05-09 22:06   ` Olaoluwa Osuntokun
2018-05-10  2:06   ` Rusty Russell
2018-05-10  2:27 ` Luke Dashjr
2018-05-10  3:07   ` ZmnSCPxj
2018-05-15  1:22   ` ZmnSCPxj
2018-05-17  2:44   ` Rusty Russell [this message]
2018-05-17 10:28     ` ZmnSCPxj
2018-05-17 17:35       ` Christian Decker
2018-05-17 20:06     ` Jim Posen
2018-05-21  3:44       ` Rusty Russell
2018-05-21  3:56         ` Peter Todd
2018-05-30  2:47           ` Rusty Russell
2018-05-31  2:47             ` Rusty Russell
2018-05-21 14:20         ` Russell O'Connor
2018-05-10  9:33 ` Jorge Timón
2018-05-10  9:33   ` Jorge Timón
2018-05-10  9:43   ` Luke Dashjr
2018-05-11  2:44     ` ZmnSCPxj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vabnq9ui.fsf@rustcorp.com.au \
    --to=rusty@rustcorp$(echo .)com.au \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=luke@dashjr$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox