ipfs / ipfs/boxo

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

Open
#78 0 comments 0 reactions 0 assignees View on GitHub
need/triage
Dominant language
Go
Stars
316
Forks
163
Avg merge
4d 12h
Merged PRs (30d)
8

Description

# 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.