-
Notifications
You must be signed in to change notification settings - Fork 246
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
Cache DSN peers for subspace-gateway #3311
Comments
We already have |
Yeah that could work, but maybe having the node send its own address as a bootstrap node to the farmer and gateway would work just as well? (Then they’d effectively be using the node’s cache via the DSN protocol, rather than their own.) |
Node currently sends it bootstrap nodes to the farmer for bootstrapping and if none are provided (like in local dev environment) then it will send its own address. Farmer also allows to override bootstrap nodes via CLI explicitly and if possible will use previously known peers stored in a file using above mentioned implementation instead of bootstrap nodes from either CLI or those provided by the node. I'd expect a similar behavior from the gateway, but maybe you meant something else. |
Why not add its own address all the time? |
Good question, it will most likely not be helpful unless you enable |
Fair point, I was thinking of adding the detected external address, rather than the internal socket address. But I guess that then causes potential security issues if peers lie about the external address. |
It'll also complicate things since right now |
Currently, the gateway is stateless between restarts: it doesn’t store any data on disk.
If it used a DSN peer cache, it would be more resilient to bootstrap node downtime (and network connectivity or censorship).
There are a few different ways to do this:
The text was updated successfully, but these errors were encountered: