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

node/peers: basic conn count mgr #1137

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

jchappelow
Copy link
Member

@jchappelow jchappelow commented Dec 9, 2024

This adds a basic connection manager that attempts to keep a target connection count. This is useful when a node, such as a validator, has the leader's address in bootnodes, but the leader is down. When the leader is back, it is on the validator to be attempting reconnection with it's known but disconnected peers.

Resolves #1135

2024-12-09 15:17:54.087 [INF] PEERS: Active connections: 0, below target: 20. Initiating new connections.
2024-12-09 15:17:54.088 [WRN] PEERS: Failed to connect to peer 16Uiu2HAkx2kfP117VnYnaQGprgXBoMpjfxGXCpizju3cX7ZUzRhv: failed to dial: failed to dial 16Uiu2HAkx2kfP117VnYnaQGprgXBoMpjfxGXCpizju3cX7ZUzRhv: all dials failed
  * [/ip4/127.0.0.1/tcp/6600] dial backoff

2024-12-09 15:17:55.088 [INF] PEERS: Active connections: 0, below target: 20. Initiating new connections.
2024-12-09 15:17:55.094 [INF] PEERS: Connected to peer (Outbound) 16Uiu2HAkx2kfP117VnYnaQGprgXBoMpjfxGXCpizju3cX7ZUzRhv @ /ip4/127.0.0.1/tcp/6600
2024-12-09 15:17:55.096 [INF] PEERS: Connected to peer 16Uiu2HAkx2kfP117VnYnaQGprgXBoMpjfxGXCpizju3cX7ZUzRhv

2024-12-09 15:17:55.974 [INF] NODE: received Discovery request from 16Uiu2HAkx2kfP117VnYnaQGprgXBoMpjfxGXCpizju3cX7ZUzRhv
2024-12-09 15:17:55.974 [INF] NODE: responded to Discovery request {height=0}
2024-12-09 15:17:55.977 [INF] NODE: processing block proposal {height=1 hash=12745235d053dae93bff86cc2a6cc75f0483cd9bc1e8579e08ed4a5eb15f34d7}
2024-12-09 15:17:55.977 [INF] CONS: Consensus message received {type=block_proposal sender=02c57268fc884fa88425c7e5c19d3af263d1c64dd8b8f3f8c0fb31bb622d1fdab8}

@jchappelow jchappelow linked an issue Dec 9, 2024 that may be closed by this pull request
@charithabandi charithabandi merged commit 9d5393a into kwilteam:main Dec 10, 2024
2 checks passed
@jchappelow jchappelow deleted the peers-connect-loop branch December 10, 2024 23:18
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

Successfully merging this pull request may close these issues.

Bug: GossipSub doesn't work if followers are started before leader
2 participants