Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E27964A3 for ; Sat, 26 Aug 2017 21:31:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail001.aei.ca (mail001.aei.ca [206.123.6.130]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 05C8DD4 for ; Sat, 26 Aug 2017 21:31:21 +0000 (UTC) Received: (qmail 10450 invoked by uid 89); 26 Aug 2017 21:31:20 -0000 Received: by simscan 1.2.0 ppid: 10442, pid: 10444, t: 0.0505s scanners: regex: 1.2.0 attach: 1.2.0 Received: from mail002.aei.ca (HELO mail002.contact.net) (206.123.6.132) by mail001.aei.ca with (DHE-RSA-AES256-SHA encrypted) SMTP; 26 Aug 2017 21:31:20 -0000 Received: (qmail 28643 invoked by uid 89); 26 Aug 2017 21:31:20 -0000 Received: by simscan 1.2.0 ppid: 28604, pid: 28606, t: 8.8001s scanners: regex: 1.2.0 attach: 1.2.0 clamav: 0.97.8/m: spam: 3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD autolearn=disabled version=3.3.1 Received: from dsl-66-36-135-64.mtl.aei.ca (HELO ?192.168.67.200?) (dermoth@66.36.135.64) by mail.aei.ca with ESMTPA; 26 Aug 2017 21:31:11 -0000 To: Adam Tamir Shem-Tov , Bitcoin Protocol Discussion References: From: Thomas Guyot-Sionnest Message-ID: Date: Sat, 26 Aug 2017 17:31:11 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------7640D33F35D714B8DFF27B3B" X-Mailman-Approved-At: Sat, 26 Aug 2017 21:34:13 +0000 Subject: Re: [bitcoin-dev] Solving the Scalability Problem on Bitcoin 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: Sat, 26 Aug 2017 21:31:23 -0000 This is a multi-part message in MIME format. --------------7640D33F35D714B8DFF27B3B Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Pruning is already implemented in the nodes... Once enabled only unspent inputs and most recent blocks are kept. IIRC there was also a proposal to include UTXO in some blocks for SPV clients to use, but that would be additional to the blockchain data. Implementing your solution is impossible because there is no way to determine authenticity of the blockchain mid way. The proof that a block hash leads to the genesis block is also a proof of all the work that's been spent on it (the years of hashing). At the very least we'd have to keep all blocks until a hard-coded checkpoint in the code, which also means that as nodes upgrades and prune more blocks older nodes will have difficulty syncing the blockchain. Finally it's not just the addresses and balance you need to save, but also each unspent output block number, tx position and script that are required for validation on input. That's a lot of data that you're suggesting to save every 1000 blocks (and why 1000?), and as said earlier it doesn't even guarantee you can drop older blocks. I'm not even going into the details of making it work (hard fork, large block sync/verification issues, possible attack vectors opened by this...) What is wrong with the current implementation of node pruning that you are trying to solve? -- Thomas On 26/08/17 03:21 PM, Adam Tamir Shem-Tov via bitcoin-dev wrote: > > Solving the Scalability issue for bitcoin
> > I have this idea to solve the scalability problem I wish to make public= =2E > > If I am wrong I hope to be corrected, and if I am right we will all > gain by it.
> > Currently each block is being hashed, and in its contents are the hash > of the block preceding it, this goes back to the genesis block. > >
> > What if we decide, for example, we decide to combine and prune the > blockchain in its entirety every 999 blocks to one block (Genesis > block not included in count). > >
> > How would this work?: Once block 1000 has been created, the network > would be waiting for a special "pruned block", and until this block > was created and verified, block 1001 would not be accepted by any nodes= =2E > > This pruned block would prune everything from block 2 to block 1000, > leaving only the genesis block. Blocks 2 through 1000, would be > calculated, to create a summed up transaction of all transactions > which occurred in these 999 blocks. > >
> > And its hash pointer would be the Genesis block. > > This block would now be verified by the full nodes, which if accepted > would then be willing to accept a new block (block 1001, not including > the pruned block in the count). > >
> > The new block 1001, would use as its hash pointer the pruned block as > its reference. And the count would begin again to the next 1000. The > next pruned block would be created, its hash pointer will be > referenced to the Genesis Block. And so on.. > >
> > In this way the ledger will always be a maximum of 1000 blocks. > > --------------7640D33F35D714B8DFF27B3B Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit Pruning is already implemented in the nodes... Once enabled only unspent inputs and most recent blocks are kept. IIRC there was also a proposal to include UTXO in some blocks for SPV clients to use, but that would be additional to the blockchain data.

Implementing your solution is impossible because there is no way to determine authenticity of the blockchain mid way. The proof that a block hash leads to the genesis block is also a proof of all the work that's been spent on it (the years of hashing). At the very least we'd have to keep all blocks until a hard-coded checkpoint in the code, which also means that as nodes upgrades and prune more blocks older nodes will have difficulty syncing the blockchain.

Finally it's not just the addresses and balance you need to save, but also each unspent output block number, tx position and script that are required for validation on input. That's a lot of data that you're suggesting to save every 1000 blocks (and why 1000?), and as said earlier it doesn't even guarantee you can drop older blocks. I'm not even going into the details of making it work (hard fork, large block sync/verification issues, possible attack vectors opened by this...)

What is wrong with the current implementation of node pruning that you are trying to solve?

--
Thomas

On 26/08/17 03:21 PM, Adam Tamir Shem-Tov via bitcoin-dev wrote:

<B> Solving the Scalability issue for bitcoin </B> <BR>

I have this idea to solve the scalability problem I wish to make public.

If I am wrong I hope to be corrected, and if I am right we will all gain by it. <BR>

Currently each block is being hashed, and in its contents are the hash of the block preceding it, this goes back to the genesis block.

<BR>

What if we decide, for example, we decide to combine and prune the blockchain in its entirety every 999 blocks to one block (Genesis block not included in count).

<BR>

How would this work?: Once block 1000 has been created, the network would be waiting for a special "pruned block", and until this block was created and verified, block 1001 would not be accepted by any nodes.

This pruned block would prune everything from block 2 to block 1000, leaving only the genesis block. Blocks 2 through 1000, would be calculated, to create a summed up transaction of all transactions which occurred in these 999 blocks.

<BR>

And its hash pointer would be the Genesis block.

This block would now be verified by the full nodes, which if accepted would then be willing to accept a new block (block 1001, not including the pruned block in the count).

<BR>

The new block 1001, would use as its hash pointer the pruned block as its reference. And the count would begin again to the next 1000. The next pruned block would be created, its hash pointer will be referenced to the Genesis Block. And so on..

<BR>

In this way the ledger will always be a maximum of 1000 blocks.



--------------7640D33F35D714B8DFF27B3B--