<p>First of all a meta note: lots of information on <a href="https://bitcoin.it" rel="nofollow noreferrer">https://bitcoin.it</a> is seriously outdated, including this.</p>
<blockquote>
<p>I don't really understand which of these two interpretations is meant here:</p>
<ol>
<li>The output referenced by the input must not be referenced by another input of a transaction already in the pool.</li>
<li>The output referenced by the input must not be present in a transaction already in</li>
</ol>
</blockquote>
<p>What is <em>meant</em> is (1). For a transaction to be acceptable, all outputs referred to by its inputs must exist (created by an output of a transaction that's either in the blockchain or in the mempool), and those outputs cannot be spent already (by an input of a transaction either in the blockchain or already in the mempool). A simpler way to state this would perhaps be: if all transactions currently in the mempool would confirm, the inputs of the transaction that is being verified must refer to outputs that still exist.</p>
<p>This isn't exactly true anymore. BIP125 (Replace-by-fee) will in some cases permit a transaction to be accepted when the mempool already has a transaction spending one of its inputs. In that case, the older transaction is removed and replaced with the newer one.</p>

CC BY-SA 4.0
2021-03-07T07:58:43.220Z
So, if we pretend replace by fee doesn't exist, this rule is about preventing multiple inputs in the pool referring to the same output. And when combined with another check to see if the output is not referenced in the blockchain either, it confirms that the referenced output is a UTXO. Is my understanding correct?
starikcetin
CC BY-SA 4.0
2021-03-06T18:48:40.717Z
2021-03-06T18:48:40.717Z
Pieter Wuille
<p>I am currently following the <a href="https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages" rel="nofollow noreferrer">&quot;tx&quot; messages section</a> of <a href="https://en.bitcoin.it/wiki" rel="nofollow noreferrer">en.bitcoin.it/wiki</a> website, and I need some clarity about the following rule regarding the validity of a transaction:</p>
<blockquote>
<ol start="9">
<li>For each input, if the referenced output exists in any other tx in the pool, reject this transaction.</li>
</ol>
</blockquote>
<p>I don't really understand which of these two interpretations is meant here:</p>
<ol>
<li>The output referenced by the input must not be referenced by another input of a transaction already in the pool.</li>
<li>The output referenced by the input must not be present in a transaction already in the pool.</li>
</ol>
<p>Or perhaps it means something else entirely?</p>

<transactions><protocol><transaction-verification>
What exactly does the "For each input, if the referenced output exists in any other tx in the pool, reject this transaction." tx validation rule mean?
starikcetin
# What exactly does the "For each input, if the referenced output exists in any other tx in the pool, reject this transaction." tx validation rule mean?

(Asked by: username_0 on 2021-03-06)

I am currently following the ["tx" messages section](https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages) of [en.bitcoin.it/wiki](https://en.bitcoin.it/wiki) website, and I need some clarity about the following rule regarding the validity of a transaction:

> 9. For each input, if the referenced output exists in any other tx in the pool, reject this transaction.

I don't really understand which of these two interpretations is meant here:

1. The output referenced by the input must not be referenced by another input of a transaction already in the pool.
2. The output referenced by the input must not be present in a transaction already in the pool.

Or perhaps it means something else entirely?

**Tags:** transactions, protocol, transaction-verification


---

## 1 answers

### Answer by username_1 on 2021-03-06. Score: 3 | Accepted answer

First of all a meta note: lots of information on <https://bitcoin.it> is seriously outdated, including this.

> I don't really understand which of these two interpretations is meant here:
>
> 1. The output referenced by the input must not be referenced by another input of a transaction already in the pool.
> 2. The output referenced by the input must not be present in a transaction already in

What is *meant* is (1). For a transaction to be acceptable, all outputs referred to by its inputs must exist (created by an output of a transaction that's either in the blockchain or in the mempool), and those outputs cannot be spent already (by an input of a transaction either in the blockchain or already in the mempool). A simpler way to state this would perhaps be: if all transactions currently in the mempool would confirm, the inputs of the transaction that is being verified must refer to outputs that still exist.

This isn't exactly true anymore. BIP125 (Replace-by-fee) will in some cases permit a transaction to be accepted when the mempool already has a transaction spending one of its inputs. In that case, the older transaction is removed and replaced with the newer one.

> **Comments:**
> **username_0**: So, if we pretend replace by fee doesn't exist, this rule is about preventing multiple inputs in the pool referring to the same output. And when combined with another check to see if the output is not referenced in the blockchain either, it confirms that the referenced output is a UTXO. Is my understanding correct?  

---

