Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 74EB24A5 for ; Fri, 6 Oct 2017 14:36:18 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6C7D03F9 for ; Fri, 6 Oct 2017 14:36:17 +0000 (UTC) Received: by mail-io0-f182.google.com with SMTP id 21so16294641iof.6 for ; Fri, 06 Oct 2017 07:36:17 -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:to :content-transfer-encoding; bh=UrzLzz82X0sPbMEewUP7jkfBbb9C5LA1UQAXHE10DOU=; b=l9BgaYM+0KXixnfkdGfD2jqbQcv8aLm2flHy1bDt74D7mAYgzasTS4ohGvXglMhHnb OBiAbtOnN3n9/yyj1MgiB5FLNHkjyi/G6JrKxU1lYXwo2YL5rcysK0FbThxGDonicENi lKs/rDGPrB4S67Z8xguC+f1tyKQE7q/TekWR2ViaXp0cfaNVE0Z9otbpCETgxDQKLHw7 WacC+6jaPxSiSgd0WNT6GeCQ0B4034ha35mcH10ZxRlY2joiT+QIhOEKWChH/NklPcsi hAL/DFW5Dv1ywFPQS4ITgVoVj/4kVYGa1McTtoS2cNpShOoiln4zs+g7AnwK4L6Wzu6h AfeQ== 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:to:content-transfer-encoding; bh=UrzLzz82X0sPbMEewUP7jkfBbb9C5LA1UQAXHE10DOU=; b=Mkj/dQjOIJc0MhDphh4URQjP2aCNuAouq2NSvPMuC/48z5+IpMiANNX8LYB3vH5Gmq zz1TyvETiZqhI6UG53KIANflrtijZLY6VFY7nmIxMiNZC4Q7VRMFGfEyc8U7tLpZSiMC rvRqDhLopaEk+d4YkHn+qrntUhVQojYNINdFxIg1IMK+dfizpaXxjC2IlqncFcYtSLjf l7/b0ipfZdqvW58RLLWhH2sKf4BqMWRlHfuEuoLLIRwc750sT1igcPZMTv8gvH1udVOp HXi8eEuu9BuNnOmDWu7zCHu23GLtS4bnh/icFlUNWr/icqTJh5SdoG2D2Hseu4dzWuEX UZFw== X-Gm-Message-State: AMCzsaVfWU1TtLSxE3Yu1jGLZrpHd4Xniqav9yPJOJfD74Zrpx2lbZ4w TzTf/Ag6EHonYkqx8WPjx2chu+5gqBy7OrDtXzY= X-Google-Smtp-Source: AOwi7QDJ345brxdUPPuN/hR+IrUGW0bDnWXjnybfmmfCtubCNzCXOJCyMEUHH7RfZfNPf8glpuQfsH/4twv/nawLQ5E= X-Received: by 10.107.202.2 with SMTP id a2mr2648067iog.140.1507300576369; Fri, 06 Oct 2017 07:36:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.88.3 with HTTP; Fri, 6 Oct 2017 07:36:15 -0700 (PDT) In-Reply-To: References: From: James Hilliard Date: Fri, 6 Oct 2017 08:36:15 -0600 Message-ID: To: =?UTF-8?B?5r2Y5b+X5b2q?= , Bitcoin Protocol Discussion Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: Re: [bitcoin-dev] A solution may solve Block Withholding Attack 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: Fri, 06 Oct 2017 14:36:18 -0000 There have been some other proposals to deal with this such as https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2012-June/001506.ht= ml that may be possible to implement in existing miners. On Tue, Oct 3, 2017 at 9:52 AM, =E6=BD=98=E5=BF=97=E5=BD=AA via bitcoin-dev wrote: > Here is a solution may solve Block Withholding Attack. The general idea i= s > came from Aviv Zohar(avivz@cs.huji.ac.il), I made it work for Bitcoin. > Anyway, thanks Aviv. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > DIFF_1 =3D 0x00000000FFFF000000000000000000000000000000000000000000000000= 0000; > > Diff =3D DIFF_1 / target > > this is equal to > > Diff =3D DIFF_1 / (target - 0) or Diff =3D DIFF_1 / abs(target - 0) > > now, we change diff algo to below: > > New_Diff =3D DIFF_1 / abs(target - offset) > > Offset is 32 bytes, like uint256 in Bitcoin, range is [0, 2^256), > define: offset_hash =3D DSHA256(offset). > > we need to do a little change to the merkle root hash algo, put the > offset_hash as a tx hash in the front of tx hashes. > > [offset_hash, coinbase_tx_hash, tx01_hash, tx02_hash, =E2=80=A6 , tx_n_ha= sh] > > Actually could put offset_hash in any place in the array of hashes. > > network_hash_range =3D network_hash_end - network_hash_begin > > miner_hash_range =3D miner_hash_end - miner_hash_begin > > The offset value MUST between network_hash_begin/end or > miner_hash_begin/end. > > https://user-images.githubusercontent.com/514951/31133378-e00d9ca2-a891-1= 1e7-8c61-73325f59f6ed.JPG > > When mining pool send a job to miners, put the PoW hash range > (miner_hash_begin/end) in the job. So if the miners find a hash which val= ue > is between [miner_hash_begin, miner_hash_end], means it's SHOULD be a > valid share, could submit the share to the pool. If the hash value is > between [network_hash_begin, network_hash_end] means find a valid block. > > The network_diff is much much high than the miner's diff, means the > network_hash_range is much much smaller than miner_hash_range. By now, > a typical miner's pool diff is around 16K, network diff is 1123863285132, > so miner_hash_range is at least million times bigger than > network_hash_range. > The miners only know miner_hash_range, it's impossible for cheat miners > to find out which share could make a valid block or not. > > Problems: > 1. it's a hard fork. > 2. will make existed asic dsha256 chips useless, but I think it's only a > small change to make new asic chips based on existed tech. > > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >