Commit Graph

301 Commits

Author SHA1 Message Date
Steve Loeppky
6f730dc268
Doc improvements and changelog for resource manager (#9413)
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-11-16 11:26:59 +01:00
Steve Loeppky
9eeca82269 Revert "Doc improvements for rcmgr"
This reverts commit b1a89c93e4.
2022-11-16 08:32:24 +00:00
Steve Loeppky
b1a89c93e4 Doc improvements for rcmgr
This was done taking a fresh look for someone learning about
the resource manager being enabled by default.

Moved and expanded documentation to the right places for more visibility.

Added an initial changelog entry.
2022-11-16 08:06:23 +00:00
Marcin Rataj
db3d1cd8e1 fix(docs): typo 2022-11-15 21:36:10 +01:00
Lucas Molas
65365192f7 refactor(config): remove Swarm.ConnMgr defaults
This moves defaults to Kubo code, cleaning up config.
If value is in config, we assume it is an explicit choice made by user.
Makes migrations easier.
2022-11-15 21:34:38 +01:00
Lucas Molas
e34c0da2b5 refactor(config): remove Swarm.ConnMgr defaults
This moves defaults to Kubo code, cleaning up config.
If value is in config, we assume it is an explicit choice made by user.
Makes migrations easier.
2022-11-15 20:26:59 +01:00
Antonio Navarro Perez
e58cde1789
docs: Deprecate Reframe on docs. (#9401) 2022-11-15 17:01:08 +01:00
Marcin Rataj
fd1a8f2cec
fix(docs): typo 2022-11-11 00:05:02 +01:00
Antonio Navarro Perez
254d81a9d5
feat: Improve ResourceManager UX (#9338)
This PR adds several new functionalities to make easier the usage of ResourceManager:

- Now resource manager logs when resources are exceeded are on ERROR instead of warning.
- The resources exceeded error now shows what kind of limit was reached and the scope.
- When there was no limit exceeded, we print a message for the user saying that limits are not exceeded anymore.
- Added `swarm limit all` command to show all set limits with the same format as `swarm stats all`
- Added `min-used-limit-perc` option to `swarm stats all` to only show stats that are above a specific percentage
- Simplify a lot default values.
- **Enable ResourceManager by default.**

Output example:
```
2022-11-09T10:51:40.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:51:50.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 483095 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:51:50.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:00.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 455294 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:00.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:10.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 471384 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:10.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 8 times with error "peer:12D3KooWKqcaBtcmZKLKCCoDPBuA6AXGJMNrLQUPPMsA5Q6D1eG6: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 192 times with error "peer:12D3KooWPjetWPGQUih9LZTGHdyAM9fKaXtUxDyBhA93E3JAWCXj: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 469746 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 484137 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 29 times with error "peer:12D3KooWPjetWPGQUih9LZTGHdyAM9fKaXtUxDyBhA93E3JAWCXj: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:40.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 468843 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:40.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:50.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 366638 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:50.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:00.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 405526 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:00.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 107 times with error "peer:12D3KooWQZQCwevTDGhkE9iGYk5sBzWRDUSX68oyrcfM9tXyrs2Q: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:00.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:10.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 336923 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:10.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 71 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:64      Resrouce limits are no longer being exceeded.

```
## Validation tests

- Accelerated DHT client runs with no errors when ResourceManager is active. No problems were observed.
- Running an attack with 200 connections and 1M streams using yamux protocol. Node was usable during the attack. With ResourceManager deactivated, the node was killed by the OS because of the amount of memory consumed.
	- Actions done when the attack was active:
		- Add files 
		- Force a reprovide
		- Use the gateway to resolve an IPNS address.

It closes #9001 
It closes #9351
It closes #9322
2022-11-10 12:25:57 +01:00
Henrique Dias
4291d6b236
fix: add InlineDNSLink flag to PublicGateways config (#9328)
https://github.com/ipfs/kubo/issues/9243
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-10-11 15:45:43 +02:00
Jorropo
b539cd4e47 docs: add WebTransport docs 2022-09-27 16:14:34 +02:00
Antonio Navarro Perez
d1b9e41fc2
feat: Delegated routing with custom configuration. (#9274)
New multi-router configuration system based on https://hackmd.io/G1KRDEX5T3qyfoBMkIrBew#Methods

- Added a new routing type: "custom"
- Added specific struct types for different Routers (instead of map[string]interface{})
- Added `Duration` config type, to make easier time string parsing
- Added config documentation.
- Use the latest go-delegated-routing library version with GET support.
- Added changelog notes for this feature.

It:
- closes #9157
- closes #9079
- closes #9186
2022-09-22 15:47:45 +02:00
eth-limo
8e2bf82f97
docs: fix broken ENS DoH example (#9281) 2022-09-21 00:37:47 +02:00
Marcin Rataj
c9693edbc5 chore: remove Gateway.PathPrefixes
Closes #7702
2022-08-30 15:38:04 +02:00
Oleg
6516883b6b
correct data type for Reprovider.Interval (#9224)
* correct data type for Reprovider.Interval

Signed-off-by: Oleg Silkin <16809287+osilkin98@users.noreply.github.com>
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2022-08-25 12:27:42 -07:00
Marcin Rataj
9c6094e651 docs(config): mention routing.delegate.ipfs.io 2022-08-18 16:52:44 +02:00
Marcin Rataj
77251b60c4
test(rcmgr): regression test prometherus metrics 2022-08-17 01:27:50 +02:00
Marcin Rataj
5ca74c7f7a docs(config): Swarm.ResourceMgr.Allowlist 2022-08-17 00:38:51 +02:00
Brendan O'Brien
8fd49badc2
Add reference to Experimental config doc (#9181)
* Add reference to Experimental config doc

this clarifies that `Experimental` is in fact a top level configuration key, and links to the most current documentation

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-08-11 10:15:08 -07:00
Seungbae Yu
cb280cbf16
docs: replace docs.ipfs.io with docs.ipfs.tech (#9158)
* docs: fix redirecting URL in README.md
* all: replace `docs.ipfs.io` with `docs.ipfs.tech`
* apply suggestions from code review

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-08-05 19:01:10 +03:00
lostystyg
f9db823138
chore: fix markdown link syntax typo for AutoNAT.ServiceMode 2022-08-03 15:17:28 +02:00
Marcin Rataj
bcab64d42d docs(config): add link to someguy router 2022-07-21 21:00:39 +02:00
Antonio Navarro Perez
92c4dc61a8
feat(routing): Delegated Routing (#8997)
* Delegated Routing.

Implementation of Reframe specs (https://github.com/ipfs/specs/blob/master/REFRAME.md) using go-delegated-routing library.

* Requested changes.

* Init using op string

* Separate possible ContentRouters for TopicDiscovery.

If we don't do this, we have a ciclic dependency creating TieredRouter.
Now we can create first all possible content routers, and after that,
create Routers.

* Set dht default routing type

* Add tests and remove uneeded code

* Add documentation.

* docs: Routing.Routers

* Requested changes.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>

* Add some documentation on new fx functions.

* Add changelog entry and integration tests

* test: sharness for 'dht' in 'routing' commands

Since 'routing' is currently the same as 'dht' (minus query command)
we need to test both, that way we won't have unnoticed divergence
in the default behavior.

* test(sharness): delegated routing via reframe URL

* Add more tests for delegated routing.

* If any put operation fails, the tiered router will fail.

* refactor: Routing.Routers: Parameters.Endpoint

As agreed  in https://github.com/ipfs/kubo/pull/8997#issuecomment-1175684716

* Try to improve CHANGELOG entry.

* chore: update reframe spec link

* Update go-delegated-routing dependency

* Fix config error test

* use new changelog format

* Remove port conflict

* go mod tidy

* ProviderManyWrapper to ProviderMany

* Update docs/changelogs/v0.14.md

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-07-07 17:10:25 -04:00
Marcin Rataj
8565bbb75c
refactor: kubo in ./docs 2022-07-06 23:45:25 +02:00
Daniel N
e5f63393ff docs: refine wording 2022-07-06 22:47:07 +02:00
Daniel N
d323189598 docs: refine the wording of provider strategies 2022-07-06 22:47:07 +02:00
Marcin Rataj
61f0710100
fix: remove mdns_legacy & Discovery.MDNS.Interval
* fix: remove mdns_legacy

We've been running both implementations for a long, long time.
It is time to remove legacy version and lower the number of LAN packets
IPFS node produces.

See https://github.com/ipfs/go-ipfs/pull/9048#discussion_r906814717
for the Interval removal rational.
2022-06-27 04:17:40 +02:00
Marcin Rataj
88d88158c6 docs: mark Swarm.ResourceMgr as experimental 2022-06-16 14:34:13 -04:00
Gus Eggert
b1c051d250
feat: disable resource manager by default (#9003)
* feat: disable resource manager by default

We are disabling this by default for v0.13 as we work to improve the
UX around Resource Manager. It is still usable and can be enabled in
the IPFS config with "ipfs config --bool Swarm.ResourceMgr.Enabled true".

We intend to enable Resource Manager by default in a subsequent
release.

* docs(config): Swarm.ResourceMgr disabled by default

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-06-02 10:31:06 -04:00
Marcin Rataj
53299e84e0
chore: mark fuse experimental (#8962)
It works only on some platforms, and does not work reliably.
This corrects our error of not setting expectations right.
2022-05-12 10:32:54 -07:00
Gus Eggert
3d527753ff feat: enable Resource Manager by default 2022-05-04 14:08:37 -04:00
Marcin Rataj
cab69276e9 docs: Swarm.ResourceMgr.Limits 2022-05-03 16:21:03 -04:00
Adin Schmahmann
7ad6447453 feat: enable hole-punching by default 2022-05-03 14:26:09 -04:00
Lucas Molas
25cc85fa93
feat(gateway): Gateway.FastDirIndexThreshold (#8853)
* fix(core/gateway): option to limit directory size listing

* feat(gw): HTMLDirListingLimit

This is alternative take on the way we limit the HTML listing output.
Instead of a hard cut-off, we list up to HTMLDirListingLimit.
When a directory has more items than HTMLDirListingLimit we show
additional header and footer informing user that only $HTMLDirListingLimit
items are listed. This is a better UX.

* fix: 0 disables Gateway.HTMLDirListingLimit

* refactor: Gateway.FastDirIndexThreshold

see explainer in docs/config.md

* refactor: prealoc slices

* docs: Gateway.FastDirIndexThreshold

* refactor: core/corehttp/gateway_handler.go

https://github.com/ipfs/go-ipfs/pull/8853#discussion_r851437088

* docs: apply suggestions from code review

Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2022-04-28 19:36:57 +02:00
Marten Seemann
232ccb4e55
feat: relay v2 discovery (go-libp2p v0.19.0) (#8868)
* update go-libp2p to v0.19.0
* chore: go-namesys v0.5.0
* refactor(config): cleanup relay handling
* docs(config): document updated defaults
* fix(tests): panic during sharness

* fix: t0160-resolve.sh
See https://github.com/ipfs/go-namesys/pull/32

* fix: t0182-circuit-relay.sh
* test: transport encryption

Old tests were no longer working because go-libp2p 0.19 removed
the undocumented 'ls' pseudoprotocol.

This replaces these tests with handshake attempt (name is echoed back on
OK or 'na' is returned when protocol is not available) for tls and noise
variants + adds explicit test that safeguards us against enabling
plaintext by default by a mistake.

* fix: ./t0182-circuit-relay.sh

test is flaky, for now we just restart the testbed when we get
NO_RESERVATION error

* refactor: AutoRelayFeeder with exp. backoff

It starts at feeding peers ever 15s, then backs off each time
until it is done once an hour

Should be acceptable until we have smarter mechanism in go-lib2p 0.20

* feat(AutoRelay): prioritize Peering.Peers

This ensures we feed trusted Peering.Peers in addition to any peers
discovered over DHT.

* docs(CHANGELOG): document breaking changes

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
2022-04-28 17:13:15 +02:00
Marten Seemann
514411bedb
feat: opt-in Swarm.ResourceMgr (go-libp2p v0.18) (#8680)
* update go-libp2p to v0.18.0

* initialize the resource manager

* add resource manager stats/limit commands

* load limit file when building resource manager

* log absent limit file

* write rcmgr to file when IPFS_DEBUG_RCMGR is set

* fix: mark swarm limit|stats as experimental

* feat(cfg): opt-in Swarm.ResourceMgr

This ensures we can safely test the resource manager without impacting
default behavior.

- Resource manager is disabled by default
    - Default for Swarm.ResourceMgr.Enabled is false for now
- Swarm.ResourceMgr.Limits allows user to tweak limits per specific
  scope in a way that is persisted across restarts
- 'ipfs swarm limit system' outputs human-readable json
- 'ipfs swarm limit system new-limits.json' sets new runtime limits
  (but does not change Swarm.ResourceMgr.Limits in the config)

Conventions to make libp2p devs life easier:
- 'IPFS_RCMGR=1 ipfs daemon' overrides the config and enables resource manager
- 'limit.json' overrides implicit defaults from libp2p (if present)

* docs(config): small tweaks

* fix: skip libp2p.ResourceManager if disabled

This ensures 'ipfs swarm limit|stats' work only when enabled.

* fix: use NullResourceManager when disabled

This reverts commit b19f7c9eca.
after clarification feedback from
https://github.com/ipfs/go-ipfs/pull/8680#discussion_r841680182

* style: rename IPFS_RCMGR to LIBP2P_RCMGR

preexisting libp2p toggles use LIBP2P_ prefix

* test: Swarm.ResourceMgr

* fix: location of opt-in limit.json and rcmgr.json.gz

Places these files inside of IPFS_PATH

* Update docs/config.md

* feat: expose rcmgr metrics when enabled (#8785)

* add metrics for the resource manager
* export protocol and service name in Prometheus metrics
* fix: expose rcmgr metrics only when enabled

Co-authored-by: Marcin Rataj <lidel@lidel.org>

* refactor: rcmgr_metrics.go

* refactor: rcmgr_defaults.go

This file defines implicit limit defaults used when Swarm.ResourceMgr.Enabled

We keep vendored copy to ensure go-ipfs is not impacted when go-libp2p
decides to change defaults in any of the future releases.

* refactor: adjustedDefaultLimits

Cleans up the way we initialize defaults and adds a fix for case
when connection manager runs with high limits.

It also hides `Swarm.ResourceMgr.Limits` until we have a better
understanding what syntax makes sense.

* chore: cleanup after a review

* fix: restore go-ipld-prime v0.14.2

* fix: restore go-ds-flatfs v0.5.1

Co-authored-by: Lucas Molas <schomatis@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-07 21:06:35 -04:00
Adin Schmahmann
eafa1c7345
docs: note the default reprovider strategy as all (#8603) 2022-03-10 01:42:33 -08:00
Adin Schmahmann
686993f6f2
docs: add Internal.UnixFSShardingSizeThreshold (#8723)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-02-18 23:37:55 +01:00
Marcin Rataj
f9643a61d7
docs: optionalInteger|String|Duration (#8729) 2022-02-10 23:52:18 +01:00
Thibault Meunier
a93907a40f
feat: DNS.MaxCacheTTL for DNS-over-HTTPS resolvers (#8615)
* feat: Add MaxCacheTTL option for DNS-over-HTTPS resolvers
* Update libp2p/go-doh-resolver dependencies to support Options
* feat: Add `DNS.MaxCacheTTL` config documentation
* docs: DNS.MaxCacheTTL
* chore: go-ipfs-config@v0.19.0
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-02-10 22:26:14 +01:00
Marcin Rataj
4ad316803e
docs: update badger section in config.md (#8662)
This should fix the issue of users thinking badger
is "no-brainer faster choice" and then running into problems.

Co-authored-by: Johnny <9611008+johnnymatthews@users.noreply.github.com>
2022-01-28 23:22:26 +01:00
Somajit
7e4fcbb324 Fixed typos in docs/config.md 2022-01-14 11:32:00 -05:00
Marten Seemann
48a6cac00b
feat: Swarm.EnableHolePunching flag (#8562)
* feat: use Swarm.EnableHolePunching flag within libp2p
* docs: Swarm.EnableHolePunching

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-11-30 11:18:51 -08:00
jwh
029d82c4ea
feat: enabling pubsub and ipns-pubsub via config flags (#8510)
* Allow pubsub and namesys-pubsub to be enabled via config

Signed-off-by: Joe Holden <jwh@zorins.us>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-11-30 11:00:11 -08:00
Jorropo
c2953ab8f1
feat: Addresses.AppendAnnounce (#8177)
* feat: Addresses.AppendAnnounce

Closes #7791

* fix: deduplicate Swarm.Announce and AppendAnnounce

https://github.com/ipfs/go-ipfs/pull/8177#discussion_r759317772
https://github.com/ipfs/go-ipfs/pull/8177#discussion_r759320332

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-11-30 17:58:19 +01:00
Adin Schmahmann
52c177ced9
feat: go-libp2p 0.16, UnixFS autosharding and go-datastore with contexts (#8563)
* plumb through go-datastore context changes

* update go-libp2p to v0.16.0
* use LIBP2P_TCP_REUSEPORT instead of IPFS_REUSEPORT
* use relay config
* making deprecation notice match the go-ipfs-config key
* docs(config): circuit relay v2
* docs(config): fix links and headers
* feat(config): Internal.Libp2pForceReachability

This switches to config that supports setting and reading
Internal.Libp2pForceReachability OptionalString flag

* use configuration option for static relays

* chore: go-ipfs-config v0.18.0

https://github.com/ipfs/go-ipfs-config/releases/tag/v0.18.0

* feat: circuit v1 migration prompt when Swarm.EnableRelayHop is set (#8559)
* exit when Swarm.EnableRelayHop is set
* docs: Experimental.ShardingEnabled migration

This ensures existing users of global sharding experiment get notified
that the flag no longer works + that autosharding happens automatically.

For people who NEED to keep the old behavior (eg. have no time to
migrate today) there is a note about restoring it with
`UnixFSShardingSizeThreshold`.

* chore: add dag-jose code to the cid command output

* add support for setting automatic unixfs sharding threshold from the config
* test: have tests use low cutoff for sharding to mimic old behavior
* test: change error message to match the current error
* test: Add automatic sharding/unsharding tests (#8547)
* test: refactored naming in the sharding sharness tests to make more sense

* ci: set interop test executor to convenience image for Go1.16 + Node
* ci: use interop master

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Lucas Molas <schomatis@gmail.com>
2021-11-29 19:58:05 +01:00
Dimitris Apostolou
0c2f9d5950
Fix typos (#8548) 2021-11-17 21:16:06 +01:00
Adin Schmahmann
7448340d20
support bitswap configurability (#8268)
* feat: extract Bitswap fx initialization to its own file
* chore: bump go-bitswap dependency
* feat: bump go-ipfs-config dependency and utilize the new Internal.Bitswap configuration options. Add documentation around the new OptionalInteger config type as well as the Internal.Bitswap options.
* docs(docs/config.md): move the table of contents towards the top of the document and update it

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <877588+guseggert@users.noreply.github.com>
2021-08-18 14:15:16 -04:00
Steven Allen
6258374211 doc(config): address nits 2021-05-17 08:25:47 -07:00
@RubenKelevra
253f99f061 config.md: fix typos/improve wording 2021-05-17 08:25:46 -07:00
Andrew Gillis
c54cdaa1f8
Feat/migration ipfs download (#8064)
* Enable downloading migrations over IPFS

There are now options in the config file that control how migrations are downloaded. This includes enabling downloading migrations using IPFS by (when migrations are required) spinning up a temporary node for fetching the migrations before running them. There is also a config option to decide what to do with the migrations binaries once they are downloaded (e.g. cache or pin them in your node, or just throw out the data).

Co-authored-by: Steven Allen <steven@stebalien.com>
2021-05-12 09:33:14 -07:00
Marcin Rataj
35fe392491 docs: clarify DNS.Resolvers
- document implicit defaults for eth and crypto TLDs
- be very honest and link to ToS of cloudflare-eth.com
- provide suggestion that one should run own resolver if they really care about decentralization
2021-05-10 21:04:57 -07:00
vyzo
9866c13bda use {} as default for DNS.Resolvers in config 2021-05-10 21:04:57 -07:00
Marcin Rataj
0a4defe87b docs: fix formatting and add links to DNS section 2021-05-10 21:04:57 -07:00
vyzo
5a1593e87c update config documentation 2021-05-10 21:04:57 -07:00
David Pflug
d6322f485a
Fix transposed words in docs/config.md 2021-04-05 18:01:15 -04:00
Steven Allen
4cdb67f37d
Merge pull request #7890 from ipfs/fix/remove-clear-site-data
fix(gw): remove use of Clear-Site-Data in subdomain router
2021-03-31 16:24:24 -07:00
Marcin Rataj
2f105f79b9
chore: deprecate Gateway.PathPrefixes
Context:
https://github.com/ipfs/go-ipfs/issues/7702#issuecomment-803136077
2021-03-30 21:17:41 +02:00
Steven Allen
ccc2d23730 feat: remove secio support
We've had a reliable and enabled by default TLS implementation since
0.4.23 (over a year ago) and turned off SECIO in September of last year.
We might as well remove support entirely in the next release and
encourage users to upgrade their networks.

Noise is faster, anyways.
2021-02-25 13:36:40 -08:00
Marcin Rataj
cb7b147e5a
docs: tips on debugging Policies.MFS (#7929)
* docs: tips on debugging Policies.MFS

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-02-23 11:08:49 -05:00
Marcin Rataj
ced3580581
docs: fix DNSLink gw recipe
Unfortunate typo due to additional negation.
2021-02-20 11:46:08 +01:00
Marcin Rataj
04838257f8 docs: RepinInterval 2021-02-18 16:01:25 -05:00
Marcin Rataj
aaa64baaed style: docs/config.md
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
2021-02-18 16:01:25 -05:00
Marcin Rataj
af96ded973 style: improved MFS PinName example
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-02-18 16:01:25 -05:00
Marcin Rataj
c338ed83c7 docs: Pinning.RemoteServices.Policies 2021-02-18 16:01:25 -05:00
Marcin Rataj
d61ae2bcb4
fix: remove use of Clear-Site-Data
We used Clear-Site-Data to cushion transition period for local gateway
exposed at http://localhost while we were still figuring out
security-related details.

In the final implementation subdomain gateways are not tied to a
hostname explicitly, which removes the risk of cookies leaking,
removing the need for the header.

Turns out it causes issues for Firefox users, so let's just remove it.

Closes https://github.com/ipfs-shipyard/ipfs-companion/issues/977
2021-01-29 22:08:16 +01:00
Marcin Rataj
09178aa717
feat(gw): support inlined DNSLink names with TLS
Problem statement and rationale for doing this can be found under
"Option C" at: https://github.com/ipfs/in-web-browsers/issues/169

TLDR is:

`https://dweb.link/ipns/my.v-long.example.com` can be loaded from a
subdomain gateway with a wildcard TLS cert if represented as a single
DNS label: `https://my-v--long-example-com.ipns.dweb.link`
2021-01-01 21:39:42 +01:00
Petar Maymounkov
a8c7980721
add remote pinning to ipfs command (#7661)
Added support for remote pinning services

A pinning service is a service that accepts CIDs from a user in order to host the data associated with them.
The spec for these services is defined at https://github.com/ipfs/pinning-services-api-spec

Support is available via the `ipfs pin remote` CLI and the corresponding HTTP API

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2020-12-08 20:32:33 -05:00
Jorropo
c2b4a83731
docs: Add a link in config.md 2020-11-19 01:30:51 +01:00
Marcin Rataj
76892f5c2f
docs(config): X-Forwarded-Host
This fixes a bug and documents X-Forwarded-Host

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-09-11 20:00:25 +02:00
Adin Schmahmann
0ad6a92716 docs: update config to indicate SECIO deprecation 2020-08-26 20:51:53 -04:00
Marcin Rataj
135b90e087 docs(config): fix Peering header
Peering is top level namespace
2020-08-25 10:39:32 -04:00
Adin Schmahmann
0c57e9dcf8
Merge pull request #7319 from MichaelMure/wildcard-gateways
feat: wildcard support for public gateways
2020-08-19 11:02:28 -04:00
Luflosi
0155a88e5f
docs: fix typo 2020-08-08 23:12:49 +02:00
Michael Muré
13e6bcfb4f
feat: wildcard support for public gateways
Add support for one or more wildcards in the hostname definition
of a public gateway. This is useful for example to support easily
multiples environment.

Wildcarded hostname are set in the config as for example "*.domain.tld".
2020-07-24 20:51:22 +02:00
Marcin Rataj
0acfb38763 chore: fix a typo 2020-07-10 14:13:11 -04:00
Marcin Rataj
580d68685c docs: document X-Forwarded-Host 2020-07-10 14:13:11 -04:00
Adin Schmahmann
19d6230cde Merge branch 'release' into master 2020-06-19 20:04:30 -04:00
Steven Allen
0cef475b2d docs(config): update toc 2020-06-16 22:04:24 -07:00
Steven Allen
c0951e73d7 doc(config): expand on config value limits 2020-06-16 15:15:51 -07:00
Steven Allen
e164af1f2a feat: add a transport config section
This way, users can disable transports (especially QUIC), and set muxer/security
transport priorities.
2020-06-16 15:15:47 -07:00
Steven Allen
ea55e747f2 doc(config): expand peering docs 2020-06-11 17:58:51 -07:00
Jessica Schilling
c86244ecf5
Update docs/config.md 2020-05-28 11:15:09 -06:00
Jessica Schilling
766023311a
Update docs-beta links to final URLs 2020-05-28 11:14:00 -06:00
Steven Allen
7990d2ccb5 doc: expand on peering service documentation
* Explain _why_ it exists.
* Explain how it can be used.
2020-05-25 20:24:43 -07:00
Steven Allen
978091a626 feat: implement peering service
MVP for #6097

This feature will repeatedly reconnect (with a randomized exponential backoff)
to peers in a set of "peered" peers.

In the future, this should be extended to:

1. Include a CLI for modifying this list at runtime.
2. Include additional options for peers we want to _protect_ but not connect to.
3. Allow configuring timeouts, backoff, etc.
4. Allow groups? Possibly through textile threads.
5. Allow for runtime-only peering rules.
6. Different reconnect policies.

But this MVP should be a significant step forward.
2020-05-25 20:24:41 -07:00
@RubenKelevra
2dc1f691f1 quic: remove experimental status and add it to the default config 2020-05-22 04:54:19 +02:00
Adin Schmahmann
a0e01501e7 docs: cleanup config formatting 2020-05-20 13:48:26 -04:00
Steven Allen
b29f9e9959 doc(config): document pubsub 2020-05-19 19:24:27 -07:00
Steven Allen
6719e124bb doc(config): sort sections 2020-05-19 19:13:50 -07:00
Marcin Rataj
10aaf24304
chore: update X-Forwarded-Proto copy text
Co-authored-by: Steven Allen <steven@stebalien.com>
2020-05-13 15:07:59 +02:00
Marcin Rataj
c5b30545bf
docs: X-Forwarded-Proto: https
Additional documentation for running subdomain gateway behind reverse proxy with TLS.
2020-05-12 13:00:25 +02:00
Corbin Page
19426b9ca2
Update config.md 2020-05-02 17:23:56 -04:00
Steven Allen
6d7d3ef30e doc: expand on relay documentation 2020-04-27 16:00:48 -07:00
Steven Allen
4ebe7e633d doc: fixup config docs
1. Update go-ipfs-config to fix default datastore.
2. Update TOC.
3. Update profiles list and indicate that badger isn't experimental.
2020-04-27 15:12:04 -07:00
Dimitris Apostolou
1e437c7e97
Fix typos and cleanup 2020-04-20 22:00:01 +03:00
Steven Allen
1f23fc000c feat: add autonat config options
1. Enable AutoNATService on _all_ nodes by default. If it's an issue, we can
disable it in RC3 but this will give us the best testing results.
2. Expose options to configure AutoNAT rate limiting.
2020-04-14 20:54:58 -07:00
Steven Allen
3e6f0a7942 doc: cleanup experimental features a bit 2020-04-06 18:53:16 -07:00
Marcin Rataj
3ecccd6e1d feat(gateway): subdomain and proxy gateway
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-03-18 08:50:38 -07:00
Steven Allen
bd8917facf doc(config): cleanup
Trying to make this a bit more consistent and structured.

* Fix wrapping.
* Use headings for all config values.
2020-01-30 22:14:21 -08:00
Oli Evans
0eba53bd98
docs: define Gateway.PathPrefixes
adds docs for Gateway.PathPrefixes. Taken from great commit notes by @lgierth (thank you!) 09937f84b6
2020-01-15 14:32:05 +00:00
Oli Evans
134cb5ef9c
docs: add connmgr to config.md toc 2019-10-11 15:26:53 +01:00
Steven Allen
460c2119e4 daemon: support unix domain sockets for the API/gateway
All the work was client-side. Unix domain socket multiaddrs already worked
server-side.

fixes #4218
2019-09-30 17:21:28 -07:00
Steven Allen
76db2a0b31 doc(config): improve DisableNatPortMap documentation 2019-09-20 16:36:15 -07:00
Henrique Dias
ec2383f721
docs: add multiple gateway and api addrs 2019-09-06 13:16:54 +01:00
Steven Allen
72122a5dbf doc: correct the address filter documentation 2019-07-11 19:04:45 -07:00
Hector Sanjuan
010336c89f Document the AddrFilters option
Shouldn't have to scan through an old issue to figure out what is happening
and why this is super important.
2019-07-11 18:56:32 -07:00
Oli Evans
c30aaa921a
docs: default value for HashOnRead is false
This is currently the case. It should be filpped to true, but in the meantime let's document the current situation

See: https://github.com/ipfs/go-ipfs/issues/1152
2019-06-04 16:17:32 +01:00
MollyM
1fd6701ea2
explain what dhtclient does 2019-05-23 16:46:27 -07:00
Marcin Rataj
4c6268eaa3
docs: update Routing config
Updated docs to reflect that Routing is not a child of Discovery
Ref. 664ccd976e/routing.go (L6)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2019-05-08 22:01:36 +02:00
Li Zheng
cdd0e6b73a docs: document Gateway.Writable not Gateway.Writeable
License: MIT
Signed-off-by: Li Zheng <flyskywhy@gmail.com>
2019-03-28 13:11:41 +08:00
Steven Allen
df475f4817 docs: document Gateway.NoFetch
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-15 15:52:23 -08:00
tarekbadr
b80646e4d2 docs-randomports: edit docs config add 'randomports' flag.
it's Generate random port for swarm.

License: MIT
Signed-off-by: Tarek Badr <tarekbadrshalaan@gmail.com>
2019-01-24 08:02:19 -08:00
vyzo
526d6198a6 document autorelay
License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>
2018-12-18 11:30:59 -08:00
Steven Allen
716f69b8f8 config: document the connection manager
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-12-11 18:59:30 -08:00
Matt Joiner
ed260599ba docs: Improve config documentation
License: MIT
Signed-off-by: Matt Joiner <anacrolix@gmail.com>
2018-12-10 19:06:00 +11:00
Whyrusleeping
419bfdc20f
Merge pull request #4924 from ipfs/docs/config
Add information about bloom filter to config.md
2018-07-16 17:12:10 +02:00
camelmasa
0e6936d532 Add docs for --profile=lowpower
License: MIT
Signed-off-by: Masahiro Saito <camelmasa@gmail.com>
2018-04-23 20:33:40 +09:00
Dominic Della Valle
c3e3da4a54 Revised
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
2018-04-09 15:45:45 -04:00
Dominic Della Valle
0ecfd7843c Add information about bloom filter to config.md
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
2018-04-09 08:20:30 -04:00
Łukasz Magiera
af9b4af581 config: apply review to lowpower profile
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-24 16:11:42 +01:00
Łukasz Magiera
35da08859a daemon: config option for routing
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-24 16:11:42 +01:00
Łukasz Magiera
ac26cf19cd config-patch: Inverse profiles
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-12-17 15:29:18 +01:00
Łukasz Magiera
acb4edcce4 config-patch: docs typo, fix server profile
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-12-16 18:16:43 +01:00
Łukasz Magiera
2514c74750 config-patch: apply review suggestions
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-12-15 15:37:37 +01:00
Łukasz Magiera
75b235d05c config docs: Move profile section to the top
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-12-15 15:37:37 +01:00
Łukasz Magiera
d7376cdab0 config: profile tests, docs
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-12-15 15:37:37 +01:00
Steven Allen
febf21b0c7 fix republish interval documentation
We republish every 4 hours, not 12.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-29 15:15:58 -08:00
Whyrusleeping
d4c54d6858
Merge pull request #4401 from leerspace/docs/config-announce
updating Addresses section
2017-11-21 08:49:32 -08:00
John Reed
42a0c14f2a
adding detail on Announce
Clarifying that the Announce array is only used when non-empty
and will override the default inferred announce addresses.

License: MIT
Signed-off-by: John Reed <john@re2d.xyz>
2017-11-20 09:48:19 -06:00
John Reed
8391abb06b
updating Addresses section
config.md: updating the Addresses section

Adding documentation on Announce and NoAnnounce.

Fixing typo in API default value.

License: MIT
Signed-off-by: John Reed <john@re2d.xyz>
2017-11-19 20:31:25 -06:00
Adrian Lanzafame
0d2cc04fa7 docs: correct StorageMax config desc
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2017-11-14 12:25:38 +10:00
Jeromy Johnson
6beab668fd Merge pull request #4288 from ipfs/feat/connmgr
Implement Connection Manager
2017-10-16 18:37:11 +01:00
Jeromy
62d521783f Integrate connection manager
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-10-16 09:46:46 -07:00
Steven Allen
a0bedf6a5b remove the rest of the supernode code
missed in the initial cleanup

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-10-14 16:43:30 -07:00
Łukasz Magiera
f70fa0a2a5 docs: Update and clean-up
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-09-12 18:47:53 +02:00
Jeromy
70be25e3e5 documentify
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-09-07 16:18:10 -07:00
vyzo
16247cb65d docs/config: document relay options
License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>
2017-08-16 09:28:05 +03:00
Jeromy Johnson
dea24aedc3 Merge pull request #4113 from ipfs/feat/reprovider-starts
Reprovider strategies
2017-08-15 17:13:23 -07:00
Łukasz Magiera
4a5b93a1df reprovider: apply review suggestions
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-08-16 00:39:12 +02:00
Łukasz Magiera
048debeffd reprovider: strategy docs
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-08-13 00:02:23 +02:00
Sherod Taylor
bc75d3b88a Removed tour command and fix test
License: MIT
Signed-off-by: Sherod Taylor <sherodtaylor@gmail.com>
2017-08-09 10:14:57 -04:00
Kevin Atkinson
da95e9f929 Add DisableNatPortMap option.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-18 18:50:10 -04:00
Jeromy
43d668331c add config option to disable bandwidth metrics
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-11 10:31:24 -08:00
Jeromy
5457a85cef
Merge branch 'version/0.4.3-rc4'
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-09-20 19:10:10 -07:00
Jakub Sztandera
27279cdefe
blockstore: change unit of bloom filter to byte from bits
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-09-06 20:20:19 +02:00
Jeromy
0b6bfabcff improve config option docs
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-20 11:49:23 -07:00
Jeromy
ad488c6525 reprovider: add config option to set reprovide interval
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-19 16:52:03 -07:00
Richard Littauer
ca0c68991d Capitalized acronyms, add ToC
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-07-19 12:51:20 +01:00
Jeromy
d7a1bdae8e add newer config options and reformat
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-19 12:51:20 +01:00
Jeromy
4307c10739 document the config options
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-19 12:51:19 +01:00