-
Notifications
You must be signed in to change notification settings - Fork 60
test(gossipsub): parameters #1442
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
Conversation
@@ -129,7 +129,6 @@ proc setupGossipSubWithPeers*( | |||
|
|||
proc teardownGossipSub*(gossipSub: TestGossipSub, conns: seq[Connection]) {.async.} = | |||
await allFuturesThrowing(conns.mapIt(it.close())) | |||
await gossipSub.switch.stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it wasn't needed. With it we can observe logs:
WRN 2025-06-05 12:34:58.136+01:00 service is already stopped topics="libp2p switch" tid=15516792
WRN 2025-06-05 12:34:58.136+01:00 TCP transport already stopped topics="libp2p tcptransport" tid=15516792
|
||
# Then it saves max 1001 messages in the history and the rest is dropped | ||
check: | ||
peer.iDontWants[0].len == 1001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compared to the magic number, as the condition in code is done in the following way:
nim-libp2p/libp2p/protocols/pubsub/gossipsub/behavior.nim
Lines 308 to 309 in 3a7745f
if peer.iDontWants[0].len > 1000: | |
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll make this pr tomorrow
…p2p into test-gossipsub-peremeters
Add missing tests according to the 7. Parameter Configuration Tests
New tests:
"Max IDONTWANT messages per heartbeat per peer"
"rebalanceMesh Degree Hi - dScore controls number of peers to retain by score when pruning"
"Unsubscribe backoff"
and remove skipped"GossipSub unsub - resub faster than backoff"
"Prune backoff"
New test suits:
"GossipSubParams validation"
"TopicParams validation"