Commit Graph

13 Commits

Author SHA1 Message Date
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
Steven Allen
92854db7ae fix: take the lock while listing peers 2021-09-15 13:10:57 -04:00
Takashi Matsuda
a651045c50
feature: 'ipfs swarm peering' command (#8147)
* feat: added swarm peering command supporting add, ls and rm

Co-authored-by: Steven Allen <steven@stebalien.com>
2021-09-15 07:46:16 -07:00
Takashi Matsuda
b3a6de8c6d fix: the test of peering.PeeringService
This commit fixes the issue that the test of
peering.PeeringService must check the connection of h3
but did not. This line seemed to be unintended.
2021-05-15 12:05:29 +09:00
Daniel Martí
5e0c8bbf28 peering: add logs before many-second waits
This test takes a full minute to run, and I was honestly thinking my run
of "go test -v" had simply hung, as I saw no output and no apparent
resource usage.

The least we can do is print a few log messages before the potentially
long waits, to hint that we're still making progress. Each of these
"Eventually" and "Never" calls ends up blocking the test for a few
seconds at a time.
2021-02-06 17:58:18 +00:00
Marten Seemann
fcdf77c9b0 update go-libp2p to v0.13.0 2020-12-19 16:16:00 +07:00
Steven Allen
e10289a93d fix: really cap the max backoff at 10 minutes
While preserving some randomness.

And add a test.
2020-05-25 21:20:23 -07:00
Steven Allen
17b3b02549 fix: remove unecessary context 2020-05-25 21:20:23 -07:00
Steven Allen
87a293f680 fix(peering): fix a race condition 2020-05-25 21:20:23 -07:00
Steven Allen
fe2b289d30 test: add unit test for peering service 2020-05-25 21:20:20 -07:00
Steven Allen
0551c4dca8 fix: address peering service code feedback
* better name for timer
* cancel context from within stop
2020-05-25 20:24:43 -07:00
Steven Allen
8e52c7fb2d fix: doc comment location
Co-authored-by: Will <will.scott@protocol.ai>
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