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

ipld: adding IPLD package to provide helpers for dealing with IPLD-based data storage #110

Merged
merged 5 commits into from
Oct 7, 2021

Conversation

renaynay
Copy link
Member

@renaynay renaynay commented Oct 4, 2021

This PR adds in the IPLD plugin that was previously in core (ref). This plugin is necessary for BlockStore as we are using Bitswap to exchange block data.

Eventually this plugin should be removed from this repository (as per #111).

@renaynay renaynay force-pushed the ipld-plugin branch 2 times, most recently from 3e352ed to fc5d319 Compare October 5, 2021 18:06
@renaynay renaynay marked this pull request as ready for review October 5, 2021 18:19
go.mod Outdated Show resolved Hide resolved
ipld/nmt_adder.go Outdated Show resolved Hide resolved
ipld/read.go Show resolved Hide resolved
ipld/write.go Outdated Show resolved Hide resolved
ipld/write.go Show resolved Hide resolved
ipld/plugin/nmt.go Outdated Show resolved Hide resolved
ipld/plugin/nmt.go Outdated Show resolved Hide resolved
ipld/plugin/nmt.go Outdated Show resolved Hide resolved
ipld/share.go Outdated Show resolved Hide resolved
@renaynay renaynay requested a review from adlerjohn October 6, 2021 11:22
@evan-forbes
Copy link
Member

evan-forbes commented Oct 7, 2021

should we be including the test file for the plugin? https://github.com/celestiaorg/celestia-core/blob/c4f2a98f4928d3b04517621c5792744c106ba306/pkg/da/ipfs/plugin/nmt_test.go

I managed to get the above tests to work by switching to an older version of go (1.15.6), as quic-go has a dependecy that is archived and won't work with any version greater than that. https://github.com/marten-seemann/qtls

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

LGMT! Thanks John for the review too!

@liamsi
Copy link
Member

liamsi commented Oct 7, 2021

should we be including the test file for the plugin?

At least this test uses the ipfs API which I don't think is the plan here. The other tests make sense. Surprised that quic would be a dependency then though 🤔

@renaynay renaynay merged commit f4f1374 into celestiaorg:main Oct 7, 2021
@renaynay renaynay deleted the ipld-plugin branch October 7, 2021 10:55
@@ -2,19 +2,27 @@ module github.com/celestiaorg/celestia-node

go 1.16

replace github.com/ipfs/go-verifcid => github.com/celestiaorg/go-verifcid v0.0.1-lazypatch
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, this is still required as we rely on Blockservice which relies on this check. We can remove this once we migrate to newer IPLD stack.

github.com/celestiaorg/rsmt2d v0.3.0
github.com/ipfs/go-bitswap v0.4.0
github.com/ipfs/go-bitswap v0.3.4
Copy link
Member

Choose a reason for hiding this comment

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

Well, this downgrade was not supposed to happen 🤔

Copy link
Member

Choose a reason for hiding this comment

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

That's my bad. Rene updated to the latest versions of ipld etc and I told her to use the same versions of that stack that worked in core (and bitswap v0.3.4 was used there IIRC). Thanks for opening #137.

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

@renaynay, it would be cool if you did here the same mistake as in #97 and co-authored all commits here with me and @evan-forbes, as you did for yourself 😉

github.com/ipfs/go-merkledag v0.4.0
github.com/ipfs/go-merkledag v0.3.2
github.com/ipfs/go-peertaskqueue v0.4.0 // indirect
github.com/ipld/go-ipld-prime v0.11.0 // indirect
Copy link
Member

Choose a reason for hiding this comment

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

Well, we should double-check why this dependency is here. That's basically an import of the newer IPLD stack that we are not using.

@Wondertan
Copy link
Member

Wondertan commented Oct 15, 2021

from #110 (comment)
Yes sure, but can you add a comment there so we don't forget that we can and probably should eventually change it?

@adlerjohn, It should be optimized once we have celestiaorg/rsmt2d#60

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.

5 participants