From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 90BE694B for ; Wed, 24 May 2017 10:05:40 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3B54F1FC for ; Wed, 24 May 2017 10:05:40 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id w10so235566492oif.0 for ; Wed, 24 May 2017 03:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=0xKNJFfDr6aqNvHIQGYUZxI4QK7vydAI/4wiyFI/oXY=; b=Y0H5BXO16kSHxzvMTMvPi9OCr326xFgXMrO8JYC16/rShu5S686X1xyR3tycHyZbXU MXsJGhIwu4eAqTjM9R8x8qZTQTzi0gIJK3Oc4rv48y0JPdl+oiSprtOshbrddBZJ9UDC 4/XJg7lqPcTST4pYIXkWyWKHAkqu/mpDTnWYpVloY0LF4cAzQkBmE9OkzLxEVjKeuxem qs8wUM2tCi6cACTYew0URKI4/NQ5YnbIBO3gWYP5eY8uABrh330KbcP4+ciM0FeX1rjF kOvZfJZqmNX6HOIiDE99wPN8JUUfJQbYIpepLtWJS4WBKFj/jfgjLFIYJncO7Oth1lo2 Dhnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=0xKNJFfDr6aqNvHIQGYUZxI4QK7vydAI/4wiyFI/oXY=; b=ZhfYgXvssBsIZGRZ6B1XLhPTdaBhtXJACOoEyMegdjvKUz+LfIpivxtfC06YX0U0Qj 1jHnn4z0c4owRnrH4f/q2A638Z0Pma23BHPeMtFrY1+q2SVbcA/XRFjVd73h4IY8+Abf Qs1p9EgXKPBDSC5f2XlwlHVkNkdZHJimSWS4qln8oIfgMpyRhOZjwEpqYmXI4Z7u0iii HRjzXLkgBSUF5/xcwpYOlyEPi7HzBLH2zpLt8GZXWU7UPQn31M33DeQEM7esahEgp13w NBV7YuHrljAg8KyJG+5e3M/tDgdv5pEcrrmLMpbmaiUbPif1AKDkmte4uwAie6QLcHUt supA== X-Gm-Message-State: AODbwcALLnnc68pkFAsdYHAV8jR8NzplU+Q57189xOm+5XbIcb+we99j 6V0YtkvjYvXh+QL6fIFhUmmmud8BmQRQ X-Received: by 10.202.214.133 with SMTP id n127mr17511096oig.205.1495620339406; Wed, 24 May 2017 03:05:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.100.89 with HTTP; Wed, 24 May 2017 03:05:38 -0700 (PDT) In-Reply-To: References: <24f2b447-a237-45eb-ef9f-1a62533fad5c@gmail.com> <141a0cd1-9d4f-c137-a349-17248f9cafd4@gmail.com> From: Tier Nolan Date: Wed, 24 May 2017 11:05:38 +0100 Message-ID: Cc: Bitcoin Dev Content-Type: multipart/alternative; boundary="001a113de2160c9de80550423f35" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM 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] Drivechain -- Request for Discussion X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 10:05:40 -0000 --001a113de2160c9de80550423f35 Content-Type: text/plain; charset="UTF-8" On Wed, May 24, 2017 at 9:50 AM, Tier Nolan wrote: > OP_BRIBE_VERIFY could then operate as follows > > OP_BRIBE_VERIFY > > This causes the script to fail if > does not match the block height, or > is not the hash for the sidechain with , or > there is no hash for that sidechain in the block's coinbase > > I was thinking more on the process for these transactions. I assume that the process is - sidechain miner broadcasts transaction with OP_BRIBE output - this transaction ends up in the memory pool of miners - Miners add the transaction to their next block - Miners add a transaction which spends the output to one of their own addresses I think you need an additional rule that OP_BRIBE checks fails unless the output is locked 100 or more blocks. The output script would end up something like IF OP_BRIBE_VERIFY ELSE OP_CHECKSIG ENDIF This output acts like "anyone can spend" for the one block height. Otherwise, only the sidechain miner can spend the output. This allows the sidechain miner to reclaim their coins if the transaction ends up in a different block. OP_BRIBE_VERIFY would have an additional rule The script to fails if one or more of the transaction outputs start with something other than the template does not match the block height, or is not the hash for the sidechain with , or there is no hash for that sidechain in the block's coinbase The template is <100> OP_CHECKSEQUENCE_VERIFY --001a113de2160c9de80550423f35 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On W= ed, May 24, 2017 at 9:50 AM, Tier Nolan <tier.nolan@gmail.com> wrote:
OP_BRIBE_VER= IFY could then operate as follows

&= lt;block height> <sidechain_id> <critical hash> OP_BRIBE_VER= IFY

This causes the script to fail = if
=C2=A0 <block height> does not= match the block height, or
=C2=A0 <= critical hash> is not the hash for the sidechain with <sidechain_id&g= t;, or
=C2=A0 there is no hash for that= sidechain in the block's coinbase


I was thinking more on the process for these transac= tions.

I assume that the process is=

- sidechain miner broadcasts trans= action with OP_BRIBE output
- this tran= saction ends up in the memory pool of miners
- Miners add the transaction to their next block
- Miners add a transaction which spends the output to one = of their own addresses

I think you = need an additional rule that OP_BRIBE checks fails unless the output is loc= ked 100 or more blocks.

The output = script would end up something like

= IF
=C2=A0=C2=A0 <block height> &l= t;chain_id> <critical hash> OP_BRIBE_VERIFY
ELSE
=C2=A0 <public ke= y> OP_CHECKSIG
ENDIF

This output acts like "anyone can spend"= for the one block height.=C2=A0 Otherwise, only the sidechain miner can sp= end the output.

This allows the sid= echain miner to reclaim their coins if the transaction ends up in a differe= nt block.

OP_BRIBE_VERIFY would hav= e an additional rule

The script to fails = if
=C2=A0 one or more of the transactio= n outputs start with something other than the template
=C2=A0 <block height> does not match the block heigh= t, or
=C2=A0 <critical hash> is n= ot the hash for the sidechain with <sidechain_id>, or
=C2=A0= there is no hash for that sidechain in the block's coinbase

The template is
=C2=A0 <100> OP_CHECKSEQUENCE_VERIFY
--001a113de2160c9de80550423f35--