On Fri, Sep 20, 2019 at 04:54:34AM +1000, Lloyd Fournier via bitcoin-dev wrote: > Hi ZmnSCPxj, > > I can give some context on the exchange during the talk. I was the "Q" and > Andrew Polestra was the "A". > > I followed up with Andrew after and he indeed knew about the pre-signed > nlocktime transaction double spend technique (actually, I thought he was > the one who originally came up with that idea for scriptless atomic swaps). > He clarified saying that you can do that with locktime (absolute time > locks) but not with sequence numbers (relative time locks). i.e. to enforce > sequence numbers you need to use OP_CHECKSEQUENCEVERIFY. He said that it > would make sense to change that so it's enforced regardless of script. > > However, I talked to Antoine Riard later who was adamant that sequence > numbers already worked as expected. He pointed to the fact that BIP68 > already describes it as an independent constraint [1] > > So if things do work as described in BIP68 then we should be able to do > lightning on Bitcoin without any script once we have Schnorr. I'm keen to > actually figure out all the details of how to do this. It works in my head > but I think I should write it down somewhere to make sure it works. > > [1] https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki > > LL > Yep, during the recorded exchange I was confused about the content of the BIP. Later I described the exchange to Dan Robinson, who showed me the actual text :). Sorry for the confusion - Lloyd was totally right and you can do relative locktimes this way in Taproot without needing to expose a script. Having said this, there is the important caveat that your "emergency backout" keys are online to produce a pre-signed transaction, and that a suitable destination is known beforehand. This makes sense for Lightning or most atomic swap protocols where the money simply returns to the original owner, but not e.g. for Liquid, where the emergency keys have never been brought online (and anyway the contents of any transaction they might sign depends on facts and circumstances that aren't known ahead of time). -- Andrew Poelstra Director of Research, Blockstream Email: apoelstra at wpsoftware.net Web: https://www.wpsoftware.net/andrew The sun is always shining in space -Justin Lewis-Webster