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

Remove redundancy from Bitswap Discovery and Transfer #1042

Closed
SgtPooki opened this issue Feb 22, 2022 · 5 comments
Closed

Remove redundancy from Bitswap Discovery and Transfer #1042

SgtPooki opened this issue Feb 22, 2022 · 5 comments
Assignees
Labels
dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours good first issue Good issue for new contributors kind/enhancement A net-new feature or an improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up

Comments

@SgtPooki
Copy link
Member

The description in Discovery and Transfer seem to repeat the same information:

Discovery:

To find peers that have a file, a node running the Bitswap protocol first sends a request called a want-have to all the peers it is connected to. This want-have request contains the CID of the root block of the file (the root block is at the top of the DAG of blocks that make up the file). Peers that have the root block send a have response and are added to a session. Peers that don't have the block send a dont-have response. If none of the peers have the root block, Bitswap queries the Distributed Hash Table (DHT) to ask who can provide the root block.

Transfer:

Once peers have been added to a session, for each block that the client wants, Bitswap sends want-have to each session peer to find out which peers have the block. Peers respond with have or dont_have. Bitswap builds up a map of which nodes have and don't have each block. Bitswap sends want-block to peers that have the block, and they respond with the block itself. If no peers have the block, Bitswap queries the DHT to find providers who have the block.

The Transfer section could probably contain only the following:

Bitswap sends want-block to peers that have the block, and they respond with the block itself.

@SgtPooki SgtPooki added the need/triage Needs initial labeling and prioritization label Feb 22, 2022
@welcome
Copy link

welcome bot commented Feb 22, 2022

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additiona round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@johnnymatthews johnnymatthews moved this to Needs triage in Protocol Docs Feb 22, 2022
@Annamarie2019 Annamarie2019 changed the title Bitswap Disambiguate Bitswap Discovery and Transfer Feb 23, 2022
@Annamarie2019 Annamarie2019 changed the title Disambiguate Bitswap Discovery and Transfer Remove redundancy from Bitswap Discovery and Transfer Feb 23, 2022
@Annamarie2019 Annamarie2019 added dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours good first issue Good issue for new contributors kind/enhancement A net-new feature or an improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Feb 23, 2022
@Annamarie2019 Annamarie2019 self-assigned this Feb 23, 2022
@Annamarie2019
Copy link
Contributor

@SgtPooki
So, basically, make sure that Transfer does not repeat anything from Discovery, yes? It sounds like the last sentence of Discovery would be better off in transfer, along with the sentence you suggest.

@Annamarie2019
Copy link
Contributor

....I'll take this one.

@Annamarie2019 Annamarie2019 moved this from Needs triage to Todo in Protocol Docs Feb 23, 2022
@Annamarie2019 Annamarie2019 moved this from Todo to In Progress in Protocol Docs Feb 23, 2022
@Annamarie2019 Annamarie2019 moved this from In Progress to In review in Protocol Docs Feb 23, 2022
@Annamarie2019
Copy link
Contributor

Annamarie2019 commented Feb 23, 2022

Done. PR 1045. 1045 closed. Still working on correct PR workflow.

@Annamarie2019 Annamarie2019 moved this from In review to In Progress in Protocol Docs Feb 26, 2022
@Annamarie2019 Annamarie2019 moved this from In Progress to In review in Protocol Docs Feb 28, 2022
@Annamarie2019
Copy link
Contributor

Annamarie2019 commented Feb 28, 2022

In review: PR #1051

@Annamarie2019 Annamarie2019 moved this from In review to Done in Protocol Docs Mar 1, 2022
@johnnymatthews johnnymatthews moved this from Done to Archive of closed issues in Protocol Docs Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours good first issue Good issue for new contributors kind/enhancement A net-new feature or an improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

3 participants