* 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.
This remove github.com/minio/blake2b-simd and replace it with golang.org/x/crypto/blake2b which slightly faster and reduce the code surface.
See https://github.com/multiformats/go-multihash/pull/157 for more info.
* feat: upgrade to go-libp2p-kad-dht@v0.16.0
* rename "cid format --codec" to "cid format --mc"
* refactor(test): from --codec to --mc
Co-authored-by: Marcin Rataj <lidel@lidel.org>
(cherry picked from commit 8d7ed002dfd814651edacc0b11581d5571376ffb)
* 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>
(cherry picked from commit b1c051d2507cec34a9d2b313ea43a092b3fdc4a4)
* fix: adjust rcmgr limits for accelerated DHT client rt refresh
The Accelerated DHT client periodically refreshes its routing table,
including at startup, and if Resource Manager throttling causes the
client's routing table to be incomplete, then content routing may be
degraded or broken for users.
This adjusts the default limits to a level that empirically doesn't
cause Resource Manager throttling during initial DHT client
bootstrapping. Ideally the Accelerated DHT client would handle this
scenario more gracefully, but this works for now to unblock the 0.13
release.
* Set default outbound conns unconditionally
This also sets the default overall conns as a function of the outbound
and inbound conns, since they are adjusted dynamically, and it makes
the intention of the value clear.
* increase min FD limit
(cherry picked from commit b8617b99665fe3b1ae8123fa9a71aad295771057)
* Do not connect to external nodes on ipfs as a lib example.
It was causing some build timeouts error because CircleCI
was throttling WAN connections.
It closes#8956
* style: rename node vars
since this is example, this should make things easier to follow
Co-authored-by: Marcin Rataj <lidel@lidel.org>
(cherry picked from commit e8f1ce07b3d8076da5baedd772d80368804e57a7)
This periodically logs how many times Resource Manager limits were
exceeded. If they aren't exceeded, then nothing is logged. The log
levels are at ERROR log level so that they are shown by default.
The motivation is so that users know when they have exceeded resource
manager limits. To find what is exceeding the limits, they'll need to
turn on debug logging and inspect the errors being logged. This could
collect the specific limits being reached, but that's more complicated
to implement and could result in much longer log messages.
(cherry picked from commit 5615715c55ae59a6b17877db84eac92821371c51)
This fix safelists additional headers allowing JS running on websites to
read them when IPFS resource is downloaded via Fetch API.
These headers provide metadata necessary for making smart caching
decisions when IPFS resources are downloaded via Service Worker or a
similar middleware on the edge.
(cherry picked from commit 650bc246ab4a7c2a11a207e3bf9d74c07d190eb7)
Fixes#8957
The context was only checked while reading data.
Not while writing data to the http connection.
So since the data flow through an io.Pipe the closing didn't flowed through and left the writer open hanging.
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
(cherry picked from commit 7892cc91f9ed17f5a6e0348334ed09c8bdb3194f)
It works only on some platforms, and does not work reliably.
This corrects our error of not setting expectations right.
(cherry picked from commit 53299e84e0995124c97fdb76571f8646cf03c6a7)