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

Send Talk message with NodeAddress only #277

Open
morph-dev opened this issue Jan 17, 2025 · 2 comments
Open

Send Talk message with NodeAddress only #277

morph-dev opened this issue Jan 17, 2025 · 2 comments

Comments

@morph-dev
Copy link
Contributor

In short, my understanding is that NodeAddress contains minimal information needed in order to send Talk message to another node.

I checked the code, but it doesn't seem so trivial. I'm willing to do required work and send PR, but I would appreciate some guideline on how to approach it.


For context, I'm working on trin project and I'm trying to fix some issue. The issue itself is not related to discv5 itself, but the application protocol on top of it. The solution would be much easier if we could do what this issue describes (which I believe is doable in principle).

@ackintosh
Copy link
Member

Unfortunately, I think we can't send a message using only NodeAddress, because the destination peer's public key is required when generating a session.

@AgeManning
Copy link
Member

As @ackintosh points out, its not possible to send any messages without a node's public key.

The discv5 protocol requires us to encrypt the message with the node-id. We can't send anything without it.

Typically an ENR is required, but we made a function that works for multiaddrs, not that still has the public key:

pub fn request_enr(

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