1

According to this answer: (https://bitcoin.stackexchange.com/a/63657/41513) the following can be definition of a node:

"A node is a computer that has a copy of the blockchain (or at least a part of it), and broadcasts and receives transactions and blocks from other nodes."

If we assume this definition is correct, then is there any approach to detect the nodes? For example, how to detect a node is node-i and another node is node-j? Is there an approach to detect those nodes by an identity?

Is "fingerprinting a node" can be considered as a solution to identify a node? (https://www.npmjs.com/package/node-fingerprint) or (https://pdfs.semanticscholar.org/d5ef/30919b4f28b82d6fb637e17a5a992f82ecaa.pdf)

1

The nodes already have IDs.

If you connect to a geth console and run admin.peers, you'll get a response like:

> admin.peers
[{
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "16d92fc94f4ec4386aca44d255853c27cbe97a4274c0df98d2b642b0cc4b2f2330e99b00b46db8a031da1a631c85e2b4742d52f5eaeca46612cd28db41fb1d7f",
    name: "Geth/v1.8.17-stable-8bbe7207/windows-amd64/go1.11.1",
    network: {
      inbound: false,
      localAddress: "your_ip:34897",
      remoteAddress: "91.223.175.173:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.74868778635109e+21,
        head: "ae324d9913edad91dedbf9fe0940a43bd9a893e3ef1e78115e3abb759751167b",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "242b68a4e37b4478c46901c3512315f36bd1aa513566d1f061939b202258b55d63d66367bc5807e62ec03ae673bead9a351846e3f23284ce79537ff7afa65615",
    name: "Geth/v1.8.12-stable/linux-amd64/go1.10.3",
    network: {
      inbound: false,
      localAddress: "your_ip:38471",
      remoteAddress: "34.201.26.61:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.751567168106219e+21,
        head: "cd362f4aca1a15ad96e5bd29efc07e84e07a4d326314f1a3f18f7b198b20a40a",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "37c709795a10664840044c566ecd9401b56afb43b50cf430dbf494679b7532a26bdb2361e563b9ea0bbfb22820c01b3da417b91c1024b27ddb14336156815587",
    name: "Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10",
    network: {
      inbound: false,
      localAddress: "your_ip:41728",
      remoteAddress: "18.191.54.6:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.75156093437375e+21,
        head: "32785b24fff9031850588dd55b1e52d25bef19a86fde515ca6f5efb0445ffa2b",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "48641985be80ff8073cb09b20764cd4147db20e6dbf8bf7367e033d269e1efcfb8a9a99ffc6db9a3a2ebad97e52721b553f859670623fc49d9bf522bf78f7bdf",
    name: "Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10",
    network: {
      inbound: false,
      localAddress: "your_ip:46522",
      remoteAddress: "52.56.247.214:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.751554694610543e+21,
        head: "bac3ff2422033e114cd7bff94f580b94d72f97e52988b86ab6ed1922adc0a38b",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "4c2b5c5d9503b7f4e76a551c827f19200f7f9ebb62f2cb5078c352de1e8d4d1006efa8fc143f9ccf2c8fd85836198dc1c69729dfa1c54d63f5d1d57fd8781bf8",
    name: "Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10",
    network: {
      inbound: false,
      localAddress: "your_ip:60834",
      remoteAddress: "62.151.178.212:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.735176504213667e+21,
        head: "4e5e338b1824b6fc7ce702a4803889c335dde8f939c3670dd7f5c06d77f72ff9",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "9d45f21eeb37bd5555fac0c4094ae3d4d144d93e2313aeb891bf3054b0dcf6ca817961ed29ea1de00389b5c36dc6bbe9b00443e367b16ed8ba251cea6c242044",
    name: "Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10.1",
    network: {
      inbound: false,
      localAddress: "your_ip:40629",
      remoteAddress: "89.40.10.150:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.751567168106219e+21,
        head: "cd362f4aca1a15ad96e5bd29efc07e84e07a4d326314f1a3f18f7b198b20a40a",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c",
    name: "Geth/v1.8.11-stable/linux-amd64/go1.10",
    network: {
      inbound: false,
      localAddress: "your_ip:52480",
      remoteAddress: "52.16.188.185:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 6.610540259098487e+21,
        head: "3b46c25bbac6b085b607c3e9a83fe044185ab295fc91b8809b6c53409f6fef44",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2", "shh/6"],
    id: "ae1d9252428fa66371bc68e9c4fc0f9c60d09943b521cede6c60b50c67fd6dc1d614525c07030afe52586cbf35d43ad83368ad71c57639125698c3392f8b4a89",
    name: "Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.10.1",
    network: {
      inbound: false,
      localAddress: "your_ip:42428",
      remoteAddress: "121.140.198.219:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.751564051231396e+21,
        head: "2436a969091dad5fdc4ebf13ad5653e6835bb45d70aad7076d0f360b72b6edda",
        version: 2
      }
    }
}, {
    caps: ["eth/63", "les/1", "les/2"],
    id: "e58115410edff97b0c61fc71b85f8beabddaa1a494adc3abd4a31a4ff8fde15d9c969fdd93da5e6f8b1f5e1b750c046dcc9e02ee42a4808c435ec8050660150c",
    name: "Geth/v1.8.17-stable-8bbe7207/linux-amd64/go1.11.1",
    network: {
      inbound: false,
      localAddress: "your_ip:39885",
      remoteAddress: "87.122.220.38:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.751405101691797e+21,
        head: "0b82dd0efb6b95d46e0b31f2cf65c1a9cb466286bffd4649a0b7e86b50c80493",
        version: 2
      }
    }
}, {
    caps: ["eth/62", "eth/63", "les/1", "les/2"],
    id: "ea1737bf696928b4b686a2ccf61a6f2295d149281a80b0d83a9bce242e7bb084434c0837a2002d4cc2840663571ecf3e45517545499c466e4373c69951d090fe",
    name: "Geth/v1.8.18-unstable-1ff152f3/linux-amd64/go1.11.2",
    network: {
      inbound: false,
      localAddress: "your_ip:44052",
      remoteAddress: "163.172.181.92:30303",
      static: true,
      trusted: false
    },
    protocols: {
      les: {
        difficulty: 7.751567168106219e+21,
        head: "cd362f4aca1a15ad96e5bd29efc07e84e07a4d326314f1a3f18f7b198b20a40a",
        version: 2
      }
    }
}]

The identity of one's node is stored in .ethereum/nodekey. You can delete your nodekey file at any time. A new identity will be generated on startup.

This identity is used by nodes to find each other using the discovery protocol, a network protocol based on S/Kademlia. The protocol associates public keys with IP addresses.

The actual peer connections between nodes use a different, encrypted protocol (RLPx). The way RLPx Transport Protocol works requires that the identity (public key) of the remote end is known to the initiator of the connection. In essence, the key links discovery and RLPx connectivity.

  • Thank you, but could you please explain a bit on how those IDs have been generated? Are they relevant to public keys? And why in your example there are two nodes? And also value of those IDs are changeable by user or they have a fixed value permanently? Thanks – Questioner Nov 11 '18 at 18:21
  • I've updated my answer and added more details and references. I hope it provides you with a good general overview and utility of these IDs and also some starting points for further research – Tudor Constantin Nov 11 '18 at 19:20

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.