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 dependency to merkledag in go-car/v2 #266

Open
masih opened this issue Nov 16, 2021 · 2 comments
Open

Remove dependency to merkledag in go-car/v2 #266

masih opened this issue Nov 16, 2021 · 2 comments
Labels
P3 Low: Not priority right now

Comments

@masih
Copy link
Member

masih commented Nov 16, 2021

merkledag dependency in go-car/v2 is used purely in testing. It carries with it a number of heavy dependencies. Remove and use alternatives in testing.

@BigLep BigLep added the P3 Low: Not priority right now label May 3, 2022
@MichaelMure
Copy link
Contributor

MichaelMure commented Feb 20, 2023

It would be neat (not just for this project) to have an equivalent of https://github.com/ipfs/go-ipfs-blocksutil to generate DAGs and nodes for testing. That would resolve that issue as far as I can tell.

@rvagg
Copy link
Member

rvagg commented Feb 20, 2023

I think most of the use of merkledag is just NewRawNode() which could be fairly easily replaced by a new utility function that does the same. There's a few ProtoNode uses but they could also be replaced by direct use of go-codec-dagpb (which merkledag uses anyway).

The biggest sticking point is probably in internal/carv1/car.go, which isn't just for testing, where we do a merkledag.Walk. This could be replaced with a go-ipld-prime traversal but it's not as simple as a one-line replacement.

But I do agree that we should remove it, the more of these old libraries we can detach from here the better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

4 participants