0

The transaction data returned by the BlockCypher's API includes the "relayed_by" field, which the documentation describes as "Address of the peer that sent us this transaction". Is this the IP address of the original node that broadcasts the transaction?

In general, we're trying to gather geographical data of the transactions; is there a reliable way to do so?

1

It's the IP address of the node that first sent us the transaction. As transaction broadcast works a bit like gossip, it's not guaranteed to be the original node (it could be a node "in the middle"). However, as BlockCypher is connected to quite a few nodes on the network, so over multiple transactions you're highly likely to be able to identify the right originating IP.

This is not a bulletproof method, as a more sophisticated attacker could just use Tor for transactions broadcast. Practically this is the exception and quite frankly, simply using a web wallet with a good VPN is a much simpler way to achieve a similar level of anonimity.

So for most applications you can get a fairly accurate originating IP address using relayed_by over multiple transactions.

Full disclosure: I'm CTO and co-founder at BlockCypher.

  • wow somehow I didn't expect someone from BlockCypher to answer this; thanks so much! Since blockchain.info is so buggy right now BlockCypher is definitely our go-to. – dhmq Jun 28 '18 at 19:47
0

EDIT: I misread the question, my answer pertains to blocks, not transactions.

...includes the "relayed_by" field, which the documentation describes as "Address of the peer that sent us this transaction". Is this the IP address of the original node that broadcasts the transaction?

Not necessarily, the node listed may be the one that found the block, or that node may have heard about the block from some other node.

In general, we're trying to gather geographical data of the transactions; is there a reliable way to do so?

Not really. An interested user could set up many nodes, in an effort to 'have eyes' in many different places on the network, thus increasing confidence about which node each new block originates from. But even that data is not strongly tied to geography, for example nodes can connect through hidden services such as tor.

In addition to this, many mining pools are composed of geographically distributed miners, so learning the location of a mining pool's node doesn't necessarily tell you anything about where the hardware that actually found the block is located.

Miners can vary the data in the coinbase transaction, and some elect to put a name on this field. For example, see this recent block: when decoded we can see the coinbase transaction includes the text ViaBTC/Mined by zout905. Worth mentioning: this data is not entirely conclusive, as any miner can put any data they'd like here, so it is possible for someone else to put 'ViaBTC' in a block they find, and it is possible for ViaBTC to put nothing at all.

Another way to distinguish who found a block is to look at the payout address. Some miners/pools will always pay the coinbase transaction to the same address, so you can track which blocks they've found by looking at the payout address. But this would only work for miners that pay to the same address, and requires an assumption they will continue to only pay to that address.

  • The IP will never be the one of the miner who found or broadcasted, the relayed_by field is strictly for transaction relay. Block broadcast and transaction broadcast are completely distinct, and mining pools have nothing to do with the latter either. – Matthieu Jun 28 '18 at 0:13
  • @Matthieu oh shoot! I now realize I misread this question (and API docs), and answered in terms of blocks, not transactions. My mistake, thanks for clarifying. – chytrik Jun 28 '18 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.