Bitcoin Forum
May 03, 2024, 10:58:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How many lines of code do I have to change to move the protocol to 10mb blocks?  (Read 1577 times)
B1tUnl0ck3r (OP)
Sr. Member
****
Offline Offline

Activity: 854
Merit: 277

liife threw a tempest at you? be a coconut !


View Profile
March 25, 2017, 05:16:22 AM
 #1

I bet it's a few 0 to add, and it's done? I read that 10mb blocks require more computational power to be processed by miners before being distributed and as such costing time which may lead to the block being orphaned or that 10 mb blocks would be to big to be move through the internet.

please let's move to the future. most pools have gb/s internet connection and super server machines. a few ns or ms more may truely be a little bit slower but if everyone has to process the 10mb block there is no edge.

and with pruning it will be as light on the disk...

When the people of the world will get that covid was intentionally released to frame china, steal the election from trump, assure massive bail outs and foster the forced vaccination agendas...they will forget, like 911, wmds in irak, uss liberty or pedogate.
1714777135
Hero Member
*
Offline Offline

Posts: 1714777135

View Profile Personal Message (Offline)

Ignore
1714777135
Reply with quote  #2

1714777135
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
mezzomix
Legendary
*
Offline Offline

Activity: 2618
Merit: 1252


View Profile
March 25, 2017, 12:20:43 PM
Merited by ABCbits (1)
 #2

One line (src/consensus/consensus.h):
Code:
static const unsigned int MAX_BLOCK_BASE_SIZE = 1000000;

Typically you want to adjust other parameters as well.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6578


Just writing some code


View Profile WWW
March 25, 2017, 03:23:14 PM
 #3

Well first you have to add deployment code, and that could take a few hundred lines. Then you have to write tests for it in both C++ (unit tests) and Python (RPC tests) to make sure that deployment works and that you are producing properly sized blocks before and after the hard fork has deployed. That will take a few hundred more lines. Then, not only do you just have to consider the blocksize, you also have to consider big transactions taking up the entire block. Dealing with that could take a few hundred more lines of code. Overall, it's probably around a thousand or two lines of code.

Of course, if you want to do it completely naively without considering that it is a consensus change that requires consensus, you could just change 1 line and call it a day, but your fork will not happen safely at all.

JaredR26
Full Member
***
Offline Offline

Activity: 219
Merit: 100


View Profile
March 28, 2017, 03:42:27 AM
 #4

I bet it's a few 0 to add, and it's done? I read that 10mb blocks require more computational power to be processed by miners before being distributed and as such costing time which may lead to the block being orphaned or that 10 mb blocks would be to big to be move through the internet.

please let's move to the future. most pools have gb/s internet connection and super server machines. a few ns or ms more may truely be a little bit slower but if everyone has to process the 10mb block there is no edge.

and with pruning it will be as light on the disk...

You'd have to convince an overwhelming majority of bitcoin users to accept your code change.
JonHind
Full Member
***
Offline Offline

Activity: 154
Merit: 100



View Profile
March 28, 2017, 04:40:24 PM
 #5

One line (src/consensus/consensus.h):
Code:
static const unsigned int MAX_BLOCK_BASE_SIZE = 1000000;

Typically you want to adjust other parameters as well.


yup this would set the parameter enough for the change because the more blocks are mined the blockchain transactions would increase over time
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
March 29, 2017, 03:48:10 AM
 #6

Well first you have to add deployment code, and that could take a few hundred lines. Then you have to write tests for it in both C++ (unit tests) and Python (RPC tests) to make sure that deployment works and that you are producing properly sized blocks before and after the hard fork has deployed. That will take a few hundred more lines. Then, not only do you just have to consider the blocksize, you also have to consider big transactions taking up the entire block. Dealing with that could take a few hundred more lines of code. Overall, it's probably around a thousand or two lines of code.

Of course, if you want to do it completely naively without considering that it is a consensus change that requires consensus, you could just change 1 line and call it a day, but your fork will not happen safely at all.

Gavin basically did all this for 8mb blocks and released it as BitcoinXT with Hearn, right?


B1tUnl0ck3r (OP)
Sr. Member
****
Offline Offline

Activity: 854
Merit: 277

liife threw a tempest at you? be a coconut !


View Profile
May 22, 2017, 10:51:41 AM
 #7

Thank you for your replies! I learned a lot.

When the people of the world will get that covid was intentionally released to frame china, steal the election from trump, assure massive bail outs and foster the forced vaccination agendas...they will forget, like 911, wmds in irak, uss liberty or pedogate.
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
May 24, 2017, 06:44:15 AM
 #8

How many lines of code do you have to change to increase the maximum BTC supply from 21 million to 21 trillion Wink

Vires in numeris
B1tUnl0ck3r (OP)
Sr. Member
****
Offline Offline

Activity: 854
Merit: 277

liife threw a tempest at you? be a coconut !


View Profile
July 11, 2017, 08:21:35 PM
 #9

How many lines of code do you have to change to increase the maximum BTC supply from 21 million to 21 trillion Wink

None, I change the default unit and call statoshis bitcoin Smiley.

Personnally I would even raise the block to 100mb. I mean common, it's 2017. What's the point to have sidechains, when with 100X increase their will be a little space to increase usage.

When the people of the world will get that covid was intentionally released to frame china, steal the election from trump, assure massive bail outs and foster the forced vaccination agendas...they will forget, like 911, wmds in irak, uss liberty or pedogate.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6578


Just writing some code


View Profile WWW
July 11, 2017, 10:15:58 PM
 #10

None, I change the default unit and call statoshis bitcoin Smiley.
That's incorrect. You would actually have to change a lot of code to change the default unit (at the very least, all of the display code, not necessarily consensus code). All values in Bitcoin are actually in satoshis, not BTC. This makes it so that we never have to deal with decimals, only integers. Only for display purposes (for us humans because big numbers are hard to understand) are things in BTC.

Personnally I would even raise the block to 100mb. I mean common, it's 2017. What's the point to have sidechains, when with 100X increase their will be a little space to increase usage.
You clearly have not thought through all of the considerations involved in changing the block size. There is not just disk space considerations. You also have to consider that all nodes on the network need to download that block, check all of the transactions in it, and then broadcast it to their peers (so sending multiple hundreds of MB every ten minutes). I don't think many people have internet connections that provide enough bandwidth to allow them to download 100 MB of data (aka one block) in a reasonable amount of time (reasonable being on the order of a few hundred milliseconds since we're talking about computers here). Since block propagation time will likely increase, orphan rates will increase too as miners will have more time to mine a block at the same height as one that was already found.

Then there's the quadratic sighashing problem. A 1 MB block can take 30 seconds to validate because of the quadratic sighashing problem (also remember that, to a computer, seconds is a very long time). Since the problem is quadratic, just increasing the block size to 100 MB means that a block could take 30 * 100^2 seconds to validate, which is 300000 seconds, ~3 and a half days.

There are also several other considerations too like the time it takes to do the initial sync (which includes downloading the blockchain and then verifying all the blocks and transactions), the CPU and RAM resources required to process the block, etc. So if you think increasing the block size to 100 MB is a good idea, please, think again and actually consider everything that goes into sending, receiving, storing, and validating blocks, not just storing blocks on disk.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!