# Determination of Block Size Limit

In Bitcoin Mining, there is a limit on the size of any block added to the chain. What happens if, for instance, a block's nonce is so large that the block's size exceeds the limit?

Secondary questions:

• Is there any systematic way of setting this limit without knowing how to break SHA256?

What happens if, for instance, a block's nonce is so large that the block's size exceeds the limit?

This post addresses the main question.
Don't think it is complete so I will append the following and let someone wiser mark it all.

1. A solo miner increments Nonce until it overflows.
2. Then it increments extraNonce, which is an integer of arbitrary precision, and resets Nonce.
3. extraNonce is located in the coinbase transaction, so changing it alters the Merkle tree.
4. extraNonce is reset based on the time.

As @Claris commented, and this post elaborates:

There are many blocks that could be the next one.
For many potential blocks, there is no value of the nonce that will give a hash less than the target.
When that happens, the node must alter something in the block header and try again...

Is there any systematic way of setting this limit without knowing how to break SHA256?

SHA256 has little to do with the validity of a block, having broken SHA256 in any way would not change the consensus rule of the block size. An invalid block with valid proof of work is still invalid, for example if it was larger than the rule specifying limits.

As an aside, no hash function has ever been broken in a way that would impact Bitcoins proof of work. Other than being too small, MD5 is completely suitable for POW despite being embarrassingly broken for any other task.

• 1) How can we know that there is definitely a 64bit int that satisfies the leading zeros constraint for any given block? Do nonces have to be given in a particular base? 2) Why can't we assume that the block is otherwise valid? If you could just calculate the nonce for a POW, wouldn't it undermine the notion of work? What qualities of MD5 make it suitable in spite of the potential for "workless" proofs? For either part, further reading material is very welcome! Cheers, Claris! Aug 19, 2021 at 23:17
• 4 bytes is 32 bits, it doesn’t really have a representation as a number necessarily, just a choice of some software. There’s absolutely no guarantee that any particular nonce field will satisfy the proof of work, miners may process billions of potential blocks before finding a single valid block. There’s another nonce elsewhere in the block which can be iterated on. Aug 19, 2021 at 23:21
• “Too large” is a consensus rule, same as proof of work. A block can not be accepted unless it satisfies all the rules, for side, format, transaction content, signatures, time stamp, and proof of work. MD5 just isn’t broken in a way which would allow for easier calculation of proof of work, to my knowledge no cryptographic hash function has ever been broken to that extent. Aug 19, 2021 at 23:23
• Hey @kendfss, I think you'll find these questions and answer interesting regarding your questions: 1) bitcoin.stackexchange.com/q/22978/5406, 2) bitcoin.stackexchange.com/q/80487/5406, bitcoin.stackexchange.com/q/148/5406, bitcoin.stackexchange.com/q/61759/5406
– Murch
Aug 20, 2021 at 0:17
• Hey Claris and @Murch thanks for the input! And sorry for the ignorant miscalculation. I've updated Claris' post with an elaboration, could you guys check if that's about right? Aug 21, 2021 at 0:38