Can a Bitcoin block be less than 1mb?
To my understanding, a miner receives broadcasts. However, if not enough transactions come in, then would it just prematurely hash the block?
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityCan a Bitcoin block be less than 1mb?
To my understanding, a miner receives broadcasts. However, if not enough transactions come in, then would it just prematurely hash the block?
Yes. Let's calculate the minimum size of a block:
The block header must be exactly 80 bytes. This is the only part of the block that miners actually mine; the rest of the block is data that the header securely references.
The transaction count. This isn't part of the block header and it isn't part of the block data, but it's part of the peer-to-peer protocol block message so it gets counted towards the block size. For blocks with 253 or fewer transactions, this is 1 byte.
The coinbase transaction, the only required transaction in a block. The coinbase transaction has the following fields with these minimum values:
Total minimum block size: 80 + 1 + 55 = 136 bytes
Practically, the smallest reasonable blocks are in the 180-byte range.
vout
would make the transaction invalid. You would need to have one output of 0 BTC, 0 length, null script for a total 9 bytes (8 byte value, one byte VarInt). This would also be an anyone can spend output as a null script can be satisfied by pushing anything to the stack.
Blocks have to have at least one transaction: They must contain a coinbase which is the transaction that spends the block reward.
For example this block with only one transaction is only 0.246 kB
.