-
Notifications
You must be signed in to change notification settings - Fork 112
Idle tick behaviour #290
Comments
You sure? I think we broadcast live wants (which shouldn't include wants for which we have already received blocks, as far as I know).
Asking for the first want may work better in some cases, but asking for a random one may work better when we can't find a specific block. Ideally, we'd try them sequentially if that's not too hard. |
It should instead have a dynamic, limited size list where
I'm not sure if that will work better. For example many peers may have the root block of a DAG, but the Session removes those peers if they send many DONT_HAVEs (because they don't have lower branches of the DAG). So in that case we wouldn't want to broadcast a request for the root block, only for the parts of the DAG that we haven't been able to retrieve. Note that we do also periodically broadcast and query the DHT for a random live want. |
Current Behaviour
When a Session gets an idle tick (it hasn't received any blocks for a while) it
However the wants are stored in a map, so the "first" CID is actually random (because golang randomizes the order of iteration over a map)
Proposal
When there is an idle tick:
The text was updated successfully, but these errors were encountered: