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

[chain] Add unconditional_peer_ids to gnoland configuration #1923

Open
r3v4s opened this issue Apr 12, 2024 · 2 comments
Open

[chain] Add unconditional_peer_ids to gnoland configuration #1923

r3v4s opened this issue Apr 12, 2024 · 2 comments
Assignees

Comments

@r3v4s
Copy link
Contributor

r3v4s commented Apr 12, 2024

The less we expose validator node to public, The more safe and sound we can achieve.

Description

Regardless of how many validators we want, its better we hide it from unknown publics and make it does only what validator must do.

One of common ways to do this is using what we called Sentry Node Architecture
image

Idea is vey simple, validator only talks to sentry nodes and sentry nodes talks to other public nodes. In this circumstance doesn't matter how we configured system, validator must be able to talk to sentry 24/7. For this we need certain option like "ignore any limits, always establish a connection to given peers"

IMHO, it will be perfect if above configuration happens during chain initialization #1886

@moul
Copy link
Member

moul commented Oct 16, 2024

What are the specific tasks to complete?

@zivkovicmilos
Copy link
Member

@moul

We sort of have a variation of this functionality through persistent_peers, where we redial (into oblivion, recursivelly) some peers if we lose connections to them (but only if we were connected to them initially, and the connection broke for whatever reason).

gno/tm2/pkg/p2p/switch.go

Lines 311 to 319 in 641d2fd

if peer.IsPersistent() {
var addr *NetAddress
if peer.IsOutbound() { // socket address for outbound peers
addr = peer.SocketAddr()
} else { // self-reported address for inbound peers
addr = peer.NodeInfo().NetAddress
}
go sw.reconnectToPeer(addr)
}

persistent_peers don't actually account for any kind of "slots" on the p2p switch, they live outside of all limitations (max outbound / inbound peers).

What @r3v4s is suggesting is to have a mechanism where we keep the connections to some peers alive at all costs, if they are not existing, given the limitation of persistent_peers I've mentioned above

It should be easy peasy to do when I wrap up #2852, so I'll keep this issue updated 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

4 participants