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

Warn when publishing ipns records without a running daemon. #4442

Open
Stebalien opened this issue Nov 30, 2017 · 4 comments
Open

Warn when publishing ipns records without a running daemon. #4442

Stebalien opened this issue Nov 30, 2017 · 4 comments
Labels
help wanted Seeking public contribution on this issue topic/commands Topic commands topic/ipns Topic ipns

Comments

@Stebalien
Copy link
Member

It technically works and has some use-cases but IPNS records won't persist unless a daemon republishes them in the background. This has now come up several times on the forums and I expect it to come up more frequently in the future.

@Stebalien Stebalien added topic/commands Topic commands help wanted Seeking public contribution on this issue topic/ipns Topic ipns labels Nov 30, 2017
@kjzz
Copy link
Contributor

kjzz commented Sep 13, 2018

Hey @Stebalien , if nobody is doing for this, Can i work on it?This can help me know more about ipns.Dou you have any advice for this issue?Add a warning log or others?
In addition,I have a question that if in terminal we can use command ps aux | grep ipfs to know any daemon running or not.Also golang has execpackage to execute command,but i do not think it is a great way.WDYT?

@Stebalien
Copy link
Member Author

After thinking about this, I believe we actually want to error out but add a flag to bypass the offline check. That is, add a boolean --allow-offline flag such that:

  1. If the flag isn't passed (or is false), return an error if the node is in "offline" mode. When I say "the daemon isn't running", I'm talking about offline mode. You can check this inside a command by checking node.OnlineMode(). See: https://github.com/ipfs/go-ipfs/blob/2de616300ba663018bb8918bea72193892059115/core/commands/name/publish.go#L81-L87

  2. If the flag is specified (true), keep the current behavior.

This will be a breaking API change but I believe it's for the best (most users would be surprised by the current behavior).

Given that this is a breaking change, anyone on @ipfs/go-team have opinions?

@kjzz
Copy link
Contributor

kjzz commented Sep 14, 2018

Thx for advice.I will work for this

@kjzz
Copy link
Contributor

kjzz commented Sep 17, 2018

Hey @Stebalien , i has refactor some code and add allow-offline command in publish.Please help me review the pr #5477 ,Thx a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue topic/commands Topic commands topic/ipns Topic ipns
Projects
No open projects
Development

No branches or pull requests

2 participants