Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 85713892 for ; Sun, 12 Mar 2017 09:51:14 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-ua0-f194.google.com (mail-ua0-f194.google.com [209.85.217.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A45EFA1 for ; Sun, 12 Mar 2017 09:51:13 +0000 (UTC) Received: by mail-ua0-f194.google.com with SMTP id u30so17907887uau.2 for ; Sun, 12 Mar 2017 01:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=SQbh9R38egBgtRgvmo9LrAh0vkmNtLfs8QXayrfZYaw=; b=LpMLVfvnLIjrK37aJh56YuAh75l3Xq44W6lwsacHS8hL3gqbZrRmR/MXIjX6BMLLfB ApxGVEL29x7qausXSMzZJ452teLWiIt05muCHaVAwyKfUTaA7d8XT9d1tyghRu3FBv86 9rKotvxiC55JzOUMKiDXc0V4sqtl9f/RbL9ft8ba8fqXmDBYoNzjiaEf71QTqGXXEG6/ DfnAqE3ZA6hbMO2f07uzdOxhv4J7eo2uL9T0/Qnk5q7Y4HS0X3810V84VbDh+j5DjT2D u36ZkQBjvrbqeBZSgklXirQEVIG3WiR3j1DlXE0nvnK8lKCeDymsrc5y5p+JDr8A5f5N qohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SQbh9R38egBgtRgvmo9LrAh0vkmNtLfs8QXayrfZYaw=; b=LKuCHEEEWee1KXW5O+Fp+vRIYYQeJvblqx5fU/aijrtKPBlV0jUw08XugNsyiC/NEd qHBOcLqVsUbXRDFI/O3pYbSppMw0ys4UjjdHy48NIchNikhWzQc0EAR/75OrTKPZQpSb f7Rdb4qrSDrV/sp/UTkq8ECprkUm4rsdKvvCl95U6okYaXy9Sck/VDXyn518dIrEoGcu 93noXVf6WHobGVuWs4JN8T7MrPOqRIrAK7qlII4eFoJsEGv7qejGiJRzeCL7Lb68QQve xx+fdgDAdNV+fcaf/h5QEnzGvyY49StCJpKs+3aXsY6/4/o2LDJVPMFq2jFXVkglyQxC oyVQ== X-Gm-Message-State: AMke39kLUvY4du5CkP4v1n27gmhBZC2fASOBzmeNZHTI9ifjt2LIftBPDK4LtjAPHLC4grl6Fg4HcQOSgTSFBw== X-Received: by 10.176.86.29 with SMTP id y29mr11020769uaa.74.1489312272525; Sun, 12 Mar 2017 01:51:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.86.79 with HTTP; Sun, 12 Mar 2017 01:51:12 -0800 (PST) From: ashish khandekar Date: Sun, 12 Mar 2017 15:21:12 +0530 Message-ID: To: bitcoin-dev@lists.linuxfoundation.org Content-Type: multipart/alternative; boundary=f403045dd55af6af3a054a858836 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, 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 X-Mailman-Approved-At: Sun, 12 Mar 2017 14:31:15 +0000 Subject: [bitcoin-dev] Solution for blockchain congestion and determination of block size by bitcoin network/protocol itself. 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, 12 Mar 2017 09:51:14 -0000 --f403045dd55af6af3a054a858836 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable BLOCKCHAIN CONGESTION =E2=80=93 A SOLUTION AND PRE-EMPTIVE MEASURES FOR THE= FUTURE This document is an idea for helping the bitcoin block chain get uncongested, provide enough space for transactions to get included in blocks easily, and give the bitcoin network the power to defend itself against any stress tests or spam attacks in the future. The current maximum size of a block in the bitcoin protocol is 1mb.This has created a =E2=80=9Cfee market=E2=80=9D allowing those who can send high tra= nsaction fees only to use bitcoin easily, making those who use even a slight lower fee to wait for transactions to get confirmed by miners, sometimes it take hours but sometimes it can scale up to a few days, this creates a difficulty for merchants who use bitcoin to operate with ease, new people who are adapting to bitcoin, and those unaware of the developments in the bitcoin community confused in why transactions aren=E2=80=99t getting confirmed as they used = to. Bitcoin is a highly versatile. From its price being directly influenced by its demand and supply to the amount of work done to keep the network safe a.k.a. mining. Over the years both have changed dramatically but one thing which has stayed constant is the size of the block, which is 1mb. The limit of 1mb creates only a finite number of transactions to get confirmed even if used to the brim, leaving out other transactions and creating a backlog of transaction to be carried forward indefinitely. Bitcoin=E2=80=99s verification system, mining, has a dynamic difficulty cal= culation rate, which means every 2016 blocks or 2 weeks the difficulty changes making mining little bit easy or a bit difficult, but keeping the same maximum output of 1mb per block, so this means every 2 weeks on 2016mb worth of transactions can get verified assuming all blocks are filled to the brim, any amount of excess transactions would not get verified due to lack of space and would get carried over to the next cycle, over a period of time this becomes a massive amount and has led to the current blockchain congestion. A unique solution is to let the bitcoin network change the maximum block size as per the prevailing network conditions, this solution borrows some aspects of both the demand and supply factor and dynamic change of network difficulty (amount of work done to verify transactions). This would be achieved by tracking the volume of the total size of transactions done between 2 consecutive network difficulty changes and dividing it by 2016, the number of blocks mined between 2 consecutive network difficulty changes. The resulting answer would be rounded up to the nearest kb and then compared to the previous block size, the higher between the two would be taken as the new maximum block size. The extra space would be helpful if a malicious attacker tries to create a lot of small dust transactions and flood the network. Let us take a look at a example of how it would affect the bitcoin network in a real life scenario. Dynamic block size calculation (B) =3D Total size of transactions from previous network difficulty change(ST) / 2016 We compare this with the current block size and the higher is accepted as new block size. For example purposes the block numbers have been changed for easy understanding. If during cycle 1, block number 1 to block number 2016 the total size of transactions is 1608mb,recalculating it with the dynamic block size algorithm would give the following result: Dynamic block size calculation (B) =3D ST/2016 1608/2016=3D0.79761905 which is 797kb We compare this with the current block size which is 1mb (current block size in real life) and the higher of the two becomes the block size for the next cycle. During cycle 2, block number 2017 to block number 4032 the total size of transactions is 2260mb, recalculating it with the dynamic block size algorithm would give the following result: Dynamic block size calculation (B) =3D ST/2016 2260/2016=3D1.12103175 which is 1.2mb We compare this with the current block size which is 1mb and the higher of the two becomes the block size for the next cycle, in this case 1.2 mb blocks would be new block size. The above examples can be repeated indefinitely allowing the network to adjust the block size automatically. The dynamic block size is to be calculated at the same time as the network difficulty is changed. To avoid orphaning of blocks and very small blocks a minimum block size should also be taken into effect, the minimum size of the block should be in the range of 30-60% of the maximum block size; this measure would also stop the propagation of very small blocks which aren=E2=80=99t verifying transactions and helping the network grow. THE END Any questions ? Mail me at: contashk18@gmail.com --f403045dd55af6af3a054a858836 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

BLOCKCHAIN CONGESTION =E2=80=93 A SOLUTION AND PRE-EMPTIVE MEASURES FOR THE FUTURE

= =C2=A0

This do= cument is an idea for helping the bitcoin block chain get uncongested, provide enough sp= ace for transactions to get included in blocks easily, and give the bitcoin net= work the power to defend itself against any stress tests or spam attacks in the future.

= =C2=A0

The cur= rent maximum size of a block in the bitcoin protocol is 1mb.This has created a =E2=80=9C= fee market=E2=80=9D allowing those who can send high transaction fees only to use bitcoin easil= y, making those who use even a slight lower fee to wait for transactions to ge= t confirmed by miners, sometimes it take hours but sometimes it can scale up = to a few days, this creates a difficulty for merchants who use bitcoin to operat= e with ease, new people who are adapting to bitcoin, and those unaware of the= developments in the bitcoin community confused in why transactions aren=E2=80=99t gettin= g confirmed as they used to.

= =C2=A0

Bitcoin= is a highly versatile. From its price being directly influenced by its demand and suppl= y to the amount of work done to keep the network safe a.k.a. mining. Over the ye= ars both have changed dramatically but one thing which has stayed constant is t= he size of the block, which is 1mb. The limit of 1mb creates only a finite num= ber of transactions to get confirmed even if used to the brim, leaving out othe= r transactions and creating a backlog of transaction to be carried forward indefinitely.

= =C2=A0

Bitcoin= =E2=80=99s verification system, mining, has a dynamic difficulty calculation rate, whi= ch means every 2016 blocks or 2 weeks the difficulty changes making mining lit= tle bit easy or a bit difficult, but keeping the same maximum output of 1mb per block, so this means every 2 weeks on 2016mb worth of transactions can get verified assuming all blocks are filled to the brim, any amount of excess transactions would not get verified due to lack of space and would get carr= ied over to the next cycle, over a period of time this becomes a massive amount= and has led to the current blockchain congestion.

= =C2=A0

A uniqu= e solution is to let the bitcoin network change the maximum block size as per the prevail= ing network conditions, this solution borrows some aspects of both the demand a= nd supply factor and dynamic change of network difficulty (amount of work done= to verify transactions).

= =C2=A0

This wo= uld be achieved by tracking the volume of the total size of transactions done betw= een 2 consecutive network difficulty changes and dividing it by 2016, the numbe= r of blocks mined between 2 consecutive network difficulty changes. The resultin= g answer would be rounded up to the nearest kb and then compared to the previ= ous block size, the higher between the two would be taken as the new maximum bl= ock size. The extra space would be helpful if a malicious attacker tries to cre= ate a lot of small dust transactions and flood the network. Let us take a look = at a=C2=A0 example of how it would affect the bitcoin network in a real life scenario.

= =C2=A0

Dynamic= block size calculation (B) =3D Total size of transactions from previous network diffic= ulty change(ST) / 2016

We comp= are this with the current block size and the higher is accepted as new block size.

= =C2=A0

For exa= mple purposes the block numbers have been changed for easy understanding.

If duri= ng cycle 1, block number 1 to block number 2016 the total size of transactions is 1608m= b,recalculating it with the dynamic block size algorithm would give the following result:

Dynamic= block size calculation (B) =3D ST/2016

1608/20= 16=3D0.79761905=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 which is 797kb

We comp= are this with the current block size which is 1mb (current block size in real life) and t= he higher of the two becomes the block size for the next cycle.

During = cycle 2, block number 2017 to block number 4032 the total size of transactions is 2260mb, recalculating it with the dynamic block size algorithm would give the follo= wing result:

Dynamic= block size calculation (B) =3D ST/2016

2260/20= 16=3D1.12103175=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 which is 1.2mb

We comp= are this with the current block size which is 1mb and the higher of the two becomes the b= lock size for the next cycle, in this case 1.2 mb blocks would be new block size= .

= =C2=A0

The abo= ve examples can be repeated indefinitely allowing the network to adjust the block size = automatically. The dynamic block size is to be calculated at the same time as the network difficulty is changed.

To avoi= d orphaning of blocks and very small blocks a minimum block size should also be taken into effect, the minimum size of the block should be in the range of 30-60% of t= he maximum block size; this measure would also stop the propagation of very sm= all blocks which aren=E2=80=99t verifying transactions and helping the network = grow.

= =C2=A0

THE END=

Any que= stions ?

Mail me= at: co= ntashk18@gmail.com

= =C2=A0

--f403045dd55af6af3a054a858836--