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

Expose the Peerstore #89

Open
jacobheun opened this issue Mar 19, 2019 · 7 comments
Open

Expose the Peerstore #89

jacobheun opened this issue Mar 19, 2019 · 7 comments
Assignees

Comments

@jacobheun
Copy link
Contributor

jacobheun commented Mar 19, 2019

Expose the Peerstore to allow daemon clients to access that information, such as known protocols a peer supports.

I'm proposing an addition of protos to the PeerInfo protobuf. This would enable us to expose the known protocols of a peer to consuming clients during the LIST_PEERS request.

@vyzo
Copy link
Collaborator

vyzo commented Mar 19, 2019

I am not too excited about that.

@cheatfate
Copy link

PeerInfo is used in LIST_PEERS and in DHT requests.

Sorry but i can't see any use-cases for LIST_PEERS, but i see how it can be used in DHT. But i think its not possible in current version of DHT to obtain list of protocols supported by peer, or i'm wrong? @vyzo

@jacobheun
Copy link
Contributor Author

The protocols are discovered and added to the Peer Store during Identify, there's just currently no trivial way for us to get those known protocols from the Daemon. Right now the only access we have to the Peer Store is LIST_PEERS. I'd like to be able to get this information from the Daemon about a given peer.

I am not too excited about that.

@vyzo is it the usage in LIST_PEERS, or exposing the protocols period?

@vyzo
Copy link
Collaborator

vyzo commented Mar 19, 2019

You can use identify directly on a peer.

@jacobheun
Copy link
Contributor Author

Unless I am missing something, the only way to currently use identify directly on a peer would be to implement the identify protocol in a daemon client and perform that on a connected peer.

IDENTIFY currently only applies to the daemon itself.

@vyzo
Copy link
Collaborator

vyzo commented Mar 20, 2019

It's trivial, you just open a stream and read the identify response.

Having said that, we probably want to expose the Peerstore where such information can be obtained.
I don't want to extend the PeerInfo struct though, it's a kludge.

@jacobheun
Copy link
Contributor Author

Exposing the Peerstore would be ideal.

I can create a PR for the proto and Spec additions.

@jacobheun jacobheun changed the title Add protocols to PeerInfo Expose the Peerstore Mar 20, 2019
@ghost ghost assigned jacobheun Mar 20, 2019
@ghost ghost added the in progress label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants