<p>You should use full nodes on both sending and receiving end</p>

<h2>Sending Tx</h2>

<ul>
<li>Use the <em>-connect</em> <a href="https://bitcoin.stackexchange.com/questions/41426/how-do-i-configure-bitcoin-core-to-connect-always-to-a-particular-node">option</a> to broadcast your tx through selected neighbours. Use <a href="https://bitnodes.21.co/" rel="nofollow noreferrer">https://bitnodes.21.co/</a> to find neighbours. Use the wallet commands in bitcoind and send a transaction to address in your own wallet</li>
</ul>

<h2>Receiving Tx</h2>

<ul>
<li>Use <em>-walletnotify</em> option in bitcoind to get notifcation of incoming wallet transaction. I don't think it is easy to receive mempool tx without validating the blockchain first. Anyway this is one time effort, once you have it synced on one node you can easily copy the whole <em>.bitcoin</em> directory to other nodes.</li>
</ul>

<p>About language you don't need to use C++ at all. For sending tx you need to do <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)" rel="nofollow noreferrer">RPC calls</a>. This can be easily done using bash commands or you can use <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow noreferrer">https://github.com/jgarzik/python-bitcoinrpc</a> in python. For receiving, the notify script can be any language php/python, it will just get your tx id as parameter and then you can do whatever you want.</p>

<p>Don't worry about spam. Its difficult to spam the network unless you have lots of bitcoins to waste in tx fees. Just make sure you put enough tx fees so that it get relayed through the network. For your experiment, you can actually try with different tx fees to observe the propagation time through the network.</p>

<p>Let me know when your research is over. Curious to see the results :D</p>

CC BY-SA 3.0
2017-05-26T05:46:24.803Z
This is very helpful - thanks! I will definitely keep you posted. Can you elaborate more on how larger fees affect propagation? I was not aware of the relation (and it will affect my research budget, or the scale of my experiment)
UriCS
CC BY-SA 3.0
2017-05-26T05:56:43.940Z
This basically depends on the minrelaytxfee on the node https://github.com/bitcoin/bitcoin/blob/v0.11.0/doc/release-notes.md#transaction-flooding.  Only thing is tx fee doesn't need to be very low. I don't think you will get any difference in propagation after tx fee crosses a barrier.
dark knight
CC BY-SA 3.0
2017-05-26T06:04:55.047Z
Got it. I will experiment, but do you have any notion of the approximate satoshi/Byte we are talking about? I want to plan ahead correctly. according to https://bitcoinfees.21.co/ it appears even 1-30 satoshi work. Thanks again!
UriCS
CC BY-SA 3.0
2017-05-26T06:11:47.530Z
Default value is 1000 satoshi per KB https://bitcoin.stackexchange.com/questions/48235/what-is-the-minrelaytxfee. So, yes even 1 satoshi/byte could work.
dark knight
CC BY-SA 3.0
2017-05-26T06:14:04.953Z
You rock dude. I would upvote you but my account is too noob to allow it, and my stack overflow is too noob to merge my reputation across domains. Thanks!
UriCS
CC BY-SA 3.0
2017-05-26T05:39:57.400Z
2017-05-26T05:39:57.400Z
dark knight
<p>For research purposes, I want to send transactions to the Bitcoin network and measure when they are received (yes, I am aware of existing websites which have statistics about these averages, but they can't provide me with more detailed statistics).</p>

<p>Specifically, I want to:</p>

<ol>
<li>Send transactions through multiple nodes that should have different outbound neighbors (I don't want all my transactions to be tunneled through the same neighbors).</li>
<li>Receive the transactions at other nodes under my control (for measurements), but I would like to avoid having these nodes validate the entire blockchain first.</li>
<li>Avoid unintended spam attack.</li>
</ol>

<p>Should I use full nodes, half nodes, or something else? Is there a well documented and easy to read implementation that I might find useful for my purpose (C++ isn't usually my go-to tool)? Any sort of advice will be highly appreciated.</p>

<p>If I am not mistaken, this should not cause a spam attack since the transactions will all come from newly created coins (if that is the right term) and should be prioritized below almost all the real transactions, but please correct me if I got this wrong.</p>

<p>P.S. please assume I am an idiot, so spell out stuff like "oh, just use RPC"... thanks!</p>

<transactions><bitcoin-core><nodes><mempool><spam>
How to actively measure mempool?
UriCS
# How to actively measure mempool?

(Asked by: username_0 on 2017-05-26)

For research purposes, I want to send transactions to the Bitcoin network and measure when they are received (yes, I am aware of existing websites which have statistics about these averages, but they can't provide me with more detailed statistics).

Specifically, I want to:

1. Send transactions through multiple nodes that should have different outbound neighbors (I don't want all my transactions to be tunneled through the same neighbors).
2. Receive the transactions at other nodes under my control (for measurements), but I would like to avoid having these nodes validate the entire blockchain first.
3. Avoid unintended spam attack.

Should I use full nodes, half nodes, or something else? Is there a well documented and easy to read implementation that I might find useful for my purpose (C++ isn't usually my go-to tool)? Any sort of advice will be highly appreciated.

If I am not mistaken, this should not cause a spam attack since the transactions will all come from newly created coins (if that is the right term) and should be prioritized below almost all the real transactions, but please correct me if I got this wrong.

P.S. please assume I am an idiot, so spell out stuff like "oh, just use RPC"... thanks!

**Tags:** transactions, bitcoin-core, nodes, mempool, spam


---

## 1 answers

### Answer by username_1 on 2017-05-26. Score: 4 | Accepted answer

You should use full nodes on both sending and receiving end

## Sending Tx

* Use the *-connect* [option](https://bitcoin.stackexchange.com/questions/41426/how-do-i-configure-bitcoin-core-to-connect-always-to-a-particular-node) to broadcast your tx through selected neighbours. Use <https://bitnodes.21.co/> to find neighbours. Use the wallet commands in bitcoind and send a transaction to address in your own wallet

## Receiving Tx

* Use *-walletnotify* option in bitcoind to get notifcation of incoming wallet transaction. I don't think it is easy to receive mempool tx without validating the blockchain first. Anyway this is one time effort, once you have it synced on one node you can easily copy the whole *.bitcoin* directory to other nodes.

About language you don't need to use C++ at all. For sending tx you need to do [RPC calls](https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)). This can be easily done using bash commands or you can use <https://github.com/jgarzik/python-bitcoinrpc> in python. For receiving, the notify script can be any language php/python, it will just get your tx id as parameter and then you can do whatever you want.

Don't worry about spam. Its difficult to spam the network unless you have lots of bitcoins to waste in tx fees. Just make sure you put enough tx fees so that it get relayed through the network. For your experiment, you can actually try with different tx fees to observe the propagation time through the network.

Let me know when your research is over. Curious to see the results :D

> **Comments:**
> **username_0**: This is very helpful - thanks! I will definitely keep you posted. Can you elaborate more on how larger fees affect propagation? I was not aware of the relation (and it will affect my research budget, or the scale of my experiment)  
> **username_1**: This basically depends on the minrelaytxfee on the node https://github.com/bitcoin/bitcoin/blob/v0.11.0/doc/release-notes.md#transaction-flooding.  Only thing is tx fee doesn't need to be very low. I don't think you will get any difference in propagation after tx fee crosses a barrier.  
> **username_0**: Got it. I will experiment, but do you have any notion of the approximate satoshi/Byte we are talking about? I want to plan ahead correctly. according to https://bitcoinfees.21.co/ it appears even 1-30 satoshi work. Thanks again!  
> **username_1**: Default value is 1000 satoshi per KB https://bitcoin.stackexchange.com/questions/48235/what-is-the-minrelaytxfee. So, yes even 1 satoshi/byte could work.  
> **username_0**: You rock dude. I would upvote you but my account is too noob to allow it, and my stack overflow is too noob to merge my reputation across domains. Thanks!  

---

