Skip to content

[ipfs/go-bitswap] Mechanism to determine who gave me a block when I use exchange.Fetcher #78

@hannahhoward

Description

@hannahhoward

Goals

If we want to do accurate accounting of data received from a single peer, i.e. what I will need in order to properly implement bitswap as a transport for go-data-transfer, an external consumer needs a way to determine what peer actually gave me a block requested to exchange.Fetcher. I see two ways one can do this:

  1. Modify exchange.Fetcher's return values
  2. Provide some kind of hook/listener mechanism on receiving a block that has this information.

My gut is that the second is the simpler one to do and probably works most easily for the go-data-transfer integration anyway, plus it works well for people who want to collect metrics about who sends them stuff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions