<p>Yes, a block is made up of a number of transactions. </p>

<p>There's no requirement that any transaction go to any particular block, but if it is a valid transaction and has sufficient priority, it will be included into one of the next few blocks.</p>

<p>Yes an unconfirmed transaction is one that hasn't yet been included into a block.</p>

<p>No, older blocks are immutable. Roughly, think of the blockchain as an append-only ledger of bitcoin transactions. </p>

<p>For more info, see <a href="http://spectrum.ieee.org/img/06Bitcoin-1338412974774.jpg" rel="nofollow">http://spectrum.ieee.org/img/06Bitcoin-1338412974774.jpg</a> , <a href="https://en.bitcoin.it/wiki/How_bitcoin_works" rel="nofollow">https://en.bitcoin.it/wiki/How_bitcoin_works</a> , and <a href="http://bitcoin.org/bitcoin.pdf" rel="nofollow">http://bitcoin.org/bitcoin.pdf</a></p>

CC BY-SA 3.0
2013-04-01T13:42:21.117Z
2013-04-01T13:42:21.117Z
nanotube
<p>You're quite right. The block chain is a list of blocks, and each block contains a list of transactions. Together they form an authorative and global ordering on all transactions.</p>

<p>An unconfirmed transaction is indeed a transaction that is not yet in a block. Miners build new blocks to extend the chain, and use unconfirmed transactions to fill them. Once a block is made, it is immutable, so older blocks are never modified, only new ones are appended.</p>

CC BY-SA 3.0
2013-04-01T13:43:39.267Z
2013-04-01T13:43:39.267Z
Pieter Wuille
<p>Yes, <strong>block</strong> is a list of <strong>transaction</strong>.</p>

<ul>
<li><p>Your <strong>transaction</strong> does not go to a specific <strong>block</strong>. A <strong>miner</strong> chooses a
list of transactions and work on them to "<strong>solve</strong>" the block and once a
block is "solved", it is broadcast to the network, and all the transactions in the block becomes confirmed.</p></li>
<li><p>0-confirmed or unconfirmed transaction is one which is not yet
included in any block.</p></li>
<li><p>A miner cannot modify (adding or removing transactions) a block which is "solved",</p></li>
</ul>

CC BY-SA 3.0
2014-07-22T12:51:10.927Z
2014-07-22T12:51:10.927Z
zak
<p>The initial statement is correct. The blockchain is the list of all solved blocks, essentially the ledger of all transactions completed in the Bitcoin network. Each block contains (among a few other things) a list of transactions.</p>

<p>When you do a transaction, it is not destined for a specific block. You merely publish your transaction to the network and it goes onto the list of unconfirmed transactions. (There is actually no one authoritative list, however, everyone on the network keeps their own list and distributes it to others to whom they are connected.) Miners (who solve the hashing puzzles required to "solve" a block and make it official) will typically include all unconfirmed transactions in the blocks they create. But they may not. They may just not have received your transaction in their part of the network yet. Or, if your transaction didn't have a fee included, they may only be willing to process transactions with fees. Technically, they are under no obligation about which transactions to include in the block. But since miners get fees from many transactions, and miners benefit from the strength of the Bitcoin network, transactions are typically quickly included in a block.</p>

<p>To answer your second bullet, yes, an unconfirmed transaction is one that has not yet been included in a block.</p>

<p>And to answer your final bullet, no, new transactions cannot be added to older blocks. The "solution" to a block is a mathematically hard puzzle to solve, and it is based on the transactions that are included. So, if you added a transaction to an older block it wouldn't be the same block any more. And the "solution" wouldn't work either, so it would essentially have to be re-mined.</p>

<p>And to further complicate adding a transaction to an older block, each block also includes a piece of information from the previous block in the block chain. Meaning that if you added a transaction to an older block (or modified it in any way), you would not only have to re-solve the old block, but you would have to re-solve all blocks between that block and the current block. And since no one would recognize your re-solved blocks unless you were able to create an even longer blockchain than what currently exists, it isn't realistic to be able to do so. You would have an extremely large amount of processing to and you would have to solve it considerably faster than the rest of the world was working on the old block chain. (The exception is if you have more mining computing power than everyone else in the world combined. This is sometimes called the 51% problem.)</p>

<p>This is all by design. The point of the block chain is that the history of transactions is unalterable and mutually agreed upon as the truth. If it were possible to add transactions into the past, you could change that history. And, for example, spend the same bitcoins twice. But because of this chaining of bitcoins that isn't possible. (It is also why most people don't consider a transaction final until it has "6 confirmations". What "6 confirmations" really means is that the block that it is included in is 6 deep in the block chain. At that point the block chain is deep that it is considered completely unalterable.</p>

CC BY-SA 3.0
2018-03-19T12:11:27.310Z
Nice, but do the blockchain has a limitation on the maximum number of blocks?
Hany Sakr
CC BY-SA 4.0
2019-03-06T01:37:51.507Z
@HanySakr No, there is no limit on the size of the blockchain, but in practice full nodes need to have enough memory to hold the while blockchain in memory. But this can vary depending on the protocol.
Damian
CC BY-SA 3.0
2013-04-01T13:44:40.797Z
2013-04-01T19:18:09.073Z
2013-04-01T19:18:09.073Z
David Ogren
<p>I don't quite understand the relation between a <code>transaction</code> and a <code>block</code>.
I imagine it as a list of blocks, and each block having a list of transactions but I have some doubts.</p>

<p>When I do a transaction...</p>

<ul>
<li>It should go to a specific <code>block</code>?</li>
<li>An unconfirmed <code>transaction</code> is a transaction which is not inside a <code>block</code>?</li>
<li>Can the miner add the new <code>transaction</code> to an older <code>block</code>? Once a block is solved, new transactions can be added?</li>
</ul>

<transactions><block>
Which is the relation between transactions and blocks?
Macarse
# Which is the relation between transactions and blocks?

(Asked by: username_0 on 2013-04-01)

I don't quite understand the relation between a `transaction` and a `block`.
I imagine it as a list of blocks, and each block having a list of transactions but I have some doubts.

When I do a transaction...

* It should go to a specific `block`?
* An unconfirmed `transaction` is a transaction which is not inside a `block`?
* Can the miner add the new `transaction` to an older `block`? Once a block is solved, new transactions can be added?

**Tags:** transactions, block


---

## 4 answers

### Answer by username_4 on 2013-04-01. Score: 16 | Accepted answer

The initial statement is correct. The blockchain is the list of all solved blocks, essentially the ledger of all transactions completed in the Bitcoin network. Each block contains (among a few other things) a list of transactions.

When you do a transaction, it is not destined for a specific block. You merely publish your transaction to the network and it goes onto the list of unconfirmed transactions. (There is actually no one authoritative list, however, everyone on the network keeps their own list and distributes it to others to whom they are connected.) Miners (who solve the hashing puzzles required to "solve" a block and make it official) will typically include all unconfirmed transactions in the blocks they create. But they may not. They may just not have received your transaction in their part of the network yet. Or, if your transaction didn't have a fee included, they may only be willing to process transactions with fees. Technically, they are under no obligation about which transactions to include in the block. But since miners get fees from many transactions, and miners benefit from the strength of the Bitcoin network, transactions are typically quickly included in a block.

To answer your second bullet, yes, an unconfirmed transaction is one that has not yet been included in a block.

And to answer your final bullet, no, new transactions cannot be added to older blocks. The "solution" to a block is a mathematically hard puzzle to solve, and it is based on the transactions that are included. So, if you added a transaction to an older block it wouldn't be the same block any more. And the "solution" wouldn't work either, so it would essentially have to be re-mined.

And to further complicate adding a transaction to an older block, each block also includes a piece of information from the previous block in the block chain. Meaning that if you added a transaction to an older block (or modified it in any way), you would not only have to re-solve the old block, but you would have to re-solve all blocks between that block and the current block. And since no one would recognize your re-solved blocks unless you were able to create an even longer blockchain than what currently exists, it isn't realistic to be able to do so. You would have an extremely large amount of processing to and you would have to solve it considerably faster than the rest of the world was working on the old block chain. (The exception is if you have more mining computing power than everyone else in the world combined. This is sometimes called the 51% problem.)

This is all by design. The point of the block chain is that the history of transactions is unalterable and mutually agreed upon as the truth. If it were possible to add transactions into the past, you could change that history. And, for example, spend the same bitcoins twice. But because of this chaining of bitcoins that isn't possible. (It is also why most people don't consider a transaction final until it has "6 confirmations". What "6 confirmations" really means is that the block that it is included in is 6 deep in the block chain. At that point the block chain is deep that it is considered completely unalterable.

> **Comments:**
> **username_5**: Nice, but do the blockchain has a limitation on the maximum number of blocks?  
> **username_6**: @username_5 No, there is no limit on the size of the blockchain, but in practice full nodes need to have enough memory to hold the while blockchain in memory. But this can vary depending on the protocol.  

---

### Answer by username_1 on 2013-04-01. Score: 4

Yes, a block is made up of a number of transactions.

There's no requirement that any transaction go to any particular block, but if it is a valid transaction and has sufficient priority, it will be included into one of the next few blocks.

Yes an unconfirmed transaction is one that hasn't yet been included into a block.

No, older blocks are immutable. Roughly, think of the blockchain as an append-only ledger of bitcoin transactions.

For more info, see <http://spectrum.ieee.org/img/06Bitcoin-1338412974774.jpg> , <https://en.bitcoin.it/wiki/How_bitcoin_works> , and <http://bitcoin.org/bitcoin.pdf>


---

### Answer by username_2 on 2013-04-01. Score: 2

You're quite right. The block chain is a list of blocks, and each block contains a list of transactions. Together they form an authorative and global ordering on all transactions.

An unconfirmed transaction is indeed a transaction that is not yet in a block. Miners build new blocks to extend the chain, and use unconfirmed transactions to fill them. Once a block is made, it is immutable, so older blocks are never modified, only new ones are appended.


---

### Answer by username_3 on 2014-07-22. Score: 1

Yes, **block** is a list of **transaction**.

* Your **transaction** does not go to a specific **block**. A **miner** chooses a
  list of transactions and work on them to "**solve**" the block and once a
  block is "solved", it is broadcast to the network, and all the transactions in the block becomes confirmed.
* 0-confirmed or unconfirmed transaction is one which is not yet
  included in any block.
* A miner cannot modify (adding or removing transactions) a block which is "solved",


---

