Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotate nodeId #20671

Open
holiman opened this issue Feb 14, 2020 · 2 comments
Open

Rotate nodeId #20671

holiman opened this issue Feb 14, 2020 · 2 comments
Assignees
Labels

Comments

@holiman
Copy link
Contributor

holiman commented Feb 14, 2020

When geth first boots up, it generates a nodeId. The nodeId is never regenerated, and uniqely identifies the node in the network.
The nodeId is stored as nodekey in the datadir. There are some problems around privacy, with the nodeid.

  • It enables 'tracking'. A user who moves between different geographical locations can be tracked. By seeing how a unique node moves, it can be possible to identify the human behind the node.

This can be solved by rotating the nodeid. However, there are problems with that aswell,

  • If the node id is rotated too frequently, it causes a churn on the kademlia table.

So there are different ways we can do that.

  1. Rotate nodeid every N days/weeks (with some randomness). This is the most naive way to implement it, and makes tracking more difficult, but not impossible.
  2. Tie nodeid to external ip address. When geth boots up, it figures out the external IP. If it has been changed, it generates a new nodeid. This would prevent tracking, it would enable stable nodeid's for long-lived servers. The downside is that in order to figure out the external IP, geth would need to use a temporary nodeid first, and then change nodeid after ip discovery.
  3. ?
@holiman holiman changed the title Rotate node-id Rotate nodeId Feb 14, 2020
@fjl fjl added the area:p2p label Feb 17, 2020
@fjl fjl self-assigned this Feb 17, 2020
@flgh
Copy link

flgh commented Feb 18, 2020

hash of (operating system boot time + bound ip address) ?

@holiman
Copy link
Contributor Author

holiman commented Feb 20, 2020

hash of (operating system boot time + bound ip address) ?

The problem is not so much to figure out a method of seeding. The problem of 2) is that actually figuring out the external IP requires some networking. Regarding the algo suggestion, I'm not sure why one would want to factor in boot time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants