Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 5A063C19 for ; Tue, 12 Dec 2017 22:29:43 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qt0-f169.google.com (mail-qt0-f169.google.com [209.85.216.169]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 891E0411 for ; Tue, 12 Dec 2017 22:29:42 +0000 (UTC) Received: by mail-qt0-f169.google.com with SMTP id r39so1117487qtr.13 for ; Tue, 12 Dec 2017 14:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=urV9PzkCEbOO4ZPFnuGuKmTSUQnt4Lmggsomg/L1yYo=; b=Nh6ke0rhgWq171IfxCZE1OqOWfeYoBijXHIwNk1ZWLCkbMVRzdizoPAb3qtJn4i1pQ tCxPelFEer7psGgrKS1+syRV6VXyV3ixaWK83DMnctxCRMRYSH/O2tNuvdcbbLsmacSy FP9cZuVYgVYBvkQItlv5j3m7QegBv/+QyhFrmYxabsO02sWQSl/q8doo9OOj9F2xjJFg eKCQuFL/BfAg8wos4c7TMBBepJ+YiG54kleLkt0Zp+z5kS/FIn2e8rzs6vPJZmDrniYt GTjgSAaZYXnVyY6aAC0UMDZHTq/IA5yXA7Soh9vwS3tPMrtwcO4zvjxxPYoSdvvzOtxN NUbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=urV9PzkCEbOO4ZPFnuGuKmTSUQnt4Lmggsomg/L1yYo=; b=ElNrECWY26ORcqbO9HDAoGGU2UAyLgjX1MgzSepr38xE8amSSPDRXthBurxzywI9b0 O63hVtRvQtto25PcNN8nsId/+JP3EaLXeSusl1mNwlFsSH614cl8C8g8Sz30TR7HJb+P /qccZWacJBrFCLrqDEVRgGgw8aj83jIMD5oGr1OCrA9pHRIvQr9xXUcvOgTVKEhDb+zY XpeIbn0lwiQTSYwEmiR8rGdCkQuaBvJs4d9SNz7DCQ8UwvXk3ha21IVY7LuEwmpOAVrT CSP1uq6mngEVa0+qqG8zNlVGx147u+dtIu+okvtfPi5u2M33BngSlcUQid13rrtBNhba ogNg== X-Gm-Message-State: AKGB3mIFQj3n2DBgusfs3K5AKMH2vB90dztbPCBLPchmu7TJziLq4/sl vTXYHcRNCKx61nujbJnAdhNVdA== X-Google-Smtp-Source: ACJfBovkKtAA95s/wjt1gUJgQOHSc06UU/TYmne8Ejy1nIgF36gI8LY1/+fOFZeNpqjXpvxyQukBOw== X-Received: by 10.200.57.80 with SMTP id t16mr7857924qtb.98.1513117781076; Tue, 12 Dec 2017 14:29:41 -0800 (PST) Received: from [192.168.1.104] (ool-45726efb.dyn.optonline.net. [69.114.110.251]) by smtp.googlemail.com with ESMTPSA id c16sm122335qtd.80.2017.12.12.14.29.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 14:29:40 -0800 (PST) To: ZmnSCPxj , Chris Stewart References: <1bb6cccd-3f6d-d62a-2825-4e6f46a4b525@mattcorallo.com> From: Paul Sztorc Message-ID: Date: Tue, 12 Dec 2017 17:29:39 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Two Drivechain BIPs 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: Tue, 12 Dec 2017 22:29:43 -0000 Hi Zmn, I'm actually not sure that the existence of these tools makes the attacker's collective action problem that much easier to solve. As I said: "...even the most straightforward attack (of "a 51% hashrate group attacks a sidechain and distributes the proceeds to the group proportional to hashpower") is actually one that contains a difficult (and potentially interminable) negotiation." But even under your scheme, there is someone who has to seek out the Accomplices, and has to try to figure out what is acceptable to pay them. This sparks a tiresome negotiation that drains both parties of time and effort and might potentially last forever. Problematically, there is a Market for Lemons problem with respect to how many blocks an Accomplice "will" mine. If many people try to be Thieves at once, then each individual Thief has less of an incentive to bother trying to steal in the first place. And so, even if your scheme does work, the improvement seems small. And even if the improvement is very great, the remaining collective action problem is still more difficult than the one in the comparative "reorg case" (in which the problem is just to "pick the block number from which to start the reorg"). Paul On 12/5/2017 11:49 PM, ZmnSCPxj wrote: > Good morning Paul and Chris, > > >3. Collective Action Problem > > > >There actually is a collective action problem inherent to fraudulent > withdrawals. > > > >If miners wish to fraudulently withdraw from the sidechain, they need > to choose the destination addresses (on mainchain Bitcoin Core) months > in advance. Then they need to upvote/downvote this > >destination, despite that fact that --during this time-- new > hashpower might be coming online/offline, and/or hashers might be > joining/leaving specific pools. I bring this up to demonstrate that > even the most > >straightforward attack (of "a 51% hashrate group attacks a sidechain > and distributes the proceeds to the group proportional to hashpower") > is actually one that contains a difficult (and potentially > >interminable) negotiation. The effort required to initiate the > negotiation is the source of the collective action problem here. > > > >I think that this collective action problem is actually more > burdensome than Bitcoin's -- for mainchain Bitcoin miners merely need > to decide which block height they intend to reorganize from. > > I actually devised a way to work around this collective action > problem, and discussed it obliquely in a private e-mail with Chris, > while I was preparing my article on sidechain weaknesses.=C2=A0 I remov= ed > it before publication of the sidechain weaknesses article, but perhaps > I should not have. > > Collective action can be ensured by contract.=C2=A0 In a world where so= me > system can enforce certain actions programmatically, it is possible to > ensure collective action via a program, i.e. a "smart contract". > > The thief pays out to the destination address that is a P2SH of the > below script: > > OP_IF > =C2=A0 OP_HASH160 OP_EQUALVERIFY > =C2=A0 OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG > OP_ELSE > =C2=A0 OP_CHECKLOCKTIMEVERIFY OP_DROP > =C2=A0 OP_TRUE > OP_ENDIF > > If the thief does not publish the preimage of the hash within 1 week > of the withdrawal time, then it becomes possible for anyone to spend > the above script; basically, some lucky miner who wins the first block > past the specified time will get the entire winnings.=C2=A0 Let us call= the > above script, the Theft Contract. > > The thief then recruits accomplices to the theft.=C2=A0 Note that the > attack can be prepared and initiated before the accomplices are even > recruited. > > The thief locks some coins (the "cut" the accomplice gets), to the > below script, for each accomplice it tries to entice: > > OP_IF > =C2=A0 OP_HASH160 OP_EQUALVERIFY > =C2=A0 OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECK= SIG > OP_ELSE > =C2=A0 OP_CHECKLOCKTIMEVERIFY OP_DROP > =C2=A0 OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG > OP_ENDIF > > Let us call the above script, the Accomplice Contract.=C2=A0 If the > accomplice accepts, he or she then starts to vote for the invalid > withdrawal. > > If the invalid withdrawal succeeds, the thief acquires the entire > theft price from the Theft Contract by publishing the preimage to the > .=C2=A0 (If he or she does not, then, some randomly-selected mine= r > will acquire the money after the timeout, so the thief needs to > publish the hash, before the timeout in the Theft Contract). > > This publishes the preimage on the blockchain.=C2=A0 Each accomplice ca= n > then acquire their "cut" of the theft by copying the preimage and > claiming from the Accomplice Contract. > > If the theft never succeeds, then there is no reason for the thief to > ever publish the preimage, and after the timeout on the Accomplice > Contract, the thief can recover his or her offered funds at no loss > (minus transaction fees),=C2=A0 This incentivizes accomplices to actual= ly > cooperate with the thief, as they will not get paid if the theft does > not push through. > > All that is necessary is for a single "mastermind" thief to begin this > process.=C2=A0 Accomplices can be recruited later, with the "cut" they = get > negotiated according to how much hashpower they can bring to bear on > theft. > > Newly-created miners and mining pools can be enticed at the time they > arise by offering an Accomplice Contract to them.=C2=A0 Thus, newly-cre= ated > miners and mining pools can be brought into cooperation with the thief > as soon as they make a presence on the blockchain. > > Even if some mining pool makes a public statement that they will not > assist in the theft, the thief may still commit an Accomplice Contract > for them on-chain anyway, and publicize it, in order to put the > integrity of that mining pool in question and drive out support from > that mining pool.=C2=A0 True accomplices may pretend to initially be ho= nest > and then signal dishonestly later, in order to make it more plausible > that a pool that "committed" to not support the theft is not trustable > since they have an Accomplice Contract that will compensate them if > they support the theft, creating further confusion and discord among > honest miners.=C2=A0 The thief may also use the existence of such an > Accomplice Contract while negotiating with more minor miners and > mining pools, in order to entice those also to join, and thus gain > additional buffer against the stochastic process of miner voting. > > With the Theft Contract and the Accomplice Contract, negotiation can > be done in parallel with the theft attempt, reducing the cost of > organizing collective action, as we have all hoped "smart contracts" > would do. > > ---- > > While it is true, that this requires that the thief have significant > funds in reserve prior to theft (in order to fund the Accomplice > Contracts he or she will have to offer to potential accomplices), we > have always been assured that theft can be initiated by miners only, > and that miners already have a significant amount of money they > control.=C2=A0 So it will be no problem for a potential thief to reserv= e > some funds for paying to Accomplice Contracts. > > This vulnerability can be fixed if withdrawals are restricted to > simple P2PKH or P2WPKH only, but in the presence of Scriptless Script > and Bellare-Neven signatures, that may be sufficient to create the > Theft Contract and the Accomplice Contract (but I know too little of > Scriptless Script to be sure). > > Regards, > ZmnSCPxj