-
Notifications
You must be signed in to change notification settings - Fork 183
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
Rework iroh-net address book #2646
Comments
we already have a provenance that we use for logging, but we don't store. So in a way we are halfway there |
@rklaehn what information do you need other than what will need to be added for #2612? We decided a while ago to explicitly move persistence out of iroh-net. iroh-net internally keeps a whole bunch of information in the I think it will be natural that as our understanding, implementation and requirements evolve that this structs will evolve. I think that's fine. I don't see a particular reason why involving a database here will make life easier, on the contrary. So I don't think I can see benefits here for a major rework along the lines you are suggesting. For context what I'm currently do want to work on is cleaning up the The major change I would like this to lead to is that whenever the |
We don't have to make this overly complex provided that we have a way for an external entity to get every single thing that is related to discovery as an event. Then for those cases that need something more complex than the logic we need for realtime, we can combine an event listener and a discovery mechanism to have the persistent storage external. Note that this requires that the discovery trait allows a discovery subsystem to emit arbitrary provenances, which is currently the case. https://docs.rs/iroh-net/latest/iroh_net/discovery/struct.DiscoveryItem.html |
I think #2612 is just one out of many examples that you need some more information about nodes in the address book.
We should have a database containing for each node id some information about the provenance (where we learned about it), and maybe also simple statistics.
While doing this, we should also rework persistence. Not sure how to best do it, maybe a redb database that is in mem by default and can be pointed to a file optionally?
The text was updated successfully, but these errors were encountered: