devp2p icon indicating copy to clipboard operation
devp2p copied to clipboard

discv5: passive topic registration

Open decanus opened this issue 5 years ago • 2 comments

So I am currently looking at the discv5 spec, and I notice that if a node wants to advertise a specific topic it needs to REGTOPIC on that specific node. I wonder if it makes sense to advertise topics in the ENR as an array of topics that MUST then be added to the topic table for a specific node. This would allow nodes to already add their peers to the topic table for the most important topics and allow for further adding other topics using the REGTOPIC command.

decanus avatar Mar 19 '20 12:03 decanus

We decided early on that topics do not belong in ENRs. In the discv5 data model, ENRs are stored in the topic table. If we want to support some kind of pre-registration for topics without an explicit REGTOPIC, the topics would need to be sent alongside the ENR, or in PING.

fjl avatar Mar 19 '20 14:03 fjl

@fjl I think something like this would make sense to reduce the amount of requests required from a client.

decanus avatar Mar 19 '20 16:03 decanus