You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over-cap behaviour: log and drop the RPC. No disconnect. No score penalty (match go-libp2p; revise if spec adds guidance).
TTL + heartbeat GC
GroupState.ttlInHeartbeats, default minimum 3.
Decrement each heartbeat; GC on ttl == 0 or peerStates empty.
Reset TTL on any publishPartial(topic, groupId, …) call for the group.
Cleanup hooks
Peer disconnect → remove peerStates[peer] entries across all groups.
Local unsubscribe from a topic → drop all group state for that topic.
Performance / safety
GroupState must be a plain HashMap (not thread-safe), accessed only on the pubsub event loop. Do NOT use ConcurrentHashMap (PR Add partial message support for gossipsub #433 had this wrong).
Limits exposed on GossipParams or the handler config.
Reference
Design: docs/partial-messages.md §6 (lands with the first PR on #435).
go-libp2p: partialmsgs.go:255 (heartbeat), :335-348 (peer-initiated cap).
Implements the per-group lifecycle and DoS protection (Step 8 of #435, plus caps referenced from #446).
Scope
DoS caps on peer-initiated groups (match go-libp2p defaults)
peerInitiatedGroupLimitPerTopic = 255(across all peers, per topic).peerInitiatedGroupLimitPerTopicPerPeer = 8(per(topic, peer)).TTL + heartbeat GC
GroupState.ttlInHeartbeats, default minimum 3.ttl == 0orpeerStatesempty.publishPartial(topic, groupId, …)call for the group.Cleanup hooks
peerStates[peer]entries across all groups.Performance / safety
GroupStatemust be a plainHashMap(not thread-safe), accessed only on the pubsub event loop. Do NOT useConcurrentHashMap(PR Add partial message support for gossipsub #433 had this wrong).GossipParamsor the handler config.Reference
Design:
docs/partial-messages.md§6 (lands with the first PR on #435).go-libp2p:
partialmsgs.go:255(heartbeat),:335-348(peer-initiated cap).