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

fix: partial revert of 1be7c1a20; make traverser process identity CIDs #7

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Sep 20, 2023

(port of ipfs#442)

It turns out that there are obscure cases where this matters, so we can't as easily just ignore identity CIDs. Specifically, classic online Filecoin deals that rely on Graphsync and require identity CIDs be stored in the CARv1 that is used to calculate CommP must see the identity CID pass through the LinkSystem.

Unfortunately, the easiest way to deal with this is to send them over the wire as if they are a normal block; which happens to be the "safe" backward compatible way too. Less easy way would be to simulate it on both ends and not send them, but we'll take the easy path for now.

Extension of tests in here to make sure that the full DAG is transferred even in this case. Blockstore must have identity CIDs in them, or be able to respond properly to them.

It turns out that there are obscure cases where this matters, so we can't
as easily just ignore identity CIDs. Specifically, classic online Filecoin
deals that rely on Graphsync _and_ require identity CIDs be stored in the
CARv1 that is used to calculate CommP must see the identity CID pass through
the LinkSystem.

Unfortunately, the easiest way to deal with this is to send them over the wire
as if they are a normal block; which happens to be the "safe" backward
compatible way too. Less easy way would be to simulate it on both ends and
not send them, but we'll take the easy path for now.

Extension of tests in here to make sure that the full DAG is transferred even
in this case. Blockstore _must_ have identity CIDs in them, or be able to
respond properly to them.
@rvagg rvagg requested a review from LexLuthr September 20, 2023 07:40
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

Merging #7 (cd7a930) into release/v0.13.x (b665467) will increase coverage by 0.20%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##           release/v0.13.x       #7      +/-   ##
===================================================
+ Coverage            63.84%   64.04%   +0.20%     
===================================================
  Files                   74       74              
  Lines                 8062     8061       -1     
===================================================
+ Hits                  5147     5163      +16     
+ Misses                2729     2713      -16     
+ Partials               186      185       -1     
Files Changed Coverage Δ
ipldutil/traverser.go 92.45% <ø> (+3.23%) ⬆️
testutil/identity.go 97.27% <100.00%> (+0.18%) ⬆️

... and 4 files with indirect coverage changes

@rvagg
Copy link
Member Author

rvagg commented Sep 20, 2023

This is 👌 , used in filecoin-project/boost#1704

@LexLuthr LexLuthr merged commit 8f40f51 into release/v0.13.x Sep 21, 2023
16 checks passed
@LexLuthr LexLuthr deleted the rvagg/identity-crisis branch September 21, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants