# How is it possible that transactions can be added to a block currently being mined?

It seems counter-intuitive that the current block can be hashed and transactions can be added to it, however that is what this thread indicates.

Can someone help me connect the dots (not necessarily regarding that linked network attack) and understand how something under active computation can have its underlying data (list of transactions) changed?

In other words, if a tx isn't "bound" to a block via hashing, how do they relate to each other?

You're thinking that mining a block is a single long computing process, like computing the trillionth digit of pi or something like that. This is wrong. Each attempt at solving a block takes almost no time at all, and each attempt is independent of the others. Miners make many attempts every second. Each attempt has a very small chance of solving the block. It's a lottery, not a race. Modifying the block between attempts isn't a problem.

Another common misconception related to this is that everyone is working on the same block. This is also false. Every miner works on a different block.

• I'll add to answer the OP's last question - the binding between a transaction and the work involved in finding a block is probabilistic. You could find a valid block with the transaction computing just one hash. But the probability of this is negligible, and the block proves that, on average, a lot of computational work was done acknowledging this transaction. – Meni Rosenfeld Dec 11 '12 at 15:19

Mining is a series of independent attempts at finding a good hash for a block. Since all attempts are independent from each other, modifying the block between one attempt and the other have no negative effect.

Just adding to the other answers. A transaction is still bound to a block and the block hash still has to match with the transaction included. However, when more transactions are added, the next attempt will create the hash of a different block. Using this new hash with the previous block will not be accepted by the network. So from what I gather, when attempting the hashing, they not only change the nonce but the data as well. The probability to succeed is the same either way.