<p>Yes, your client will fully verify each block it receives. </p>

<p>Your biggest issue with accepting 0-confirmation transactions is making sure an attacker can't send your node(s) a transaction that the rest of the network will discard as a double-spend. Basically you'll want to disallow direct connections to your node(s) and connect them to trusted nodes such as large miners. </p>

<p>This doesn't eliminate risk but reduces it somewhat to Finney attacks and an attacker getting lucky with getting the bad transaction to you through a big miner that ends up not putting that transaction in a block before the conflicting transaction is mined.</p>

CC BY-SA 3.0
2013-10-04T10:27:42.827Z
Thanks! I now understand the risk if my client's node(s) are traceable and/or use non-trusted node(s).
pvz
CC BY-SA 3.0
2013-10-04T22:08:31.813Z
For more information about the risks involved in accepting unconfirmed transactions see the recent papers by [Karame et al.](http://www.bitcointrading.com/pdf/doublespendbitcoin.pdf) and [Bamert et al.](http://www.tik.ee.ethz.ch/file/848064fa2e80f88a57aef43d7d5956c6/P2P2013_093.pdf) (disclaimer: I am an author of the second). They provide an in depth analysis into the causes and counter-measures.
cdecker
CC BY-SA 3.0
2013-10-04T06:00:12.603Z
2013-10-04T06:00:12.603Z
weex
<p>I run a 0-confirmation tool.
To track new transactions I use:</p>

<ol>
<li>bitcoind getrawmempool</li>
<li>new transactions in new block not available in mempool (it seems I do not receive all transactions in mempool before my client accepts a new block)</li>
</ol>

<p>I trust my bitcoin client transaction verification process (protocol rules).
(I expect it to do all the steps in: <a href="https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages" rel="nofollow">https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages</a>)</p>

<p>I expect I do not have the guarantee the client/person who created the new block has followed the protocol rules for the included transactions, so I want to check the 'missing' transaction from my mempool.</p>

<p>I know 6 confirmations is expected to be 'safe', but I would like to do a 0-confirmation (or 1-confirmation concerning a new block) as safe as possible.</p>

<p>1: Is every transaction checked by my bitcoind client before accepting a new block (local)?
(to be sure every transaction available in mempool and blockchain of my (official) client meet the protocol rules)</p>

<p>2: If 1. is not true: What bitcoind API, or (python) program is available to verify transactions included in a new block if they do meet the (official) protocol rules?</p>

<bitcoind><protocol><api><confirmations><transaction-verification>
Transaction verification
pvz
# Transaction verification

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

I run a 0-confirmation tool.
To track new transactions I use:

1. bitcoind getrawmempool
2. new transactions in new block not available in mempool (it seems I do not receive all transactions in mempool before my client accepts a new block)

I trust my bitcoin client transaction verification process (protocol rules).
(I expect it to do all the steps in: <https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages>)

I expect I do not have the guarantee the client/person who created the new block has followed the protocol rules for the included transactions, so I want to check the 'missing' transaction from my mempool.

I know 6 confirmations is expected to be 'safe', but I would like to do a 0-confirmation (or 1-confirmation concerning a new block) as safe as possible.

1: Is every transaction checked by my bitcoind client before accepting a new block (local)?
(to be sure every transaction available in mempool and blockchain of my (official) client meet the protocol rules)

2: If 1. is not true: What bitcoind API, or (python) program is available to verify transactions included in a new block if they do meet the (official) protocol rules?

**Tags:** bitcoind, protocol, api, confirmations, transaction-verification


---

## 1 answers

### Answer by username_1 on 2013-10-04. Score: 1 | Accepted answer

Yes, your client will fully verify each block it receives.

Your biggest issue with accepting 0-confirmation transactions is making sure an attacker can't send your node(s) a transaction that the rest of the network will discard as a double-spend. Basically you'll want to disallow direct connections to your node(s) and connect them to trusted nodes such as large miners.

This doesn't eliminate risk but reduces it somewhat to Finney attacks and an attacker getting lucky with getting the bad transaction to you through a big miner that ends up not putting that transaction in a block before the conflicting transaction is mined.

> **Comments:**
> **username_0**: Thanks! I now understand the risk if my client's node(s) are traceable and/or use non-trusted node(s).  
> **username_2**: For more information about the risks involved in accepting unconfirmed transactions see the recent papers by [Karame et al.](http://www.bitcointrading.com/pdf/doublespendbitcoin.pdf) and [Bamert et al.](http://www.tik.ee.ethz.ch/file/848064fa2e80f88a57aef43d7d5956c6/P2P2013_093.pdf) (disclaimer: I am an author of the second). They provide an in depth analysis into the causes and counter-measures.  

---

