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 3E5B89C for ; Sun, 4 Dec 2016 20:00:02 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9B27B1B2 for ; Sun, 4 Dec 2016 20:00:01 +0000 (UTC) Received: by mail-io0-f172.google.com with SMTP id j65so564898854iof.0 for ; Sun, 04 Dec 2016 12:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=awsomnet-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=vA9+TnjIBRWG0zsPLFAqam7q7VkybIRixHstL352R4A=; b=BfPHdfHCn6Dry9Mtqhol3u8+KWlmaE68aGo/uk5LrBMYO+ZN0Y/cpVl4/eAkt4uMp4 z5LnEsjRErAvk4Ju/CGNSObou4Ahg+5cme8nkrFu3zcH0JzFEoteBgGtGtRezcBVh34H GbmAycUFwn7aoiK3ygSl3ANGsu+LO1Cd4oNvncanrqWQTMI+Gp6RbF90NRsCek44OTGJ N5s3JjFoab6044ecCtfHBAv1VW3+86kaG7MOI1d0IYPmG7WW9NFfuq2bXH8/t1ZsN4hL 0bfgngrtiMw5fORDU7FHNIHGHNgo+ICTmMMxL9L3fZPTGWue1ShUbkGXrYEpaSQGFM0x zcBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=vA9+TnjIBRWG0zsPLFAqam7q7VkybIRixHstL352R4A=; b=DTh01lLEdIdqw+dP4auRo4ua5z3XCCTb6iz4bYITfZtbNkRMhj1UmAKyuSV9D4E9Nd KSsgFigJhaIVI0FgeKQR72rtfML4VmqDNMphSlHG5Cgv9o/xDgC2hhebdqSp9ZXgw/1J sYqDt7yHQB24PXPli2v4wGPYW15g27iXnEBZjZrnVr1Ny8YGD3ImQkn2SESJQTEWhdNa gVz8Y7As3V+qUVdvlKCbG8ehP/QRVyvYXrAJ76xugn1Ojulzmb1Dv8T0waZ0qPjkTcqs idDKNZUpdE3IQNJGsfV0+mKY78/htuznXCYN4NkvqApBjXT2oHwetz1DbH5JaeBQY2Gy 9Lmg== X-Gm-Message-State: AKaTC00WhJRkE08N9zmEihFPFte5NlpZv4hFYsuQ1zT6CH54W1/7fDh6mPlTxZFfiQzGnoqm660bULO6tMWgTA== X-Received: by 10.36.139.4 with SMTP id g4mr5872182ite.35.1480881600840; Sun, 04 Dec 2016 12:00:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.236.70 with HTTP; Sun, 4 Dec 2016 12:00:00 -0800 (PST) X-Originating-IP: [73.234.153.245] In-Reply-To: References: From: adiabat Date: Sun, 4 Dec 2016 15:00:00 -0500 Message-ID: To: Johnson Lau , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary=94eb2c04abb8c5ddbf0542da9dd2 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, 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] Forcenet: an experimental network with a new header format 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: Sun, 04 Dec 2016 20:00:02 -0000 --94eb2c04abb8c5ddbf0542da9dd2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Interesting stuff! I have some comments, mostly about the header. The header of forcenet is mostly described in Luke=E2=80=99s BIP, but I hav= e made > some amendments as I implemented it. The format is (size in parentheses; > little endian): > > Height (4), BIP9 signalling field (4), hardfork signalling field (3), > merge-mining hard fork signalling field (1), prev hash (32), timestamp (4= ), > nonce1 (4), nonce2 (4), nonce3 (compactSize + variable), Hash TMR (32), > Hash WMR (32), total tx size (8) , total tx weight (8), total sigops (8), > number of tx (4), merkle branches leading to header C (compactSize + 32 b= it > hashes) > First, I'd really rather not have variable length fields in the header. It's so much nicer to just have a fixed size. Is having both TMR and WMR really needed? As segwit would be required with this header type, and the WMR covers a superset of the data that the TMR does, couldn't you get rid of the TMR? The only disadvantage I can see is that light clients may want a merkle proof of a transaction without having to download the witnesses for that transaction. This seems pretty minor, especially as once they're convinced of block inclusion they can discard the witness data, and also the tradeoff is that light clients will have to download and store and extra 32 bytes per block, likely offsetting any savings from omitting witness data. The other question is that there's a bit that's redundant: height is also committed to in the coinbase tx via bip 34 (speaking of which, if there's a hard-fork, how about reverting bip 34 and committing to the height with coinbase tx nlocktime instead?) Total size / weight / number of txs also feels pretty redundant. Not a lot of space but it's hard to come up with a use for them. Number of tx could be useful if you want to send all the leaves of a merkle tree, but you could also do that by committing to the depth of the merkle tree in the header, which is 1 byte. Also how about making timestamp 8 bytes? 2106 is coming up soon :) Maybe this is too nit-picky; maybe it's better to put lots of stuff in for testing the forcenet and then take out all the stuff that wasn't used or had issues as it progresses. Thanks and looking forward to trying out forcenet! -Tadge --94eb2c04abb8c5ddbf0542da9dd2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Interesting stuff! I have some comments, mostly about the = header.

The header of forcenet is mostly described in Luke=E2=80=99s BIP, but I hav= e made some amendments as I implemented it. The format is (size in parenthe= ses; little endian):

Height (4), BIP9 signalling field (4), hardfork signalling field (3), merge= -mining hard fork signalling field (1), prev hash (32), timestamp (4), nonc= e1 (4), nonce2 (4), nonce3 (compactSize + variable), Hash TMR (32), Hash WM= R (32), total tx size (8) , total tx weight (8), total sigops (8), number o= f tx (4), merkle branches leading to header C (compactSize + 32 bit hashes)=

First, I'd really rather not have = variable length fields in the header.=C2=A0 It's so much nicer to just = have a fixed size.

Is having both TMR and WMR real= ly needed?=C2=A0 As segwit would be required with this header type, and the= WMR covers a superset of the data that the TMR does, couldn't you get = rid of the TMR?=C2=A0 The only disadvantage I can see is that light clients= may want a merkle proof of a transaction without having to download the wi= tnesses for that transaction.=C2=A0 This seems pretty minor, especially as = once they're convinced of block inclusion they can discard the witness = data, and also the tradeoff is that light clients will have to download and= store and extra 32 bytes per block, likely offsetting any savings from omi= tting witness data.

The other question is that the= re's a bit that's redundant: height is also committed to in the coi= nbase tx via bip 34 (speaking of which, if there's a hard-fork, how abo= ut reverting bip 34 and committing to the height with coinbase tx nlocktime= instead?)

Total size / weight / number of txs als= o feels pretty redundant.=C2=A0 Not a lot of space but it's hard to com= e up with a use for them.=C2=A0 Number of tx could be useful if you want to= send all the leaves of a merkle tree, but you could also do that by commit= ting to the depth of the merkle tree in the header, which is 1 byte.
<= div>
Also how about making timestamp 8 bytes? =C2=A02106 is c= oming up soon :)

Maybe this is too nit-picky; mayb= e it's better to put lots of stuff in for testing the forcenet and then= take out all the stuff that wasn't used or had issues as it progresses= .

Thanks and looking forward to trying out forcenet!

-Tadge
--94eb2c04abb8c5ddbf0542da9dd2--