Conversation
500331b to
d287766
Compare
| heartbeat "Gossipsub Peer Bandwidth Tracking", 1.seconds: | ||
| for (topic, peers) in g.gossipsub.pairs: | ||
| for peer in peers.items: | ||
| peer.bandwidthTracking.update() |
There was a problem hiding this comment.
If there's no traffic for a few seconds, bandwidth estimate moves to 0.
Actually, we are interested in estimating how fast a peer will transfer to us. Maybe we can use
We won't need bandwithHeartbeat in that case
There was a problem hiding this comment.
Maybe we can just skip updating the EMA if the sample is 0, altho that will leave you with a bandwidth estimation that is even less precise if the node is not chatty.
But, if going with this formula you suggest, what does the downloadTime and preambleTime refer to?
There was a problem hiding this comment.
yes, sounds good. we just need a rough estimate.
Preamble time is whe we received preamble. download time is when we received complete message from the same peer
There was a problem hiding this comment.
We just want to be able to configure that we only issue IMRECEIVING on receiving preamble from top X % of peers
|
|
||
| BandwidthTracking* = ref object | ||
| upload*: ExponentialMovingAverage | ||
| download*: ExponentialMovingAverage |
There was a problem hiding this comment.
We just need to know how fast a remote peer can transfer to us, so upload can suffice
255acb2 to
448e929
Compare
| if ps.byId.hasKey(msgId): | ||
| ps.byId[msgId].deleted = true |
There was a problem hiding this comment.
This replaces the preamble info we are watching (for expiry with the new one). Potentially mesh may keep sending us preambles and we will keep updating this.
Although this never happens because we check for existing entries here
There was a problem hiding this comment.
Yes, this is to keep the functionaliyu of PreambleStore to behave the same as a Table, (altho it internally also has a minheap). Except for the popExpired function, you'll notice that the API and behavior matches that of a Table.
| ) | ||
| ), | ||
| isHighPriority = true, | ||
| ) |
There was a problem hiding this comment.
we still dont know if peers[0] has the required message. what if we store 2-3 mesh members from here and 2-3 non-memsh members from here to preambleInfo (maybe as meshList and IHaveList). That can be more efficient, as we won't need to fetch mesh members, and we also won't need topicID in preambleInfo
12ebbcd to
62b8c89
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1448 +/- ##
==========================================
- Coverage 84.91% 84.45% -0.46%
==========================================
Files 103 109 +6
Lines 18129 18341 +212
==========================================
+ Hits 15394 15490 +96
- Misses 2735 2851 +116
🚀 New features to boost your workflow:
|
a36643b to
66ae07a
Compare
yeah. that's a good idea. @ufarooqstatus I'll work on this if that's okay |
fca0af7 to
dd1be78
Compare
b1f7cca to
491bb76
Compare
…d safety strategy Add preamble threshold Add bandwidth tracking fix: send preamble on publish only if using `sendIDontWantOnPublish` parameter adjusted bandwidth tracking feat: preamble store and heartbeat for expiration chore: send IWANT to mesh peer in expiry heartbeat chore: store peers in preambleinfo chore: hide 1_4 behind compile flag `-d:libp2p_gossipssub_1_4` added support for push operation Add behavior penalty for failed preamble commitment
ad1303f to
1cc8351
Compare
Added GossipSub v1.4 implementation. Specs proposal here.
Still need to complete the safety strategy (in next PR)
Requires the compile flag:
-d:libp2p_gossipsub_1_4, although runningnimble testpubsubdoes add the flag automatically.