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: use the default links per block for importing file #560

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

alvin-reyes
Copy link
Contributor

@alvin-reyes alvin-reyes commented Nov 23, 2022

Changes

I noticed that the dag builder generates a different cid when from IPFS.

This PR will use the same default number of links per block configuration on the dag builder which will make it par with IPFS/Kubo.

I have tested it with several files and it works as expected. @en0ma please test this against your files as well.

@alvin-reyes alvin-reyes changed the base branch from master to dev November 23, 2022 00:27
@alvin-reyes alvin-reyes marked this pull request as ready for review November 23, 2022 00:28
Copy link
Contributor

@10d9e 10d9e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@en0ma
Copy link
Contributor

en0ma commented Nov 23, 2022

@alvin-reyes It did not work for me

outputs from the same files;

  • Estuary (this branch) - bafkreif376h46qwktu3bgxxvwrkqftqjjryqnm5dpbfz5kqr5jzvewtcgu
  • Kubo (ipfs add the_file -cid-version=1) - bafybeifpyygt45smwbigangoabvqv7roweq7qruucnqd63r4ihxiyfrwfi

@gmelodie
Copy link
Contributor

gmelodie commented Nov 26, 2022

@alvin-reyes I got both equal and different CIDs. The difference seems to be when the file is larger in size. For instance I got different CIDs for rockyou.txt:

estuary: bafybeihedpf2eftaa5bqcqfz7jd6tfnxwabxanhkc5o4ortgx3yxtgtb6a
ipfs: bafybeicyij7pqmzohg5ndc2kl2z445me52gufm5gx4ncd747pzqi7rbgxe

but the same for pinning.go:

bafkreic3uqrhu72hdl4nm6nrc37q6plb7x2xtmbtcj6724fywqaf25udu4

@alvin-reyes
Copy link
Contributor Author

alvin-reyes commented Nov 26, 2022

I realized that we don’t need to change the way we compute our CIDs since it’ll work either anyway. We encountered a weird behaviour last week where in the CIDs are different from the ones uploaded on api.estuary.tech and on shuttles.

I think @en0ma already fixed this on his commit (e.i revert the logic to dump the content to the blockstore).

I think it’s safe to close this one for now.

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.

4 participants