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

Access to network peer information (IP, type, etc.) #357

Closed
sisou opened this issue Oct 7, 2021 · 0 comments · Fixed by #1344
Closed

Access to network peer information (IP, type, etc.) #357

sisou opened this issue Oct 7, 2021 · 0 comments · Fixed by #1344
Assignees

Comments

@sisou
Copy link
Member

sisou commented Oct 7, 2021

To properly display the network map in the Wallet, and for general informative purposes about node connectivity, it is required to be able to access information about network peers, such as their IP, their node type, their connected protocol.

Currently, the Peer struct has only an ID and a reference to the underlying stream from libp2p.
https://github.com/nimiq/core-rs-albatross/blob/albatross/network-libp2p/src/message/peer.rs#L24-L31

@sisou sisou mentioned this issue Oct 7, 2021
2 tasks
@vlvrd vlvrd self-assigned this Nov 11, 2021
@viquezclaudio viquezclaudio assigned jsdanielh and unassigned vlvrd Mar 10, 2022
@viquezclaudio viquezclaudio added this to the Nimiq 2.0 Testnet milestone Mar 11, 2022
jsdanielh added a commit that referenced this issue Feb 16, 2023
Add a way to query peer information from the network. For this the
following changes were introduced:
- Move the `Services` bitflags to the `network-interface` crate.
- Add a `PeerInfo` struct to the `network-interface` crate.
- Change the `PeerJoined` network event to also dispatch the
  `PeerInfo` of the peer joined.
- Change the `peer_listener` function to also receive more arguments.
- Implement the changes in the `network-interface` in both of the
  network implementations we support (`libp2p` and `mock`).

This closes #357.
jsdanielh added a commit that referenced this issue Feb 16, 2023
Add a way to query peer information from the network. For this the
following changes were introduced:
- Move the `Services` bitflags to the `network-interface` crate.
- Add a `PeerInfo` struct to the `network-interface` crate.
- Change the `PeerJoined` network event to also dispatch the
  `PeerInfo` of the peer joined.
- Change the `peer_listener` function to also receive more arguments.
- Implement the changes in the `network-interface` in both of the
  network implementations we support (`libp2p` and `mock`).

This closes #357.
@sisou sisou mentioned this issue Feb 16, 2023
10 tasks
jsdanielh added a commit that referenced this issue Feb 16, 2023
Add a way to query peer information from the network. For this the
following changes were introduced:
- Move the `Services` bitflags to the `network-interface` crate.
- Add a `PeerInfo` struct to the `network-interface` crate.
- Change the `PeerJoined` network event to also dispatch the
  `PeerInfo` of the peer joined.
- Change the `peer_listener` function to also receive more arguments.
- Implement the changes in the `network-interface` in both of the
  network implementations we support (`libp2p` and `mock`).

This closes #357.
jsdanielh added a commit that referenced this issue Feb 16, 2023
Add a way to query peer information from the network. For this the
following changes were introduced:
- Move the `Services` bitflags to the `network-interface` crate.
- Add a `PeerInfo` struct to the `network-interface` crate.
- Change the `PeerJoined` network event to also dispatch the
  `PeerInfo` of the peer joined.
- Change the `peer_listener` function to also receive more arguments.
- Implement the changes in the `network-interface` in both of the
  network implementations we support (`libp2p` and `mock`).

This closes #357.
jsdanielh added a commit that referenced this issue Feb 17, 2023
Add a way to query peer information from the network. For this the
following changes were introduced:
- Move the `Services` bitflags to the `network-interface` crate.
- Add a `PeerInfo` struct to the `network-interface` crate.
- Change the `PeerJoined` network event to also dispatch the
  `PeerInfo` of the peer joined.
- Change the `peer_listener` function to also receive more arguments.
- Implement the changes in the `network-interface` in both of the
  network implementations we support (`libp2p` and `mock`).

This closes #357.
jsdanielh added a commit that referenced this issue Feb 17, 2023
Add a way to query peer information from the network. For this the
following changes were introduced:
- Move the `Services` bitflags to the `network-interface` crate.
- Add a `PeerInfo` struct to the `network-interface` crate.
- Change the `PeerJoined` network event to also dispatch the
  `PeerInfo` of the peer joined.
- Change the `peer_listener` function to also receive more arguments.
- Implement the changes in the `network-interface` in both of the
  network implementations we support (`libp2p` and `mock`).

This closes #357.
jsdanielh added a commit that referenced this issue Feb 17, 2023
Add a way to query peer information from the network. For this the
following changes were introduced:
- Move the `Services` bitflags to the `network-interface` crate.
- Add a `PeerInfo` struct to the `network-interface` crate.
- Change the `PeerJoined` network event to also dispatch the
  `PeerInfo` of the peer joined.
- Change the `peer_listener` function to also receive more arguments.
- Implement the changes in the `network-interface` in both of the
  network implementations we support (`libp2p` and `mock`).

This closes #357.
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

Successfully merging a pull request may close this issue.

4 participants