Skip to content

peer maintenance - #197

Merged
vladimir-ea merged 1 commit into
mainfrom
ve/more_peers
Aug 25, 2026
Merged

peer maintenance#197
vladimir-ea merged 1 commit into
mainfrom
ve/more_peers

Conversation

@vladimir-ea

Copy link
Copy Markdown
Collaborator

Last set of changes for peer population maintenance - a bunch of different changes:

  • fix spine queue sizes so gossip messages are not dropped
  • specify backoff in PRUNE messages and penalise re-GRAFT inside backoff
  • allow GOODBYEs to send before closing connection
  • if connections are at capacity evict idle peers
  • allow dialling more connections when at peer capacity if there are gossip subnets in deficit
  • when scoring peers do not allow occupancy of many topic meshes to weigh in the peer's favour

(I promise to make more focused PRs in future..)

@vladimir-ea

Copy link
Copy Markdown
Collaborator Author

@clanky-gattaca review

@clanky-gattaca

clanky-gattaca commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🤖 PR review

This PR advertises PRUNE backoffs on the wire (and penalises re-GRAFTs inside them), replaces the absolute opportunistic-graft threshold with a fraction of per-topic-class saturation, merges the P3-activation and rescore passes into a single per-peer walk in tick, adds idle-peer shedding plus a deficit-subnet dial tier, and tears the connection down when a Goodbye send side is stopped or fails. The encoding, backoff and scoring changes look internally consistent and match reference gossipsub behaviour; the mesh/peer-management reshuffle is a policy change but is guarded by revalidation at the point of action. I found no correctness blockers, but a few behavioural regressions and stale comments worth addressing before merge.

6 inline comment(s) on the diff.


opus · medium effort · 454s

Re-run — tick an effort:

  • low
  • medium
  • high

@clanky-gattaca clanky-gattaca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline notes from the review comment on this PR.

Comment thread crates/network/src/p2p/quic/peer.rs
Comment thread crates/peer/src/manager.rs Outdated
Comment thread crates/peer/src/manager.rs Outdated
Comment thread crates/peer/src/manager.rs Outdated
Comment thread crates/peer/src/manager.rs Outdated
Comment thread crates/peer/src/manager/peers.rs
…ff advertisement, opportunistic graft on topic-local merit
idle_len += 1;
}
}
crate::counters::GossipTopicCounters::subscribed(&subs);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: import it

}
}

let coloc = *peers_by_prefix.get(&peer.ip_prefix).unwrap_or(&1);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does coloc mean?

@vladimir-ea
vladimir-ea merged commit f49aa5d into main Aug 25, 2026
3 checks passed
@vladimir-ea
vladimir-ea deleted the ve/more_peers branch August 25, 2026 15:34
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.

3 participants