Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Kazimir on March 16, 2014, 06:19:33 PM



Title: How can I see or detect how many peers have seen a transaction?
Post by: Kazimir on March 16, 2014, 06:19:33 PM
Some clients such as MultiBit or Mycelium show how many peers have seen a certain transaction. To give an indication of its propagation throughout the network.

How do they do this?


Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: jimmyscratchlab on March 16, 2014, 08:24:13 PM


https://en.bitcoin.it/wiki/Network


Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: Kazimir on March 16, 2014, 09:56:49 PM
Do you mean my Bitcoin node can only tell how many peers have sent a 'getdata' request in response to my node's 'inv' message?

Is there a way I can see or estimate how many nodes have seen someone else's transaction? This would require me knowing about it, of course, but suppose I do. I have just seen someone do a tx and I wanna see how fast it propagates. What are my options?



Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: grau on March 16, 2014, 10:01:22 PM
Connect to a large number of random nodes and send them getdata for the tx.


Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: Kazimir on March 16, 2014, 10:13:16 PM
Connect to a large number of random nodes and send them getdata for the tx.
Thanks, makes sense. What's a good way to connect to a large number of nodes? Is there some way I can get a list of nodes, preferably distributed all over the world?


Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: Mike Hearn on March 17, 2014, 01:09:52 PM
bitcoinj just watches for inv messages.


Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: malevolent on March 17, 2014, 09:08:37 PM
What's a good way to connect to a large number of nodes? Is there some way I can get a list of nodes, preferably distributed all over the world?

Add addnode=<ip> entries in bitcoin.conf, or use the addnode=<ip> argument in command-line, if you want to connect to more than 125 nodes (https://github.com/bitcoin/bitcoin/blob/master/src/net.cpp#L64), then I think you will need to change -maxconnections=<x> to something higher.
Blockchain.info is very well connected so you could add some of the nodes they are connected to: https://blockchain.info/ip-log


Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: Kazimir on March 18, 2014, 10:01:41 AM
Does bitcoind / Bitcoin-Qt by default relay *all* txs it receives? I mean not just the tx I send from my wallet, but also forwarding any txs it receives from any of its connected nodes to all other nodes?

Blockchain.info is very well connected so you could add some of the nodes they are connected to: https://blockchain.info/ip-log
Not at the moment :( (but good tip, thanks ;))


Title: Re: How can I see or detect how many peers have seen a transaction?
Post by: malevolent on March 18, 2014, 01:02:59 PM
Blockchain.info is very well connected so you could add some of the nodes they are connected to: https://blockchain.info/ip-log
Not at the moment :( (but good tip, thanks ;))

http://webcache.googleusercontent.com/search?q=cache%3Ahttps%3A%2F%2Fblockchain.info%2Fip-log&oq=cache%3Ahttps%3A%2F%2Fblockchain.info%2Fip-log&aqs=chrome..69i57j69i58.1512j0j4&sourceid=chrome&espv=210&es_sm=122&ie=UTF-8

other pages also seem to be cached, though I only checked the first three.