-
Notifications
You must be signed in to change notification settings - Fork 1.2k
init #42
Comments
updated this issue |
FlagsThere are some optional flags that may be supplied to
Initialization Sequence1. Verify Initial ConditionsBefore initialization can begin, the following must be true:
If all of these are satisfied, output 2. Generate Repo ConfigurationThese are the steps to producing the default config tree. The actual output format will depend on the repo backend (i.e. likely JSON if fs-repo). Check the specification for the relevant backend if unsure. The following sections describe the various subtrees in the config and how to generate them. For simplicity and consistency, JSON will be used. IdentityThe RSA keypair must be >= 1024 bits. Before beginning key generation, write Generate the keypair. If successful, append The private key must be formatted as the base64 encoding of its bytes. It is currently stored unencrypted. The PeerID must be formatted as Base58.Encode(Multihash('SHA2-256', PublicKey.Bytes)) Resulting in the following config tree entry: "Identity": {
"PeerID": "<PeerID>",
"PrivKey": "<PrivKey>"
} Finally, write Bootstrap PeersThe default bootstrap peers form the following config tree: "Bootstrap": [
"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z",
"/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
"/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm",
"/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
"/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64",
"/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd",
"/ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3",
"/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx"
] VersionThis is the "Version": {
"Current": "v0.4.0-dev"
} MiscellaneousThere are some other various static values that also must be included in the config tree: // setup the node's default addresses.
// Note: two swarm listen addrs, one tcp, one utp.
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001"
],
"API": "/ip4/127.0.0.1/tcp/5001",
"Gateway": "/ip4/127.0.0.1/tcp/8080"
},
"Discovery": {
"MDNS": {
"Enabled": true,
"Interval": 10,
}
},
"Mounts": {
"IPFS": "/ipfs",
"IPNS": "/ipns"
},
"Ipns": {
"ResolveCacheSize": 128,
},
"Gateway": {
"RootRedirect": "",
"Writable": false
}, 3. Initialize the RepoThe exact process will depend on the repo backend (fs-repo, mem-repo, s3-repo) being used. If at this point the repo already exists, destroy it. We can do this safely because at this point either a) there is no pre-existing repo, or b) there is a repo, but At this point the config tree should now be written to the repo. 4. Add Default AssetsThe exact set of assets to include is the directory structure defined in If the flag Otherwise, add the If successful, write
to standard out. 5. Initialize IPNS RecordFinally, bring up the newly initialized IPFS node and publish its public key's IPNS record to the empty directory:
|
Draft for a "real" spec: ipfs/specs#83 |
Does this still need to be open? |
just missing #96 to be merged, right? |
🎉🎉🎉🎉 one more issue that can be closed! :D Thank you @noffle :D |
Fix broken link
What are the things that occur during a
ipfs init
? (From key generation, if those base files are c&p or fetched from the network, etc). It would be good to make this part of IPFS spec itself.Implementation roadmap
The text was updated successfully, but these errors were encountered: