Author

Topic: Is a block created in response to transactions or are blocks created for tx? (Read 208 times)

legendary
Activity: 2268
Merit: 18771
Or a block that has 100+  transactions compared to most of the blocks I saw using mempool.space have 1k+ to 3k+ just like block number 708290 to block 708297.
The number of transactions is not a good indicator for how full a block is, since transactions can vary hugely in size. For example, block 707,808 has only 67 transactions, but is still very close to being full at 3.9 million weight units, because it contains 10 very large consolidation transaction, each with several hundred inputs. Compare that, for example, to block 708,246, which has over 2000 transactions but is only a little over half full at 2.5 million weight units, as all the transactions it contains are much smaller.

So although blocks may contain fewer transactions when the mempool is empty, they may also contain fewer transactions when miners include transactions with a high weight or virtual size. It is better to look at the block weight as an indication for how empty a block is, not the number of transactions it contains.
legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
hero member
Activity: 2268
Merit: 669
Bitcoin Casino Est. 2013
Blocks are created at an average time interval regardless of how many transactions it carries. It is comparable to a train leaving the station at a specific time, whether all the required passengers have boarded or not.

For example this block has only one transaction (which is a transaction for the mining reward)
it's considered an empty block as far as other transactions in the network are concerned.
Or a block that has 100+  transactions compared to most of the blocks I saw using mempool.space have 1k+ to 3k+ just like block number 708290 to block 708297. This mostly happen when there are less people made transactions. It usually happen on weekends in my local time and sometimes on monday. The difference is even the transactions that are made first but didn't get on board. Reason for that is the transaction fee or the fare.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
Please redirect if proper resource.
Redirect you to a resource?
You're gonna enjoy this Bitcoin resource website, most topics has visual aids:

If there's anything you'd like to know, you can use the search field above and select from the "Beginners" and "Technical" results.
legendary
Activity: 2268
Merit: 18771
Is there any rational reason miners would mine a block with one tx?
The only reason most miners would mine a block with no other transactions is if they find a block very quickly after another one.

When a miner receives the information that another miner has mined a block, that miner has to validate that block and then cross reference every transaction within that block against their own database of unconfirmed transactions, and remove all the unconfirmed transactions which have now been confirmed. If they tried to mine a block which contained a transaction which had already been confirmed, that block would be invalid and would be rejected. That process can take a few seconds. In the meantime, instead of just stopping all their mining activity and letting their machines sit idle, they simply try to mine an empty block which cannot be rejected for containing an already confirmed transaction, since it doesn't contain any transactions. Rarely, they are successful, and mine an empty block but still claim the (currently) 6.25 BTC block reward. Usually they are not successful, and once they know which transactions are now confirmed, they build a new block filled with the unconfirmed transaction with the highest feerate, and try to mine that instead.

Do miners choose which blocks to mine in the hope they mine a block which has a reward? Is that how it works?
Every block has a base block reward of (currently) 6.25 BTC. Miners build what is called a candidate block, where they create a block they want to mine filled with whichever transactions they want, which are usually the transactions with the highest feerate. Every miner will have a slightly different candidate block. Each miner then tries to solve the necessary hash equation for their own candidate block. Whichever miner is successful first, mines their candidate block and broadcasts it to everyone else.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
but…

what is a block?

Bitcoin work with a blockchain, a ledger where all transactions are recorded safely.
This blockchain resides on the HDDs of all the people who run Bitcoin core software.

Every time something new is added to the blockchain, it's added as a block, a safely "sealed" "container" that contains link to the previous block(s) and usually contains transactions too.

A more exact description is in the wiki: https://en.bitcoin.it/wiki/Block_chain and https://en.bitcoin.it/wiki/Block
newbie
Activity: 11
Merit: 0
Thanks everyone for your replies.
I’ve read/checked out all links.

I can see the data included in the block, the txs, etc.

but…

what is a block?
newbie
Activity: 11
Merit: 0
On the basis BTC has only 21m Bitcoins, could it be conceivable that miners could build the BTC blockchain without any transactions? Obviously it would be not lucrative potentially, trying to understand the blockchain protocol.
Please redirect if proper resource.

What you have described is known as the empty blocks attack, where miners, or rather, operators of mining pools, collude and start to mine only blocks that are empty while rejecting the blocks that contain transactions. The thing is that miners violate no protocol rules when constructing a block that consists of only one coinbase transaction (block subsidy). As a miner, you are free to choose what should be included in a block and what should not. If your primary goal is to minimize your profit, to lose money on electricity and mining equipment, to come last in the race among miners, no one can stop you from doing that, no one is able to prevent you from destroying your own business. Given that the mining industry is a highly competitive business where rational actors tend to maximize their profits, other miners will happily support your irrational decision not to add transactions in a block.

Understood. Is there any rational reason miners would mine a block with one tx? Do miners choose which blocks to mine in the hope they mine a block which has a reward? Is that how it works?
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
On the basis BTC has only 21m Bitcoins, could it be conceivable that miners could build the BTC blockchain without any transactions? Obviously it would be not lucrative potentially, trying to understand the blockchain protocol.
Please redirect if proper resource.

As said, block creation is not related to the number (or existence) of transactions to be included. Block creation is just made in a way to ensure ~6 blocks per hour on average.
Since you asked for resource, I hope that maybe the Controlled supply page of Bitcoin Wiki could help. Maybe also the Difficulty too.
legendary
Activity: 2464
Merit: 4415
🔐BitcoinMessage.Tools🔑
On the basis BTC has only 21m Bitcoins, could it be conceivable that miners could build the BTC blockchain without any transactions? Obviously it would be not lucrative potentially, trying to understand the blockchain protocol.
Please redirect if proper resource.

What you have described is known as the empty blocks attack, where miners, or rather, operators of mining pools, collude and start to mine only blocks that are empty while rejecting the blocks that contain transactions. The thing is that miners violate no protocol rules when constructing a block that consists of only one coinbase transaction (block subsidy). As a miner, you are free to choose what should be included in a block and what should not. If your primary goal is to minimize your profit, to lose money on electricity and mining equipment, to come last in the race among miners, no one can stop you from doing that, no one is able to prevent you from destroying your own business. Given that the mining industry is a highly competitive business where rational actors tend to maximize their profits, other miners will happily support your irrational decision not to add transactions in a block.
copper member
Activity: 2128
Merit: 1814
฿itcoin for all, All for ฿itcoin.
Blocks are created at an average time interval regardless of how many transactions it carries. It is comparable to a train leaving the station at a specific time, whether all the required passengers have boarded or not.

For example this block has only one transaction (which is a transaction for the mining reward)
it's considered an empty block as far as other transactions in the network are concerned.
legendary
Activity: 2268
Merit: 18771
On the basis BTC has only 21m Bitcoins
The limit on the number of bitcoin which will ever be in circulation makes essentially no difference to the mining of blocks. All that changes from this point of view how many new bitcoins each block will generate.

could it be conceivable that miners could build the BTC blockchain without any transactions?
Absolutely, but they would lose out on the revenue generated by collecting transaction fees.

trying to understand the blockchain protocol
A block is mined on average every 10 minutes. This is a constant process, even if there are no or very few transactions waiting to be mined. Blocks can be mined with no transactions in them at all. Which transactions make it in to the next block is determined by the miner who finds that block, but most miners will prioritize the transactions paying the highest feerate.
sr. member
Activity: 310
Merit: 727
---------> 1231006505
A block isn't created in response to transactions. Especially in the beginning of the network almost all blocks were empty and contained only a single transaction for the block reward. Althought it is a bit more rare now empty blocks are still created once in a while.
newbie
Activity: 11
Merit: 0
On the basis BTC has only 21m Bitcoins, could it be conceivable that miners could build the BTC blockchain without any transactions? Obviously it would be not lucrative potentially, trying to understand the blockchain protocol.
Please redirect if proper resource.
Thanks
Ben
Jump to: