What is Nostr?
ashish khandekar [ARCHIVE] /
npub17wm…pk4q
2023-06-07 17:57:11

ashish khandekar [ARCHIVE] on Nostr: 📅 Original date posted:2017-03-12 📝 Original message:BLOCKCHAIN CONGESTION – ...

đź“… Original date posted:2017-03-12
📝 Original message:BLOCKCHAIN CONGESTION – 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 “fee market” allowing those who can send high transaction 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’t 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’s verification system, mining, has a dynamic difficulty calculation
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) = 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) = ST/2016

1608/2016=0.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) = ST/2016

2260/2016=1.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’t verifying
transactions and helping the network grow.



THE END

Any questions ?

Mail me at: contashk18 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170312/8b5ab2cb/attachment.html>;
Author Public Key
npub17wm4fnc6u8at39nu7depn96mgny8lvpv6wlrg7ff6jeykhmx7pcsjapk4q