How to actively measure mempool? 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:


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).
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.
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!
You should use full nodes on both sending and receiving end

Sending Tx


Use the -connect option 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. 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