Understanding config
Note: quote blocks are things taken straight from the official documentation. Note: doc only handles options mentioned in the default config
Config as it is:
{
"Identity": {
"PeerID": "12D3KooWSdgBKGvuWzAba7nW73pyDYAYndvsYE7HsmyxLFTmyNn3",
"PrivKey": "CAESQM7IiDoJFs/0Tm/xWBnHqgwaUM6KmTUJweQSPaGuhZDT+dmnFEo3M2yuazCu7T1yMsU/nslPIdhdmX/9NfCCjeg="
},
"Datastore": {
"StorageMax": "10GB",
"StorageGCWatermark": 90,
"GCPeriod": "1h",
"Spec": {
"mounts": [
{
"child": {
"path": "blocks",
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
"sync": true,
"type": "flatfs"
},
"mountpoint": "/blocks",
"prefix": "flatfs.datastore",
"type": "measure"
},
{
"child": {
"compression": "none",
"path": "datastore",
"type": "levelds"
},
"mountpoint": "/",
"prefix": "leveldb.datastore",
"type": "measure"
}
],
"type": "mount"
},
"HashOnRead": false,
"BloomFilterSize": 0
},
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001",
"/ip4/0.0.0.0/udp/4001/quic-v1",
"/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
"/ip6/::/udp/4001/quic-v1",
"/ip6/::/udp/4001/quic-v1/webtransport"
],
"Announce": [],
"AppendAnnounce": [],
"NoAnnounce": [],
"API": "/ip4/127.0.0.1/tcp/5001",
"Gateway": "/ip4/127.0.0.1/tcp/8080"
},
"Mounts": {
"IPFS": "/ipfs",
"IPNS": "/ipns",
"FuseAllowOther": false
},
"Discovery": {
"MDNS": {
"Enabled": true
}
},
"Routing": {
"AcceleratedDHTClient": false,
"Routers": null,
"Methods": null
},
"Ipns": {
"RepublishPeriod": "",
"RecordLifetime": "",
"ResolveCacheSize": 128
},
"Bootstrap": [
"/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/ip4/104.131.131.82/udp/4001/quic-v1/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt"
],
"Gateway": {
"HTTPHeaders": {},
"RootRedirect": "",
"PathPrefixes": [],
"APICommands": [],
"NoFetch": false,
"NoDNSLink": false,
"DeserializedResponses": null,
"DisableHTMLErrors": null,
"PublicGateways": null,
"ExposeRoutingAPI": null
},
"API": {
"HTTPHeaders": {}
},
"Swarm": {
"AddrFilters": null,
"DisableBandwidthMetrics": false,
"DisableNatPortMap": false,
"RelayClient": {},
"RelayService": {},
"Transports": {
"Network": {},
"Security": {},
"Multiplexers": {}
},
"ConnMgr": {},
"ResourceMgr": {}
},
"AutoNAT": {},
"Pubsub": {
"Router": "",
"DisableSigning": false
},
"Peering": {
"Peers": null
},
"DNS": {
"Resolvers": {}
},
"Migration": {
"DownloadSources": [],
"Keep": ""
},
"Provider": {
"Strategy": ""
},
"Reprovider": {},
"Experimental": {
"FilestoreEnabled": false,
"UrlstoreEnabled": false,
"Libp2pStreamMounting": false,
"P2pHttpProxy": false,
"StrategicProviding": false,
"OptimisticProvide": false,
"OptimisticProvideJobsPoolSize": 0
},
"Plugins": {
"Plugins": null
},
"Pinning": {
"RemoteServices": {}
},
"Internal": {}
}
Addresses
- info about listeners.
Addresses.API
- address where local HTTP API is served
- must not be made public
- gives admin access
- RCE possible
Info
Supported Transports:
- tcp/ip{4,6} -
/ipN/.../tcp/...
- unix -
/unix/path/to/socket
Default:
/ip4/127.0.0.1/tcp/5001
Type:strings
(multiaddrs)
Addresses.Gateway
- local gateway info
- make accessible in local network
- mind CORS
Info
Supported Transports:
- tcp/ip{4,6} -
/ipN/.../tcp/...
- unix -
/unix/path/to/socket
Default:
/ip4/127.0.0.1/tcp/8080
Type:strings
(multiaddrs)
Addresses.swarm
- addresses facilitating p2p swarm connections
- simple network abstraction is called swarm != swarm in ethereum
Info
Supported Transports:
- tcp/ip{4,6} -
/ipN/.../tcp/...
- websocket -
/ipN/.../tcp/.../ws
- quicv1 (RFC9000) -
/ipN/.../udp/.../quic-v1
- can share the same two tuple with/quic-v1/webtransport
- webtransport
/ipN/.../udp/.../quic-v1/webtransport
- can share the same two tuple with/quic-v1
Addresses.Announce
- if non-empty, used to explicitly specify addresses used for swarm connections
- overrides inferred addresses
Addresses.AppendAnnounce
- same as Addresses.Announce
- doesn’t override inferred addresses
Addresses.NoAnnounce
- basically, blacklisting
API
- API gateway info
API.HTTPHeaders
- headers for responses from the API HTTP server
AutoNAT
- config options for AutoNAT
- helps to determine if a node is accessible from rest of the internet
Bootstrap
- trusted nodes
- connects and fetches other nodes on startup
Stopping, 29/11, 11:23