Bitcoin Forum
September 27, 2018, 10:56:11 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: On a technical level, what determines how big a block will be?  (Read 677 times)
Pietjebel
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
August 16, 2015, 12:02:24 PM
 #1


From the whitepaper:

1)
New transactions are broadcast to all nodes.
2)
Each node collects new transactions into a block. 
3)
Each node works on finding a difficult proof-of-work for its block.
4)
When a node finds a proof-of-work, it broadcasts the block to all nodes.

So how does the the miner software work? I reckon transactions are flowing in continuously.
The time needed for the pow and the rate of incoming transactions determines the size of the block?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538088971
Hero Member
*
Offline Offline

Posts: 1538088971

View Profile Personal Message (Offline)

Ignore
1538088971
Reply with quote  #2

1538088971
Report to moderator
1538088971
Hero Member
*
Offline Offline

Posts: 1538088971

View Profile Personal Message (Offline)

Ignore
1538088971
Reply with quote  #2

1538088971
Report to moderator
1538088971
Hero Member
*
Offline Offline

Posts: 1538088971

View Profile Personal Message (Offline)

Ignore
1538088971
Reply with quote  #2

1538088971
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1540
Merit: 1659


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
August 16, 2015, 12:13:45 PM
 #2

The transactions included are determined usually by their priority, which is also determined by the fee. Large transactions are typically high priority as well as transactions with a decent fee. I think the software will pull the transactions with a high enough priority first and include those in the block. Also, part of the block is a thing called the merkle root, which is a hash of all of the transactions included into the block. In order to change the hash in different ways besides the nonce, different transactions will also be included to change the merkle root. Generally, block sizes are determined by how quickly the miners exhaust nonces and how many transactions with decent fees can be stuffed in.

Pietjebel
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
August 16, 2015, 12:22:22 PM
 #3

The transactions included are determined usually by their priority, which is also determined by the fee. Large transactions are typically high priority as well as transactions with a decent fee. I think the software will pull the transactions with a high enough priority first and include those in the block. Also, part of the block is a thing called the merkle root, which is a hash of all of the transactions included into the block. In order to change the hash in different ways besides the nonce, different transactions will also be included to change the merkle root. Generally, block sizes are determined by how quickly the miners exhaust nonces and how many transactions with decent fees can be stuffed in.

So does the amount of transactions in the block change with each hash attempt with a new nonce?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1540
Merit: 1659


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
August 16, 2015, 12:44:39 PM
 #4

The transactions included are determined usually by their priority, which is also determined by the fee. Large transactions are typically high priority as well as transactions with a decent fee. I think the software will pull the transactions with a high enough priority first and include those in the block. Also, part of the block is a thing called the merkle root, which is a hash of all of the transactions included into the block. In order to change the hash in different ways besides the nonce, different transactions will also be included to change the merkle root. Generally, block sizes are determined by how quickly the miners exhaust nonces and how many transactions with decent fees can be stuffed in.

So does the amount of transactions in the block change with each hash attempt with a new nonce?
The amount probably changes a little when the range of nonces and extranonces is exhausted since transactions are different sizes. The transactions inside will probably change as something needs to be changed in order to get something different for the hash. I think lower priority transactions (low fee) will be removed in favor of higher priority (high fee) transactions.

Pietjebel
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
August 16, 2015, 01:36:56 PM
 #5


Okay, thanks for replying.
I don't still get the full gist of this but I guess you will need to fiddle with the actual code to get a total understanding.
DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1373



View Profile
August 16, 2015, 02:12:47 PM
 #6


Okay, thanks for replying.
I don't still get the full gist of this but I guess you will need to fiddle with the actual code to get a total understanding.

Solo miners (or mining pools) get to choose the size of their blocks as long as it is equal to or smaller than the consensus rule on maximum block size.  Currently the consensus rule is that blocks cannot be larger than 1 megabyte, but there are several discussions occurring about changing that maximum limit in the future.

The most profitable thing to do would be to fill the block right up to the limit with the transactions that pay the largest amount PER BYTE. If the solo miner (or mining pool) isn't aware of enough transactions to fill the block, then the most profitable thing to do is to include all transactions that pay any fee at all.  Including free transactions is up to the generosity of the solo miner (or pool) since it does not increase their revenue at all (and each byte added to the block very slightly increases the odds that the block may become orphaned).

As such, if there is a backlog of more than enough fee-paying transactions, then the blocksize will be any size less than or equal to the consensus limit that the solo miner (or mining pool) chooses it to be.  In most cases this is likely to either be very close to the consensus limit or very close to any limit the miner (or pool) has personally chosen.  It is likely to only change by a few hundred bytes or so as the miner (or pool) replaces transactions that pay a lower fee-per-byte with transactions that pay a higher fee-per-byte as the miner (or pool) hears about them).

If there is not a backlog of fee-paying transactions, then the solo miner (or mining pool) may choose to add new fee-paying transactions to their blocks as they hear about the transactions in order to increase the revenue that the block will generate for them.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!