<p>When you run P2P functional tests you are spinning up regtest nodes (running simplified Python code) that connect to your full node (running the full C++ code) to test P2P functionality.</p>
<p>As John Newbery outlines <a href="https://github.com/bitcoin/bitcoin/pull/19760" rel="nofollow noreferrer">here</a>:</p>
<blockquote>
<p>A <strong>node</strong> is the bitcoind instance. This is the thing whose behavior
is being tested. Each bitcoind node is managed by a Python TestNode
object which is used to start/stop the node, manage the node's data
directory, read state about the node (eg process status, log file),
and interact with the node over different interfaces.</p>
<p>One of the interfaces that we can use to interact with the node is the
P2P interface. Each connection to a node using this interface is
managed by a Python P2PInterface or derived object (which is owned by
the TestNode object). We can open zero, one or many P2P connections to
each bitcoind node. The node sees these connections as <strong>peers</strong>.</p>
<p>For historic reasons, the word <strong>mininode</strong> has been used to refer to
those P2P interface objects that we use to connect to the bitcoind
node (the code was originally taken from the 'mini-node' branch of
<a href="https://github.com/jgarzik/pynode/tree/mini-node" rel="nofollow noreferrer">https://github.com/jgarzik/pynode/tree/mini-node</a>).</p>
</blockquote>
<p>However, this <a href="https://github.com/bitcoin/bitcoin/pull/19760" rel="nofollow noreferrer">PR 19760</a> (merged in August 2020) has removed all references to <strong>mininode</strong> and so no code or current docs in the Bitcoin Core repo currently refer to mininode. Obviously previous PRs and outdated documentation outside the repo will still refer to mininode.</p>

CC BY-SA 4.0
2020-09-14T10:10:16.940Z
2020-09-14T10:26:14.453Z
2020-09-14T10:26:14.453Z
Michael Folkson
<p>I am learning about the <a href="https://github.com/bitcoin/bitcoin/blob/master/test/functional/README.md" rel="nofollow noreferrer">functional test</a> framework in Bitcoin Core. I am seeing the terms &quot;node&quot;, &quot;peer&quot; and &quot;mininode&quot; being used. How are these defined and how are they different?</p>

<bitcoin-core-development><p2p><functional-test>
What is the difference between node, peer and mininode in the functional test framework in Bitcoin Core?
Michael Folkson
# What is the difference between node, peer and mininode in the functional test framework in Bitcoin Core?

(Asked by: username_0 on 2020-09-14)

I am learning about the [functional test](https://github.com/bitcoin/bitcoin/blob/master/test/functional/README.md) framework in Bitcoin Core. I am seeing the terms "node", "peer" and "mininode" being used. How are these defined and how are they different?

**Tags:** bitcoin-core-development, p2p, functional-test


---

## 1 answers

### Answer by username_0 on 2020-09-14. Score: 2 | Accepted answer

When you run P2P functional tests you are spinning up regtest nodes (running simplified Python code) that connect to your full node (running the full C++ code) to test P2P functionality.

As John Newbery outlines [here](https://github.com/bitcoin/bitcoin/pull/19760):

> A **node** is the bitcoind instance. This is the thing whose behavior
> is being tested. Each bitcoind node is managed by a Python TestNode
> object which is used to start/stop the node, manage the node's data
> directory, read state about the node (eg process status, log file),
> and interact with the node over different interfaces.
>
> One of the interfaces that we can use to interact with the node is the
> P2P interface. Each connection to a node using this interface is
> managed by a Python P2PInterface or derived object (which is owned by
> the TestNode object). We can open zero, one or many P2P connections to
> each bitcoind node. The node sees these connections as **peers**.
>
> For historic reasons, the word **mininode** has been used to refer to
> those P2P interface objects that we use to connect to the bitcoind
> node (the code was originally taken from the 'mini-node' branch of
> <https://github.com/jgarzik/pynode/tree/mini-node>).

However, this [PR 19760](https://github.com/bitcoin/bitcoin/pull/19760) (merged in August 2020) has removed all references to **mininode** and so no code or current docs in the Bitcoin Core repo currently refer to mininode. Obviously previous PRs and outdated documentation outside the repo will still refer to mininode.


---

