Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Idle tick behaviour #290

@dirkmc

Description

@dirkmc

Current Behaviour

When a Session gets an idle tick (it hasn't received any blocks for a while) it

  • broadcasts want-have for all wants that were ever requested
  • queries the DHT for the first requested CID

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:

  • broadcast want-have for all wants for which we haven't received a block (rather than all wants ever requested)
  • query the DHT for the first want that has not yet been received (rather than a random want / the first want ever requested)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions