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

In proc nodes can not be spawned on top of existing repos #214

Closed
JonKrone opened this issue Mar 7, 2018 · 6 comments
Closed

In proc nodes can not be spawned on top of existing repos #214

JonKrone opened this issue Mar 7, 2018 · 6 comments
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up

Comments

@JonKrone
Copy link
Contributor

JonKrone commented Mar 7, 2018

In-process js-ipfs instances are not aware of whether or not they have spawned on top of an existing repo. This basically breaks the node as it can neither .start or .init.

I believe this is the cause of an error mentioned in a TODO here:

// `Error: Not able to start from state: uninitalized`

I think a fix for this can largely mirror how a js-ipfs instance works if the repo exists.

Another in-proc node issue that might be good to group with this: #208

@linonetwo
Copy link

+1 . I was wondering how ipfs-desktop achieve this . https://github.com/ipfs-shipyard/ipfs-desktop/blob/master/src/index.js#L238.

I copy the code but I errors, then I found out, I'm using DaemonFactory.create({ type: 'proc', exec: require('ipfs'), port }) but ipfs-desktop is just using DaemonFactory.create() .

@linonetwo
Copy link

related? ipfs/js-ipfs#1245

@daviddias daviddias added kind/bug A bug in existing code (including security flaws) help wanted Seeking public contribution on this issue exp/expert Having worked on the specific codebase is important status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up P1 High: Likely tackled by core team if no one steps up and removed P2 Medium: Good to have, but can wait until someone steps up labels Mar 12, 2018
@JonKrone
Copy link
Contributor Author

@linonetwo

I was wondering how ipfs-desktop achieve this

Yeah, ipfs-desktop is not using a proc node but there is a fix in #212 (here) that should allow ipfs-desktop to skip that check and rely on the initialized property of the node they spawn.

related? ipfs/js-ipfs#1245

I don't think that it is. They both have to do with initialization but I think that they're separate. This particular issue is with js-ipfsd-ctl and that issue isn't spawning any daemons.

@dryajov
Copy link
Member

dryajov commented Mar 29, 2018

@JonKrone is this still an issue?

@linonetwo
Copy link

linonetwo commented Mar 30, 2018

@dryajov Seems fixed, I'm using ipfs 0.28.2 and ipfsd-ctl 0.31.0. @JonKrone I think this can be closed.

@linonetwo
Copy link

So now we can copy the huge repo to a flash drive, and init on it at another country.

@JonKrone JonKrone closed this as completed Apr 3, 2018
@ghost ghost removed the status/ready Ready to be worked label Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue 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
Development

No branches or pull requests

4 participants