Description: Currently, the Bitswap worker just blindly trusts the data that is sent back to it when testing for a retrieval, This is not ideal, as there's a potential for abuse where a client sends back junk data that does not match the CID in question.
Since we have the Root CID of the payload we're testing, we can verify that the returned payloads hash back to what we expect, and throw errors if they do not.
Description: Currently, the Bitswap worker just blindly trusts the data that is sent back to it when testing for a retrieval, This is not ideal, as there's a potential for abuse where a client sends back junk data that does not match the CID in question.
Since we have the Root CID of the payload we're testing, we can verify that the returned payloads hash back to what we expect, and throw errors if they do not.
Recommended approach: Take ipfs-check/Vole code and adapt to a module in RB: https://github.com/ipfs-shipyard/vole/blob/69a796c8f2532be28cf3257ee8b413603b191e76/lib/bitswap.go#L45
Some approaches are discussed here https://filecoinproject.slack.com/archives/C04M8232QRW/p1697232334147089
ETA: YYY-MM-DD Maintainer:
Known dependencies:
View this starmap at: