diff options
author | Luke Dashjr <luke@dashjr.org> | 2016-07-20 06:17:39 +0000 |
---|---|---|
committer | bitcoindev <bitcoindev@gnusha.org> | 2016-07-20 06:17:56 +0000 |
commit | 6eecc3e83dbbddc11fb45877cdd3791a2cc3b7ae (patch) | |
tree | c03274cdc5d14170384f7861bdc9b80a80a58f65 | |
parent | e97981513a21cafd0dbefc7cfc5b6a1abdf9bb39 (diff) | |
download | pi-bitcoindev-6eecc3e83dbbddc11fb45877cdd3791a2cc3b7ae.tar.gz pi-bitcoindev-6eecc3e83dbbddc11fb45877cdd3791a2cc3b7ae.zip |
Re: [bitcoin-dev] BIP draft: HTLC transactions
-rw-r--r-- | bf/bdf40d1b54b1859f675df7dd0e06566aba4fc2 | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/bf/bdf40d1b54b1859f675df7dd0e06566aba4fc2 b/bf/bdf40d1b54b1859f675df7dd0e06566aba4fc2 new file mode 100644 index 000000000..b54acdb26 --- /dev/null +++ b/bf/bdf40d1b54b1859f675df7dd0e06566aba4fc2 @@ -0,0 +1,91 @@ +Return-Path: <luke@dashjr.org> +Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org + [172.17.192.35]) + by mail.linuxfoundation.org (Postfix) with ESMTPS id 9A8F598F + for <bitcoin-dev@lists.linuxfoundation.org>; + Wed, 20 Jul 2016 06:17:56 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 +Received: from zinan.dashjr.org (unknown [192.3.11.21]) + by smtp1.linuxfoundation.org (Postfix) with ESMTP id 49D0E7D + for <bitcoin-dev@lists.linuxfoundation.org>; + Wed, 20 Jul 2016 06:17:56 +0000 (UTC) +Received: from ishibashi.localnet (unknown + [IPv6:2001:470:5:265:61b6:56a6:b03d:28d6]) + (Authenticated sender: luke-jr) + by zinan.dashjr.org (Postfix) with ESMTPSA id C8D4738A17CC; + Wed, 20 Jul 2016 06:17:41 +0000 (UTC) +X-Hashcash: 1:25:160720:bitcoin-dev@lists.linuxfoundation.org::P7PT5665Be=tk0f/:Kt9V +X-Hashcash: 1:25:160720:pete@petertodd.org::MxM72nS+KKvh9mzP:apYRW +X-Hashcash: 1:25:160720:sean@z.cash::Zd8/fZU83odZV7bU:ogHB +From: Luke Dashjr <luke@dashjr.org> +To: bitcoin-dev@lists.linuxfoundation.org, + Peter Todd <pete@petertodd.org> +Date: Wed, 20 Jul 2016 06:17:39 +0000 +User-Agent: KMail/1.13.7 (Linux/4.1.18-gentoo; KDE/4.14.16; x86_64; ; ) +References: <CAKazn3mKUMMz0wyqTsgbkd4mBLgvG2PXziXhgRTi4hX_ApbPhg@mail.gmail.com> + <20160720054654.GA1420@fedora-21-dvm> +In-Reply-To: <20160720054654.GA1420@fedora-21-dvm> +X-PGP-Key-Fingerprint: E463 A93F 5F31 17EE DE6C 7316 BD02 9424 21F4 889F +X-PGP-Key-ID: BD02942421F4889F +X-PGP-Keyserver: hkp://pgp.mit.edu +MIME-Version: 1.0 +Content-Type: Text/Plain; + charset="iso-8859-15" +Content-Transfer-Encoding: 7bit +Message-Id: <201607200617.40917.luke@dashjr.org> +X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,RDNS_DYNAMIC + autolearn=no version=3.3.1 +X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on + smtp1.linux-foundation.org +Subject: Re: [bitcoin-dev] BIP draft: HTLC transactions +X-BeenThere: bitcoin-dev@lists.linuxfoundation.org +X-Mailman-Version: 2.1.12 +Precedence: list +List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org> +List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, + <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe> +List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/> +List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org> +List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help> +List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, + <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe> +X-List-Received-Date: Wed, 20 Jul 2016 06:17:56 -0000 + +On Wednesday, July 20, 2016 5:46:54 AM Peter Todd via bitcoin-dev wrote: +> On Tue, Jul 19, 2016 at 10:35:39PM -0600, Sean Bowe via bitcoin-dev wrote: +> > I'm requesting feedback for Hash Time-Locked Contract (HTLC) transactions +> > in Bitcoin. +> > +> > HTLC transactions allow you to pay for the preimage of a hash. CSV/CLTV +> > can be used to recover your funds if the other party is not cooperative. +> > These +> > +> > scripts take the following general form: +> > [HASHOP] <digest> OP_EQUAL +> > OP_IF +> > +> > <seller pubkey> +> > +> > OP_ELSE +> > +> > <num> [TIMEOUTOP] OP_DROP <buyer pubkey> +> > +> > OP_ENDIF +> > OP_CHECKSIG +> +> Note that because you're hashing the top item on the stack regardless +> scriptSig's that satisfy HTLC's are malleable: that top stack item can be +> changed anything in the digest-not-provided case and the script still +> passes. + +OP_SIZE +OP_IF + [HASHOP] <digest> OP_EQUALVERIFY + <seller pubkey> +OP_ELSE + <num> [TIMEOUTOP] + <buyer pubkey> +OP_ENDIF +OP_CHECKSIG + + |