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 Node Init: 1st Draft #83

Closed
wants to merge 4 commits into from
Closed

IPFS Node Init: 1st Draft #83

wants to merge 4 commits into from

Conversation

hackergrrl
Copy link

Heya! This aims to document how to initialize an IPFS node, based on the de facto code in go-ipfs. I'd love reviews & comments in particular from

  • @whyrusleeping: for review of technical correctness
  • @diasdavid: for feedback from the perspective of someone unfamiliar with init who'd be implementing it
  • @RichardLitt: for English & technical proof-reading

@jbenet jbenet added the backlog label Mar 9, 2016

```json
"Bootstrap": [
// mars.i.ipfs.io
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that comments are not valid JSON (unfortunately)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. :(

@daviddias
Copy link
Member

This looks pretty sweet @noffle. Really throughout specification of the init process, perfect to be followed by other implementations. The building blocks to implement this in JS are there (peer-info, peer-id, ipfs-repo that works in Node.js and the browser), let me know if you encounter any obstacle :)

"Version": {
"AutoUpdate": "minor",
"Check": "error",
"CheckPeriod": "172800000000000", // 48 hours
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those three values arent currently used. should either do something with them or remove them

@whyrusleeping
Copy link
Member

This looks good to me! thanks for documenting

-f|--force: whether to overwrite an existing repo config. Defaults to false.
-e|--empty-repo: whether to add+pin ipfs info help files to the repo. Defaults to false.
-b|--bits: # of bits to use in the generated RSA private key. Defaults to 2048.
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's an important difference between:

  • an ipfs node (logical idea of what an ipfs node is)
  • a commandline tool that inits an ipfs node (a projection of the abstract concept into a concrete implementation, in this case a cli tool based one)

the upshot is that we may need two docs:

  • one doc that describes initializing an ipfs node, namely might specify "options", but not "commandline flags". for example, IPFS_PATH env var would NOT belong here. (may be too abstract for this doc).
  • a doc that describes how initializing an ipfs node happens through cli tools like go-ipfs and js-ipfs (more this doc)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is similar to how we have "a repo spec" (abstract) and an "fs-repo spec" (concrete)

@jbenet
Copy link
Member

jbenet commented Mar 9, 2016

good idea to document all this! we need to:

  • (at some point) make a spec for a "logical" node (abstract)
  • (now) decide whether some of these things we want ALL implementations to do or not.

if we dont mean ALL impls to use it, only go-ipfs, i dont think it is very useful to have this separate from the go-ipfs codebase. if its go-ipfs specific, it should be represented by code and tests and maybe comments.


#### Bootstrap Peers

The default bootstrap peers form the following config tree:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have a short writeup about what these are -- servers or nodes hosted by IPFS.

@hackergrrl
Copy link
Author

(at some point) make a spec for a "logical" node (abstract)

I sort of asked about this in another comment, but where are the points of differentiation between a logical node and [whatever this doc currently describes]?

(now) decide whether some of these things we want ALL implementations to do or not.

Agreed.

if we dont mean ALL impls to use it, only go-ipfs, i dont think it is very useful to have this separate from the go-ipfs codebase. if its go-ipfs specific, it should be represented by code and tests and maybe comments.

Agreed. I intend for this document to generalize to any IPFS implementation.

@hackergrrl
Copy link
Author

Thanks everyone.

Based on @jbenet's comments, it sounds like this doc needs to be more abstract: covering initialization on a generic IPFS node that may/may not have things like a CLI or RSA keypairs or even standard out.

@hackergrrl hackergrrl mentioned this pull request Mar 10, 2016
5 tasks
@hackergrrl
Copy link
Author

I've integrated this doc as a comment for now, since it is too concrete to be a general "IPFS Node Init" specification. It however serves well enough as a "here's how to do init if you're writing an IPFS implementation that is very go-ipfs-like (unixfs, has a CLI).

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.

5 participants