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

Bitswap cant currently handle other types of hashes #3055

Closed
whyrusleeping opened this issue Aug 7, 2016 · 1 comment
Closed

Bitswap cant currently handle other types of hashes #3055

whyrusleeping opened this issue Aug 7, 2016 · 1 comment
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue topic/bitswap Topic bitswap

Comments

@whyrusleeping
Copy link
Member

We recently in discussion about ipld discovered a bug in bitswap. When receiving a block, bitswap will check its hash and see if that hash is on its wantlist. This works right now because we only use one hash type, in the future when there are blocks with other types of identifiers floating around, we need to be able to check things with the correct function.

To do this, we need to assign a unique ID or index to each item in our wantlist, and attach each entries ID to it when sending out wantlists. Then, when someone sends us a block, they also send the ID of the wantlist entry they are fulfilling for us, allowing us to correctly identify what we've received.

This will be a 'breaking' protocol change for bitswap, but we can easily run both old and new code in compatibility mode for some time.

Depends on:

@whyrusleeping whyrusleeping added topic/bitswap Topic bitswap exp/expert Having worked on the specific codebase is important labels Aug 7, 2016
@whyrusleeping whyrusleeping added this to the ipld integration milestone Aug 7, 2016
This was referenced Aug 8, 2016
@whyrusleeping whyrusleeping added the help wanted Seeking public contribution on this issue label Sep 14, 2016
@whyrusleeping
Copy link
Member Author

Was fixed in #3297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue topic/bitswap Topic bitswap
Projects
None yet
Development

No branches or pull requests

1 participant