Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 4506c6e

Browse files
committed
chore: add keychain and update table of contents
1 parent a85580c commit 4506c6e

File tree

1 file changed

+57
-36
lines changed

1 file changed

+57
-36
lines changed

doc/config.md

Lines changed: 57 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,22 @@ The js-ipfs config file is a JSON document located in the root directory of the
55
## Table of Contents
66

77
- [`Addresses`](#addresses)
8+
- API
9+
- Delegates
10+
- Gateway
11+
- Swarm
812
- [`Bootstrap`](#bootstrap)
913
- [`Datastore`](#datastore)
14+
- [`Spec`](#spec)
1015
- [`Discovery`](#discovery)
16+
- MDNS
17+
- webRTCStar
1118
- [`Identity`](#identity)
19+
- [`PeerID`](#peerid)
20+
- [`PrivKey`](#privkey)
1221
- [`Keychain`](#keychain)
1322
- [`Swarm`](#swarm)
14-
23+
- [`ConnMgr`](#connmgr)
1524

1625
## `Addresses`
1726
Contains information about various listener addresses to be used by this node.
@@ -59,40 +68,40 @@ initiate a connection to the network.
5968
Contains information related to the construction and operation of the on-disk
6069
storage system.
6170

62-
- `Spec`
63-
Spec defines the structure of the IPFS datastore. It is a composable structure, where each datastore is represented by a JSON object. Datastores can wrap other datastores to provide extra functionality (e.g. metrics, logging, or caching).
71+
#### Spec
72+
Spec defines the structure of the IPFS datastore. It is a composable structure, where each datastore is represented by a JSON object. Datastores can wrap other datastores to provide extra functionality (e.g. metrics, logging, or caching).
6473

65-
This can be changed manually, however, if you make any changes that require a different on-disk structure, you will need to run the [ipfs-ds-convert tool](https://github.com/ipfs/ipfs-ds-convert) to migrate data into the new structures.
74+
This can be changed manually, however, if you make any changes that require a different on-disk structure, you will need to run the [ipfs-ds-convert tool](https://github.com/ipfs/ipfs-ds-convert) to migrate data into the new structures.
6675

67-
Default:
68-
```
76+
Default:
77+
```json
78+
{
79+
"mounts": [
80+
{
81+
"child": {
82+
"path": "blocks",
83+
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
84+
"sync": true,
85+
"type": "flatfs"
86+
},
87+
"mountpoint": "/blocks",
88+
"prefix": "flatfs.datastore",
89+
"type": "measure"
90+
},
6991
{
70-
"mounts": [
71-
{
72-
"child": {
73-
"path": "blocks",
74-
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
75-
"sync": true,
76-
"type": "flatfs"
77-
},
78-
"mountpoint": "/blocks",
79-
"prefix": "flatfs.datastore",
80-
"type": "measure"
92+
"child": {
93+
"compression": "none",
94+
"path": "datastore",
95+
"type": "levelds"
8196
},
82-
{
83-
"child": {
84-
"compression": "none",
85-
"path": "datastore",
86-
"type": "levelds"
87-
},
88-
"mountpoint": "/",
89-
"prefix": "leveldb.datastore",
90-
"type": "measure"
91-
}
92-
],
93-
"type": "mount"
97+
"mountpoint": "/",
98+
"prefix": "leveldb.datastore",
99+
"type": "measure"
94100
}
95-
```
101+
],
102+
"type": "mount"
103+
}
104+
```
96105

97106
## `Discovery`
98107
Contains options for configuring IPFS node discovery mechanisms.
@@ -124,21 +133,34 @@ Contains options for configuring IPFS node discovery mechanisms.
124133

125134
## `Identity`
126135

127-
- `PeerID`
128-
The unique PKI identity label for this configs peer. Set on init and never read, its merely here for convenience. IPFS will always generate the peerID from its keypair at runtime.
136+
#### PeerID
137+
The unique PKI identity label for this configs peer. Set on init and never read, its merely here for convenience. IPFS will always generate the peerID from its keypair at runtime.
129138

130-
- `PrivKey`
131-
The base64 encoded protobuf describing (and containing) the nodes private key.
139+
#### PrivKey
140+
The base64 encoded protobuf describing (and containing) the nodes private key.
132141

133142
## `Keychain`
143+
We can customize the key management and criptographically protected messages by changing the Keychain options. Those options are used for generating the derived encryption key (`DEK`). The `DEK` object, along with the passPhrase, is the input to a PBKDF2 function.
134144

145+
Default:
146+
```json
147+
{
148+
"dek": {
149+
"keyLength": 512 / 8,
150+
"iterationCount": 1000,
151+
"salt": "at least 16 characters long",
152+
"hash": "sha2-512"
153+
}
154+
}
155+
```
135156

157+
You can check the [parameter choice for pbkdf2/](https://cryptosense.com/parameter-choice-for-pbkdf2/) for more information.
136158

137159
## `Swarm`
138160

139161
Options for configuring the swarm.
140162

141-
### `ConnMgr`
163+
#### ConnMgr
142164

143165
The connection manager determines which and how many connections to keep and can be configured to keep.
144166

@@ -160,7 +182,6 @@ The "basic" connection manager tries to keep between `LowWater` and `HighWater`
160182

161183
**Example:**
162184

163-
164185
```json
165186
{
166187
"Swarm": {

0 commit comments

Comments
 (0)