Skip to content
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

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

Open
hannahhoward opened this issue Mar 25, 2022 · 0 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@hannahhoward
Copy link
Contributor

hannahhoward commented Mar 25, 2022

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.

@hannahhoward hannahhoward added the need/triage Needs initial labeling and prioritization label Mar 25, 2022
@Jorropo Jorropo changed the title Mechanism to determine who gave me a block when I use exchange.Fetcher [ipfs/go-bitswap] Mechanism to determine who gave me a block when I use exchange.Fetcher Jan 27, 2023
@Jorropo Jorropo transferred this issue from ipfs/go-bitswap Jan 27, 2023
Jorropo pushed a commit that referenced this issue Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants