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

Merge peer-id & peer-info into one, Merge peer-book into js-libp2p #453

Closed
1 of 2 tasks
daviddias opened this issue Sep 19, 2019 · 7 comments
Closed
1 of 2 tasks

Comments

@daviddias
Copy link
Member

daviddias commented Sep 19, 2019

We've talked this in a PR but creating a issue so that we don't miss it.

  • Merge peer-id & peer-info into one
  • Merge peer-book into js-libp2p
@daviddias
Copy link
Member Author

While at it, rename the module name to be libp2p-peer

@jacobheun
Copy link
Contributor

I think what I'd really like to see is for peer-info to go away altogether. What it does could and should, imo, be managed by the peer-book (PeerStore, which would be great to rename as part of pulling this into libp2p to avoid confusion with go and the specs). Everything ultimately gets housed in the PeerStore anyway, so fully centralizing it there would be ideal, and it would remove a layer of complexity.

cc: @vasco-santos

@vasco-santos
Copy link
Member

I agree with jacob here! Peerbook should own the responsibilities of peer-info.

+1 on renaming this to PeerStore and I want to get this work done as a groundwork to get to libp2p/specs#164

@daviddias
Copy link
Member Author

I think what I'd really like to see is for peer-info to go away altogether. What it does could and should, imo, be managed by the peer-book

Just note that there are multiple modules that require the concept of a Peer but they don't need to know about a PeerStore. That said, I suggest to give it a try and see how viable it is on the refactor to remove the Class Peer (prev peer-info) altogether, I might be missing some nuances that might make it nicer.

(PeerStore, which would be great to rename as part of pulling this into libp2p to avoid confusion with go and the specs).

👍🏽

@daviddias
Copy link
Member Author

daviddias commented Dec 11, 2019

Now that PeerStore is becoming part of js-libp2p with the async await refactor.

Can we also get peer-id and peer-info merged into just peer as well?

@vasco-santos
Copy link
Member

Yes, I have on my list to tackle that soon :)

@jacobheun
Copy link
Contributor

Released in 0.28

maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
`any-signal` can now remove the event listeners it installs preventing a source of memory leaks.
maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants