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

ipfs id --offline <peerid> does not work offline #8481

Closed
3 tasks done
lidel opened this issue Oct 1, 2021 · 4 comments · Fixed by #8626
Closed
3 tasks done

ipfs id --offline <peerid> does not work offline #8481

lidel opened this issue Oct 1, 2021 · 4 comments · Fixed by #8626
Assignees
Labels
kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up topic/api Topic api

Comments

@lidel
Copy link
Member

lidel commented Oct 1, 2021

Checklist

Installation method

built from source

Version

0.10.0

Config

(default)

Description

ipfs id --peerid-base base36 --offline <peerid> does not work – it requires connection and hangs until one is established.

Rationale why this should be prioritized

We would like to have an easy way for converting peerids to a CIDv1 in arbitrary multibase.
Right now, there is no universal way that works for all peerid types and is easy to use.
Example: https://discuss.ipfs.io/t/command-line-to-transform-base58-peerid-to-subdomain-friendly-base36/12330/3?u=lidel

ipfs id --peerid-base base36 --offline $PEERID | jq --raw-output .ID nearly does the job, but it does not respect --offline flag and requires connection to the peer.

@lidel lidel added kind/bug A bug in existing code (including security flaws) topic/api Topic api P2 Medium: Good to have, but can wait until someone steps up labels Oct 1, 2021
@lidel lidel changed the title ipfs id --offline <peerid> does not work ipfs id --offline <peerid> does not work offline Oct 1, 2021
@BigLep BigLep added this to Weekly Candidates in Maintenance Priorities - Go Oct 8, 2021
@schomatis schomatis self-assigned this Dec 23, 2021
@schomatis
Copy link
Member

schomatis commented Dec 28, 2021

Agreed with triage and working on this. It seems to me that if we only need encoding conversion this should live in an independent command maybe. Regardless, I'll implement it here and we can decouple it later if we want.

@schomatis schomatis moved this from Weekly Candidates to In Progress in Maintenance Priorities - Go Dec 28, 2021
@schomatis
Copy link
Member

schomatis commented Dec 28, 2021

@lidel There is no --offline option in this command (not even in the form of documentation or a fixme, just an error message). My interpretation of it and please correct/complete if wrong is: do not attempt to connect to the peer (no matter if the daemon is running or not) and just print whatever information we have in the peer address book (which will likely be nothing except for the converted peer ID).

@schomatis
Copy link
Member

schomatis commented Dec 28, 2021

(Is the daemon's --offline option supposed to apply here? I'm getting a collision when adding a local --offline option so I'm assuming there is a global one up in the hierarchy which is the one referred in this issue.)

@schomatis
Copy link
Member

schomatis commented Dec 31, 2021

The global offline option is in:

https://github.com/ipfs/go-ipfs/blob/91c52657166bcf86f2476926e4fe56694dc26562/core/commands/root.go#L25

@BigLep BigLep added this to In Review in Go IPFS Roadmap Jan 5, 2022
Maintenance Priorities - Go automation moved this from In Progress to Done Feb 10, 2022
Go IPFS Roadmap automation moved this from In Review to Done Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up topic/api Topic api
Projects
Development

Successfully merging a pull request may close this issue.

2 participants