Skip to content

fix: restore standalone js-ipld instance #289

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

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

lidel
Copy link
Member

@lidel lidel commented Apr 12, 2021

This PR partially reverts #287 because /api/v0/dag in go-ipfs do not implement latest IPLD features yet, and ipfs-http-client delegates path traversal and resolution to go-ipfs, so codecs in JS are never used, and what is in go-ipfs under dag commands is not enough.

By reverting to standalone js-ipld we decouple IPLD explorer from what is available in go-ipfs – we simply fetch raw block and do all decoding the old way, in JS.

We will revisit this in the future, after IPLD Prime work lands in go-ipfs, but for now this is the only way to fix IPLD Explorer to work against go-ipfs backend and correctly traverse dag-pb and dag-cbor

This PR partially  reverts
#287
because `/api/v0/dag` in go-ipfs do not implement latest IPLD features
yet, and ipfs-http-client delegates path traversal and resolution to
go-ipfs, so codecs in JS are never used.

By reverting to standalone js-ipld we decouple IPLD explorer from what
is available in go-ipfs – we simply fetch raw block and do all decoding
the old way, in JS.

We will revisit this in the future, after IPLD Prime work lands in
go-ipfs, but for now this is the only way to fix IPLD Explorer to work
against go-ipfs backend.

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
@lidel lidel requested a review from rafaelramalho19 April 12, 2021 00:38
@lidel lidel merged commit 2b5ca47 into master Apr 12, 2021
@lidel lidel deleted the fix/restore-standalone-ipld-instance branch April 12, 2021 00:40
lidel added a commit to ipfs/ipfs-webui that referenced this pull request Apr 12, 2021
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.

1 participant