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

CID formatting changes #999

Closed
achingbrain opened this issue Apr 2, 2019 · 7 comments · Fixed by ipfs/ipld-explorer-components#18 or #1005
Closed

CID formatting changes #999

achingbrain opened this issue Apr 2, 2019 · 7 comments · Fixed by ipfs/ipld-explorer-components#18 or #1005
Assignees
Labels
exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up

Comments

@achingbrain
Copy link
Member

I've tried to explore a bafy CID but in the breadcrumb & the CID info it's displayed as zdj CID. It should probably retain the same encoding as the user types in.

image

I mean, I know these are all the same CID, but someone new to IPFS might not.

@olizilla olizilla self-assigned this Apr 2, 2019
@olizilla
Copy link
Member

olizilla commented Apr 2, 2019

Derp. Thanks for reporting.

@olizilla
Copy link
Member

olizilla commented Apr 2, 2019

Nice issue number.

@olizilla olizilla added kind/bug A bug in existing code (including security flaws) exp/intermediate Prior experience is likely helpful P1 High: Likely tackled by core team if no one steps up labels Apr 2, 2019
@achingbrain
Copy link
Member Author

achingbrain commented Apr 2, 2019

Nice issue number.

🚓🚒🚑

olizilla added a commit to multiformats/js-cid that referenced this issue Apr 3, 2019
BREAKING CHANGE - previously base was not preserved and all CIDs would
be normalised to base58btc when asking for their string representation.

The default will change to base32 in https://github.com/multiformats/js-cid/pull/73/files

The idea behind this change is that we shouldnt lose information when
the user passes us a base encoded string, but keep it and use it as
the default base so toString returns the same string they provided.

I'd like this as a fix for ipld explorer, which currently forces all
CIDs into base58btc, seee: ipfs/ipfs-webui#999

This PR is the smallest change I can see to make it work. Do we want
to also add base as a constructor parameter? If so, i guess it should
go at the end as it's optional, but thats aesthetically displeasing
as the base encoding goes at the front in string form.

License: MIT
Signed-off-by: Oli Evans <[email protected]>
vmx pushed a commit to multiformats/js-cid that referenced this issue Apr 4, 2019
BREAKING CHANGE: previously base was not preserved and all CIDs would
be normalised to base58btc when asking for their string representation.

The default will change to base32 in https://github.com/multiformats/js-cid/pull/73/files

The idea behind this change is that we shouldnt lose information when
the user passes us a base encoded string, but keep it and use it as
the default base so toString returns the same string they provided.

I'd like this as a fix for ipld explorer, which currently forces all
CIDs into base58btc, seee: ipfs/ipfs-webui#999

License: MIT
Signed-off-by: Oli Evans <[email protected]>
vmx pushed a commit to multiformats/js-cid that referenced this issue Apr 4, 2019
BREAKING CHANGE: previously base was not preserved and all CIDs would
be normalised to base58btc when asking for their string representation.

The default will change to base32 in https://github.com/multiformats/js-cid/pull/73/files

The idea behind this change is that we shouldnt lose information when
the user passes us a base encoded string, but keep it and use it as
the default base so toString returns the same string they provided.

I'd like this as a fix for ipld explorer, which currently forces all
CIDs into base58btc, seee: ipfs/ipfs-webui#999

License: MIT
Signed-off-by: Oli Evans <[email protected]>
@olizilla
Copy link
Member

olizilla commented Apr 8, 2019

This should be fixed in the next cids release now multiformats/js-cid#77 is merged.

@olizilla
Copy link
Member

olizilla commented Apr 8, 2019

@vmx please may you perform the release dance on js-cid when you get a moment so I can fix this here issue.

@vmx
Copy link
Member

vmx commented Apr 8, 2019

@olizilla Done.

@olizilla
Copy link
Member

olizilla commented Apr 8, 2019

Thank you sir @vmx

olizilla added a commit to ipfs/ipld-explorer-components that referenced this issue Apr 9, 2019
Previously, CID would normalise alternate bases to 'base58btc'.
In the 0.6 releae it preserves the base you provided. This means
IPLD Explorer can now show the CID info about the cid in you
gave it rather than the normalised version.

fixes: ipfs/ipfs-webui#999

License: MIT
Signed-off-by: Oli Evans <[email protected]>
olizilla added a commit to ipfs/ipld-explorer-components that referenced this issue Apr 9, 2019
Previously, CID would normalise alternate bases to 'base58btc'.
In the 0.6 releae it preserves the base you provided. This means
IPLD Explorer can now show the CID info about the cid in you
gave it rather than the normalised version.

fixes: ipfs/ipfs-webui#999


License: MIT
Signed-off-by: Oli Evans <[email protected]>
olizilla added a commit that referenced this issue Apr 9, 2019
- update to [email protected] for multiformats/js-cid#77

fixes: #999

License: MIT
Signed-off-by: Oli Evans <[email protected]>
olizilla added a commit that referenced this issue Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Projects
None yet
3 participants