This repository was archived by the owner on Feb 12, 2024. It is now read-only.
RFC: js-ipfs profiles #2148
Labels
exp/expert
Having worked on the specific codebase is important
exploration
kind/support
A question or request for support
P1
High: Likely tackled by core team if no one steps up
status/in-progress
In progress
A profile is a shorthand name for a set of configuration options. This issue is to discuss which profiles we should have in js-ipfs and how each one should affect the behaviour of js-ipfs.
go-ipfs profiles
The profiles available for go-ipfs are documented in its configuration README and implemented in profile.go. Those that apply to js-ipfs are:
server
/local-discovery
(opposite ofserver
)Addresses.NoAnnounce
- prevents advertising these addresses to other peersSwarm.AddrFilters
- prevents dialing to these addressesDiscovery.MDNS.Enabled
tofalse
Swarm.DisableNatPortMap
totrue
test
/default-networking
(opposite oftest
)/ip4/127.0.0.1/tcp/0
forAddresses.API
Addresses.Gateway
Addresses.Swarm
Discovery.MDNS.Enabled
tofalse
Swarm.DisableNatPortMap
totrue
Bootstrap
to[]
- prevents bootstrapping with live nodeslowpower
Routing.Type
todhtclient
- puts DHT in "client only" modeReprovider.Interval
to0
- prevents node from advertising what content it hasSwarm.ConnMgr
parameters - maintains low connection countSwarm.ConnMgr.LowWater
:20
Swarm.ConnMgr.HighWater
:40
Swarm.ConnMgr.GracePeriod
:one minute
randomports
Addresses.Swarm
to listen on localhost at a random available portjs-ipfs profiles
In js-ipfs we already auto-detect whether the instance is running in the browser or node js and set config variables accordingly, we can refactor to use the profiles mechanism.
The corresponding ConnectionManager parameters for js-libp2p are
Swarm.ConnMgr.LowWater
:ConnectionManager.minPeers
Swarm.ConnMgr.HighWater
:ConnectionManager.maxPeers
Swarm.ConnMgr.GracePeriod
:ConnectionManager.pollInterval
- approximately equivalentjs-ipfs / js-libp2p do not currently support these parameters:
Addresses.NoAnnounce
Swarm.AddrFilters
Swarm.DisableNatPortMap
- there is currently no NAT managerRouting.Type
- there is currently nodhtclient
modeReprovider.Interval
- there is currently no reprovidingThe text was updated successfully, but these errors were encountered: