Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E368FC88 for ; Sun, 20 Dec 2015 12:42:13 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0C2C0EC for ; Sun, 20 Dec 2015 12:42:12 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id l126so38158756wml.1 for ; Sun, 20 Dec 2015 04:42:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cdprR2RAN0U0H8p0sqy42TpO1GrJwAAWY110Jdn/5jo=; b=Q0M3T1AJZ90uaWqLLzsfpeF5znS8yZ7qpK5XBTKa/R5aUauM7sjP/ghIbTBxCY43EF Wu7CjERXD4EYEv5J7yb7bHrtGzHp/PIk7UdXI4LapEw2134CKD84X3G4g4UqIOw3//pV /euwNJylOL4ZaunS4KGyaavdssDH8rdJe04B/lqbFKmH/I8e2tZPkN5a2zdi6OJ1Z+Et c+ZMNXawfKCbJLzgkftJHqPoXxEukfV+Un9PAJ++09CH1rRD4GBncwTWX+AE8xyrqzFK EeEGJsLTGfrEk3Kxxu0RnJAY5Yvq8OlD4HCCx/mIH/wxNvyGeBHyAtHBW2ZtD2yhvHoE +oTw== MIME-Version: 1.0 X-Received: by 10.194.76.65 with SMTP id i1mr13945808wjw.99.1450615331443; Sun, 20 Dec 2015 04:42:11 -0800 (PST) Received: by 10.194.23.195 with HTTP; Sun, 20 Dec 2015 04:42:10 -0800 (PST) Received: by 10.194.23.195 with HTTP; Sun, 20 Dec 2015 04:42:10 -0800 (PST) In-Reply-To: References: <20151219184240.GB12893@muck> <219f125cee6ca68fd27016642e38fdf1@xbt.hk> Date: Sun, 20 Dec 2015 13:42:10 +0100 Message-ID: From: Natanael To: Tier Nolan Content-Type: multipart/alternative; boundary=047d7bb03ece895e39052753b325 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Sun, 20 Dec 2015 15:13:24 +0000 Cc: Bitcoin Dev Subject: Re: [bitcoin-dev] We need to fix the block withholding attack X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Development Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Dec 2015 12:42:14 -0000 --047d7bb03ece895e39052753b325 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Den 20 dec 2015 12:38 skrev "Tier Nolan via bitcoin-dev" < bitcoin-dev@lists.linuxfoundation.org>: > > On Sun, Dec 20, 2015 at 5:12 AM, Emin G=C3=BCn Sirer < bitcoin-dev@lists.linuxfoundation.org> wrote: >> >> An attacker pool (A) can take a certain portion of its hashpower, >> use it to mine on behalf of victim pool (B), furnish partial proofs of work >> to B, but discard any full blocks it discovers. > > I wonder if part of the problem here is that there is no pool identity linked to mining pools. > > If the mining protocols were altered so that miners had to indicate their identity, then a pool couldn't forward hashing power to their victim. Our approaches can be combined. Each pool (or solo miner) has a public key included in their blocks that identifies them to their miners (solo miners can use their own unique random keys every time). This public key may be registered with DNSSEC+DANE and the pool could point to their domain in the block template as an identifier. For each block the pool generates a nonce, and for each of every miner's workers it double-hashes that nonce with their own public key and that miner's worker ID and the previous block hash (to ensure no accidental overlapping work is done). The double-hash is a commitment hash, the first hash is the committed value to be used by the pool as described below. Publishing the nonce reveals how the hashes were derived to their miners. Each miner puts this commitment hash in their blocks, and also the public key of the pool separately as mentioned above. Here's where it differs from standard mining: both the candidate block PoW hash and the pool's commitment value above determines block validity together. If total difficulty is X and the ratio for full blocks to candidate blocks shared with the pool is Y, then the candidate block PoW now has to meet X/Y while hashing the candidate block PoW + the pool's commitment hash must meet Y, which together makes for X/Y*Y and thus the same total difficulty. So now miners don't know if their blocks are valid before the pool does, so withholding isn't effective, and the public key identifiers simultaneously stops a pool from telling honest but naive miners to attack other pools using whatever other schemes one might come up with. The main differences are that there's a public key identifier the miners are told about in advance and expect to see in block templates, and that that now the pool has to publish this commitment value together with the block that also contains the commitment hash, and that this is verified together with the PoW. --047d7bb03ece895e39052753b325 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Den 20 dec 2015 12:38 skrev "Tier Nolan via bitcoin-dev" <bitcoin-dev@lists.linu= xfoundation.org>:
>
> On Sun, Dec 20, 2015 at 5:12 AM, Emin G=C3=BCn Sirer <bitcoin-dev@lists.linuxfoundati= on.org> wrote:
>>
>> =C2=A0An attacker pool (A) can take a certain portion of its hashp= ower,
>> use it to mine on behalf of victim pool (B), furnish partial proof= s of work
>> to B, but discard any full blocks it discovers.
>
> I wonder if part of the problem here is that there is no pool identity= linked to mining pools.
>
> If the mining protocols were altered so that miners had to indicate th= eir identity, then a pool couldn't forward hashing power to their victi= m.=C2=A0

Our approaches can be combined.

Each pool (or solo miner) has a public key included in their= blocks that identifies them to their miners (solo miners can use their own= unique random keys every time). This public key may be registered with DNS= SEC+DANE and the pool could point to their domain in the block template as = an identifier.

For each block the pool generates a nonce, and for each of e= very miner's workers it double-hashes that nonce with their own public = key and that miner's worker ID and the previous block hash (to ensure n= o accidental overlapping work is done).

The double-hash is a commitment hash, the first hash is the = committed value to be used by the pool as described below. Publishing the n= once reveals how the hashes were derived to their miners.

Each miner puts this commitment hash in their blocks, and al= so the public key of the pool separately as mentioned above.

Here's where it differs from standard mining: both the c= andidate block PoW hash and the pool's commitment value above determine= s block validity together.

If total difficulty is X and the ratio for full blocks to ca= ndidate blocks shared with the pool is Y, then the candidate block PoW now = has to meet X/Y while hashing the candidate block PoW + the pool's comm= itment hash must meet Y, which together makes for X/Y*Y and thus the same t= otal difficulty.

So now miners don't know if their blocks are valid befor= e the pool does, so withholding isn't effective, and the public key ide= ntifiers simultaneously stops a pool from telling honest but naive miners t= o attack other pools using whatever other schemes one might come up with. <= /p>

The main differences are that there's a public key ident= ifier the miners are told about in advance and expect to see in block templ= ates, and that that now the pool has to publish this commitment value toget= her with the block that also contains the commitment hash, and that this is= verified together with the PoW.

--047d7bb03ece895e39052753b325--