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

Persist IDs and port numbers between restarts #353

Open
feross opened this issue Jun 11, 2015 · 7 comments
Open

Persist IDs and port numbers between restarts #353

feross opened this issue Jun 11, 2015 · 7 comments

Comments

@feross
Copy link
Member

@feross feross commented Jun 11, 2015

Things that can be persisted between restarts:

  • torrent client peer ID
  • torrent client listen port
  • dht node ID
  • dht port

The DHT needs to be persisted (#72), and that means our DHT node ID shouldn't change between different runs of the webtorrent program.

Persisting the torrent client listen port and node ID might get us more peers (if we're still listed trackers and DHTs). Should we persist the torrent client peer ID too?

Are there privacy implications to re-using the peer ID? What does Transmission do?

@feross feross changed the title "peer ID" and "node ID" should be consistent between restarts Persist IDs and port numbers between restarts Jun 11, 2015
feross added a commit that referenced this issue Jun 11, 2015
@Wingman4l7

This comment has been minimized.

Copy link

@Wingman4l7 Wingman4l7 commented Jun 11, 2015

Definitely persist at least the peer ID prefix, or you won't be able to have webtorrent be a whitelisted client on private torrent trackers!

@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented Jun 11, 2015

Yep, we have a consistent prefix! It's -WW.

@Wingman4l7

This comment has been minimized.

Copy link

@Wingman4l7 Wingman4l7 commented Jun 11, 2015

I thought so! I might suggest that you append the version number of webtorrent to the prefix, so that a specific stable version of the client can be whitelisted.

@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented Jun 11, 2015

@Wingman4l7

This comment has been minimized.

Copy link

@Wingman4l7 Wingman4l7 commented Jun 11, 2015

... I think I knew that. >.< Well, great! :D

@gillesdemey

This comment has been minimized.

Copy link
Contributor

@gillesdemey gillesdemey commented Aug 16, 2015

Transmission persists at least a part of the peerid, like -TR1330- and the rest of the 20 bytes are filled in at random, just like WebTorrent does it right now.

https://trac.transmissionbt.com/wiki/PeerId

They generate a new peerID every six hours though, see https://trac.transmissionbt.com/changeset/13933

@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented Aug 19, 2015

@gillesdemey

That part of the Transmission ID (-TR1330-) identifies the client and the version. For example, WebTorrent uses -WW-0057.

Interesting that they generate a new ID every six hours. Perhaps that's to prevent long-term user tracking?

In any case, it looks like there's probably no benefit (and possibly privacy harm) to preserving the peer ID over the long term. Good to know.

@feross feross added accepted and removed accepted labels May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.