1

Let's say I have a private node A that has a public node B as its only trusted peer, and that I have access to B. Would it be possible to discover A's existence and IP from the list of B peers, or would it be indistinguishable from the rest of remote peers?

1

Calling tezos-admin-client p2p stat on node B will list among other things, all active connections. The connections to private node will have the word private near the end of the line.

Here is an example in sandbox where 127.0.0.1:19732 plays the node A (private and trusted):

$ tezos-admin-client p2p stat 
GLOBAL STATS
  ↗ 4.21 kiB (224 B/s) ↘ 1.70 kiB (89 B/s)
CONNECTIONS
  ↗ idtiUgrLJUypeDGiYtgezGNfSCsuGf 127.0.0.1:19732 (SANDBOXED_TEZOS.0 (p2p: 0)) private
KNOWN PEERS
  ⚌  1 idtiUgrLJUypeDGiYtgezGNfSCsuGf ↗ 4.21 kiB (224 B/s) ↘ 1.70 kiB (89 B/s)  
KNOWN POINTS
  ⚏  127.0.0.1:19730 ★
  ⚏  127.0.0.1:19737 ★
  ⚏  127.0.0.1:19731 ★
  ⚏  127.0.0.1:19736 ★
  ⚏  127.0.0.1:19738 ★
  ⚏  127.0.0.1:19739 ★
  ⚏  127.0.0.1:19734 ★
  ⚌  127.0.0.1:19732 idtiUgrLJUypeDGiYtgezGNfSCsuGf ★

Note also the stars in the KNOWN POINTS list which denotes trusted points. which tells us that node A is trusted by node B.

You could also use raw RPC and jq utility to filter relevant results to get the active connections to private node :

 tezos-client rpc get  /network/connections | jq -c 'map(select(.remote_metadata|.private_node==true))'
3
  • 1
    Thanks, that's answer perfectly my question. Is there any way of hiding the private node? I'd prefer if no one with access to the public node's server could discover the private one Aug 27 '19 at 11:42
  • 1
    No you can't hide connected node in the RPC output. However, no untrusted user should ever have access to the RPC of your public node !
    – Julien
    Aug 28 '19 at 10:55
  • Thanks! No untrusted user will have access to the RPC, but I was wondering if it was possible to hide the private node where the baking is happening, in the case anything goes wrong Aug 28 '19 at 14:25

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.