Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: bitkilo on April 24, 2015, 05:41:21 AM



Title: Small Block
Post by: bitkilo on April 24, 2015, 05:41:21 AM
Just noticed block 353454 only has 17 transactions in total, this seems very small to me.
https://blockchain.info/block/00000000000000000895f60353a27240389a8caf6a35c22d6cf3ff78bbf80fca

Can anyone give me a quick explanation as to why some blocks have 1000+ transactions and other much less.


Title: Re: Small Block
Post by: chennan on April 24, 2015, 05:48:16 AM
Because at the time the block was created, the number of made transactions varies. Sometime it is high, sometimes is low. 


Title: Re: Small Block
Post by: shorena on April 24, 2015, 05:51:23 AM
Just noticed block 353454 only has 17 transactions in total, this seems very small to me.
https://blockchain.info/block/00000000000000000895f60353a27240389a8caf6a35c22d6cf3ff78bbf80fca

Can anyone give me a quick explanation as to why some blocks have 1000+ transactions and other much less.

The time between this block and the block before[1] was 9 seconds according to bc.i. They probably did not know more transactions to put into the block. Considering the number of unconfirmed transactions at that time[2], there might be other - possibly economical - reasons.

[1] https://blockchain.info/block/000000000000000004d08b90ad76d0c6d665960ded65e3c8ef8abdf3b42a41d2
[2] ~0500 https://i.imgur.com/jzRXHYq.png


Title: Re: Small Block
Post by: bitkilo on April 24, 2015, 06:09:34 AM
Just noticed block 353454 only has 17 transactions in total, this seems very small to me.
https://blockchain.info/block/00000000000000000895f60353a27240389a8caf6a35c22d6cf3ff78bbf80fca

Can anyone give me a quick explanation as to why some blocks have 1000+ transactions and other much less.

The time between this block and the block before[1] was 9 seconds according to bc.i. They probably did not know more transactions to put into the block. Considering the number of unconfirmed transactions at that time[2], there might be other - possibly economical - reasons.

[1] https://blockchain.info/block/000000000000000004d08b90ad76d0c6d665960ded65e3c8ef8abdf3b42a41d2
[2] ~0500 https://i.imgur.com/jzRXHYq.png
Thanks shorena, i always wanted to know why some block are much larger in size than others just never asked before.
I think i remember seeing a block once with only 1 transaction, anyone have a link to that one?


Title: Re: Small Block
Post by: odolvlobo on April 24, 2015, 07:42:32 AM
Blocks are not required to have any transactions in them.


Title: Re: Small Block
Post by: minerpumpkin on April 24, 2015, 11:07:50 AM
Just noticed block 353454 only has 17 transactions in total, this seems very small to me.
https://blockchain.info/block/00000000000000000895f60353a27240389a8caf6a35c22d6cf3ff78bbf80fca

Can anyone give me a quick explanation as to why some blocks have 1000+ transactions and other much less.

The time between this block and the block before[1] was 9 seconds according to bc.i. They probably did not know more transactions to put into the block. Considering the number of unconfirmed transactions at that time[2], there might be other - possibly economical - reasons.

[1] https://blockchain.info/block/000000000000000004d08b90ad76d0c6d665960ded65e3c8ef8abdf3b42a41d2
[2] ~0500 https://i.imgur.com/jzRXHYq.png
Thanks shorena, i always wanted to know why some block are much larger in size than others just never asked before.
I think i remember seeing a block once with only 1 transaction, anyone have a link to that one?

I don't have an example right now, but I think there are lists if you just look for them on the Internet. There definitely are blocks with only one transaction, sometimes a miner just gets lucky and it would be stupid of him or her not to immediately publish the block, otherwise they would risk another one submitting a block before them and thus losing the block reward.


Title: Re: Small Block
Post by: shorena on April 24, 2015, 01:12:36 PM
Just noticed block 353454 only has 17 transactions in total, this seems very small to me.
https://blockchain.info/block/00000000000000000895f60353a27240389a8caf6a35c22d6cf3ff78bbf80fca

Can anyone give me a quick explanation as to why some blocks have 1000+ transactions and other much less.

The time between this block and the block before[1] was 9 seconds according to bc.i. They probably did not know more transactions to put into the block. Considering the number of unconfirmed transactions at that time[2], there might be other - possibly economical - reasons.

[1] https://blockchain.info/block/000000000000000004d08b90ad76d0c6d665960ded65e3c8ef8abdf3b42a41d2
[2] ~0500 https://i.imgur.com/jzRXHYq.png
Thanks shorena, i always wanted to know why some block are much larger in size than others just never asked before.
I think i remember seeing a block once with only 1 transaction, anyone have a link to that one?

You are welcome. The easiest way to find a block without many TX would be to go back to the early days. E.g. #42[1]. It still happens though, but dont know a certain block off the top of my head either.

Blocks are not required to have any transactions in them.

Isnt the coinbase TX, technically a TX? I know miners dont have to claim the whole reward, but the coinbase TX must be included.



[1] https://www.blocktrail.com/BTC/block/42


Title: Re: Small Block
Post by: Amph on April 24, 2015, 01:19:15 PM
Blocks are not required to have any transactions in them.

i'm curious about this aspect... but the number of transactions per block is based on what? it's random?


Title: Re: Small Block
Post by: shorena on April 24, 2015, 05:13:17 PM
Blocks are not required to have any transactions in them.

i'm curious about this aspect... but the number of transactions per block is based on what? it's random?

Keep in mind that the below is only a reflection of the default settings from bitcoin core. Miners can write their own versions with different rules.

No its not random. Firstly the mining node must be aware of transactions otherwise the block will be "empty". That is only include the coinbase TX. The transactions get sort by priority and fee. They include "blockprioritysize" (default is 50000) byte worth of transactions into the block that have a high priortiy but no (or low) fee. They further fill the block up to "blockmaxsize" (default is 750000) bytes worth of transactions. Its also possible to set "blockminsize" (default is 0) to make sure the block has at least a certain size. If not enough TX are present blockminsize will not keep you from hashing.

Its here[1] in the source and here[2] are the default values for the settings.

[1] https://github.com/bitcoin/bitcoin/blob/master/src/miner.cpp
[2] https://en.bitcoin.it/wiki/Running_Bitcoin


Title: Re: Small Block
Post by: minerpumpkin on April 24, 2015, 05:41:21 PM
large fees or short block time.

Short block time? No one actually defines the block time deliberately! Fees also don't affect the time between blocks at all! Miners just try to find a new block as fast as possible and as soon as they find one, they publish it. Waiting for more transactions would be very risky, because you would end up risking your block-reward!


Title: Re: Small Block
Post by: odolvlobo on April 25, 2015, 12:31:49 AM
Blocks are not required to have any transactions in them.

i'm curious about this aspect... but the number of transactions per block is based on what? it's random?

It is up to the miner to decide on which transactions to include in the block. A miner is generally not going to leave out any transactions that pay a fee, but she might leave out those that don't. Most, but not all, miners follow the policies in Bitcoin Core. Another consideration is propagation time. Larger blocks take longer to propagate, and that can increase the chances of it becoming an orphan. So, a miner may prefer smaller blocks, such as those without any transactions.


Title: Re: Small Block
Post by: lordbtc on April 25, 2015, 04:16:25 PM
There are actually blocks that have no transactions included. I think the payout then will be only 25 btc as there are no miners fees given to the miner


Title: Re: Small Block
Post by: uininPeter on April 25, 2015, 05:32:23 PM
Theoretically blocks can be solved on the first attempt, and with the number of attempts happening every second, the time that a block can be solved in is very short. I wouldn't be surprised if that were the case here.


Title: Re: Small Block
Post by: Sheldor333 on April 25, 2015, 05:37:48 PM
I don't know why some blocks have just a few transaction and other 1000+, it is weird in my opinion but it does happen.


Title: Re: Small Block
Post by: tescomatty on April 25, 2015, 05:57:45 PM
There are actually blocks that have no transactions included. I think the payout then will be only 25 btc as there are no miners fees given to the miner

Do you have examples of these? I cant imagine why there would be no transactions unless they were very early blocks.


Title: Re: Small Block
Post by: Josepht on April 25, 2015, 06:03:16 PM
There are actually blocks that have no transactions included. I think the payout then will be only 25 btc as there are no miners fees given to the miner

Do you have examples of these? I cant imagine why there would be no transactions unless they were very early blocks.

Yeah, these things happen. It happens if blocks are found like 1 second after each other.

Btw OP, why do you have to ask that question? Every senior member is supposed to know this.


Title: Re: Small Block
Post by: minerpumpkin on April 25, 2015, 07:56:56 PM
I don't know why some blocks have just a few transaction and other 1000+, it is weird in my opinion but it does happen.

Well the answer to your question has been outlined in several of the posts in this thread: It's called variance. Miners try to solve/find a block as fast as possible. It makes no sense for them to wait and include a given amount of transactions. Adding transactions only makes the block bigger (thus it becomes more likely for the block to become orphaned) and waiting for more transactions to come in has an incredibly negative EV.


Title: Re: Small Block
Post by: imamanandyou on April 25, 2015, 08:57:47 PM
I don't know why some blocks have just a few transaction and other 1000+, it is weird in my opinion but it does happen.

Well the answer to your question has been outlined in several of the posts in this thread: It's called variance. Miners try to solve/find a block as fast as possible. It makes no sense for them to wait and include a given amount of transactions. Adding transactions only makes the block bigger (thus it becomes more likely for the block to become orphaned) and waiting for more transactions to come in has an incredibly negative EV.

What is an orphaned block? Is that one where there are several fringes and that block ends up on a fringe that gets left because another was solved first?


Title: Re: Small Block
Post by: odolvlobo on April 25, 2015, 09:03:19 PM
What is an orphaned block? Is that one where there are several fringes and that block ends up on a fringe that gets left because another was solved first?

Two miners might find a block at the same time, and only one will eventually be on the longest chain. The other will be forgotten. The name "orphan" is a bit of a misnomer, because an orphan block has a parent but it has no child (or perhaps no grandchild).


Title: Re: Small Block
Post by: minerpumpkin on April 25, 2015, 09:34:31 PM
I don't know why some blocks have just a few transaction and other 1000+, it is weird in my opinion but it does happen.

Well the answer to your question has been outlined in several of the posts in this thread: It's called variance. Miners try to solve/find a block as fast as possible. It makes no sense for them to wait and include a given amount of transactions. Adding transactions only makes the block bigger (thus it becomes more likely for the block to become orphaned) and waiting for more transactions to come in has an incredibly negative EV.

What is an orphaned block? Is that one where there are several fringes and that block ends up on a fringe that gets left because another was solved first?

Yep, that's basically it. Just like odolvlobo has also explained this happens when there are two valid blocks mined (mostly roughly at the same time) and it now comes down to the next block that's being mined to which chain (both chains are actually valid until this point) it gets added. The one that gets left out will now most likely be abandoned.


Title: Re: Small Block
Post by: panck4beer on April 25, 2015, 09:52:44 PM
In the future after all the bitcoins have been released, wouldnt a small block such as this be extremely detrimental to the system? Suddenly your reward is based on the number of transactions, and no transaction = no reward...


Title: Re: Small Block
Post by: minerpumpkin on April 25, 2015, 09:55:52 PM
In the future after all the bitcoins have been released, wouldnt a small block such as this be extremely detrimental to the system? Suddenly your reward is based on the number of transactions, and no transaction = no reward...

Well there wouldn't be any harm for you to publish the block, nonetheless. The general thinking goes like this, though: In the future, when the block-rewards have been weaned off, the number of transactions is supposed to be high enough to account for a reasonable fee for the miners. In that case you would wait until enough transactions have accumulated until it is economically viable for you to publish the block. Waiting may actually make some sense in that case in the future.


Title: Re: Small Block
Post by: SirChiko on April 25, 2015, 09:58:48 PM
Blocks are not required to have any transactions in them.

i'm curious about this aspect... but the number of transactions per block is based on what? it's random?
It's based on how many transactions were broadcasted by the time while block was in process of solving, it isn't random lol and i don't see any rocket science in it, it's simple to understand.


Title: Re: Small Block
Post by: ensurance982 on April 25, 2015, 11:06:11 PM
Blocks are not required to have any transactions in them.

i'm curious about this aspect... but the number of transactions per block is based on what? it's random?
It's based on how many transactions were broadcasted by the time while block was in process of solving, it isn't random lol and i don't see any rocket science in it, it's simple to understand.

Well, sure it's simple to understand for people more familiar with the matter, but always remember that there are people who are new to this. And when I first got to know about Bitcoin I also didn't know how it worked. It even took me some time to understand that the transaction fees of the transactions go to the person solving the respective block that include the transactions - crazy in retrospect!


Title: Re: Small Block
Post by: ausbit on April 28, 2015, 10:32:26 PM
Just seen this very small block,only one transaction.
https://blockchain.info/block/000000000000000009bf19c953cbcf0e2919dceec1c2107c4d93fdb2f948b2b8


Title: Re: Small Block
Post by: cr1776 on April 28, 2015, 11:15:23 PM
Just seen this very small block,only one transaction.
https://blockchain.info/block/000000000000000009bf19c953cbcf0e2919dceec1c2107c4d93fdb2f948b2b8

Miners can pick whatever transactions they wish to included in blocks, even zero (within the upper limits).


Title: Re: Small Block
Post by: cr1776 on April 28, 2015, 11:18:03 PM
This is actually interesting...


With these fast asics, they can find blocks so fast now, it is unpredictable when they will be found...

Recently, I had to wait 2 HOURS for a transaction to get 1 confirmation...

These are two different issues. Block times are adjusted every (roughly) two weeks so that the block frequency will be close to an average of every ten minutes.  Your confirmation time will vary based on many factors, including fees paid, number of transactions queued, the number of transactions the people who find the blocks decide to include in each block, whether the transaction included inputs that were unconfirmed etc.


Title: Re: Small Block
Post by: altcoinex on April 29, 2015, 04:43:13 AM
large fees or short block time.

Short block time? No one actually defines the block time deliberately! Fees also don't affect the time between blocks at all! Miners just try to find a new block as fast as possible and as soon as they find one, they publish it. Waiting for more transactions would be very risky, because you would end up risking your block-reward!

And a terrible risk! If you added more transactions, the block would change and the hash would be different, so you would have to re mine the block entirely -- not likely to beat someone else in doing so. A miner also isn't going to waste time NOT mining just because they don't have enough TX's and want to get more fees -- the fees arn't likely to surpass the 25BTC block reward. They will mine constantly regardless of the amount of TX, and will solve lve a block before having many or even any TX that qualify for their miners tx rules..

In the future after all the bitcoins have been released, wouldnt a small block such as this be extremely detrimental to the system? Suddenly your reward is based on the number of transactions, and no transaction = no reward...
The hope is that either (or more likely a combination of both):
A - The price will increase due to no new coins being produced/entering the market and increased use worldwide, making just TX fee's with no other block reward still have a significant amount of value and be worth mining for.
B - Either the amount/demand of transactions will increase and the fee amounts will endup higher out of need to ensure TX make it into a block.


Title: Re: Small Block
Post by: Cinnob0n on May 05, 2015, 12:05:16 AM
Blocks can be found as soon in less than a minute! Or they could possibly take a couple of hours. Rare for either them to happen though.  ;D