Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: update go-libp2p to v0.16.0 #8522

Closed
wants to merge 25 commits into from
Closed

WIP: update go-libp2p to v0.16.0 #8522

wants to merge 25 commits into from

Conversation

marten-seemann
Copy link
Member

This is still a draft, as it references a commit on master (go-libp2p v0.16.0 is not yet released).


#### `Swarm.RelayServiceOpts.MaxReservationsPerPeer`

Maximum number of reservations originating from the same peer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might want to explain how this is refreshed.

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored config and docs in this PR to follow go-ipfs-config changes from ipfs/go-ipfs-config#146.

docs/config.md Outdated Show resolved Hide resolved
@vyzo
Copy link
Contributor

vyzo commented Oct 27, 2021

don't we also want to optionally enable hole punching, at least when autorelay is enabled?

@marten-seemann
Copy link
Member Author

don't we also want to optionally enable hole punching, at least when autorelay is enabled?

We probably want to get libp2p/go-libp2p#1214 merged. I'm not sure this is realistic before we the IPFS release is cut.

@lidel
Copy link
Member

lidel commented Oct 28, 2021

Circleci is working again so I've re-run yesterday's jobs. The GO-JS interop tests fail due to HOP request failed with code 270 and HOP_CANT_SPEAK_RELAY

Do we need to refactor tests so both ends to speak v2,
or is this broken and those tests have to be skipped until JS side implements v2?
(either way, I can help with tagging a new release of ipfs-interop, ping me if needed)

@vyzo

This comment has been minimized.

lidel added a commit that referenced this pull request Oct 28, 2021
Clarified docs based on
#8522 (comment)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>

Time limit before a relayed connection is reset.

Default: `"2m"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 those "defaults" come from libp2p. Should we hardcode them in go-ipfs using WithDefaults?
Right now this PR uses 0 as placeholder and the actual default value that is delegated to go-ipfs, so if go-libp2p changes the defaults, docs will get out of date.

lidel added a commit to ipfs/go-ipfs-config that referenced this pull request Oct 28, 2021
lidel added a commit to ipfs/go-ipfs-config that referenced this pull request Oct 28, 2021
adds Internal.Libp2pForceReachability
needed for sharness tests in ipfs/kubo#8522

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

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some config updates:

  • switched to the latest version of feat: Swarm.RelayService (circuit v2) go-ipfs-config#146 and updated docs to reflect recent changes
  • Internal.Libp2pForceReachability (OptionalString) should be available now, feel free to wire it up somewhere with forceReachability := cfg.Internal.Libp2pForceReachability.WithDefault("")

@lidel lidel self-requested a review October 28, 2021 23:24
marten-seemann pushed a commit that referenced this pull request Oct 30, 2021
Clarified docs based on
#8522 (comment)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
marten-seemann and others added 3 commits November 16, 2021 15:13
This is for testing the libp2p release, since the context changes are
not plumbed all the way through.
marten-seemann and others added 3 commits November 16, 2021 15:26
This is for testing the libp2p release, since the context changes are
not plumbed all the way through.
@lidel
Copy link
Member

lidel commented Nov 23, 2021

Continued in #8563

@lidel lidel closed this Nov 23, 2021
lidel added a commit to ipfs/interop that referenced this pull request Nov 29, 2021
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Feb 25, 2022
* remove the EnableRelayHop option in the SwarmConfig

* add an option to disable the limited relay

* make the relay service resources configurable

* refactor: use custom types

This enables us to swap defaults in go-ipfs without touching the config
file generated during `ipfs init`

ipfs/go-ipfs-config#146 (comment)
ipfs/go-ipfs-config#146 (comment)

* use OptionalDuration in RelayService configuration

* fix: *OptionalInteger with omitempty

This removes null values from the config

* fix: Flag does not need to be a pointer

* refactor: flatten RelayService limits

this simplifies consumer code and removes nil footgun

* docs: clarify different relay types

* feat: flag for ForceReachability mode in libp2p (ipfs#150)

adds Internal.Libp2pForceReachability
needed for sharness tests in ipfs#8522

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

Co-authored-by: Marcin Rataj <lidel@lidel.org>
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Feb 25, 2022
* remove the EnableRelayHop option in the SwarmConfig

* add an option to disable the limited relay

* make the relay service resources configurable

* refactor: use custom types

This enables us to swap defaults in go-ipfs without touching the config
file generated during `ipfs init`

ipfs/go-ipfs-config#146 (comment)
ipfs/go-ipfs-config#146 (comment)

* use OptionalDuration in RelayService configuration

* fix: *OptionalInteger with omitempty

This removes null values from the config

* fix: Flag does not need to be a pointer

* refactor: flatten RelayService limits

this simplifies consumer code and removes nil footgun

* docs: clarify different relay types

* feat: flag for ForceReachability mode in libp2p (ipfs#150)

adds Internal.Libp2pForceReachability
needed for sharness tests in ipfs#8522

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

Co-authored-by: Marcin Rataj <lidel@lidel.org>
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Mar 4, 2022
* remove the EnableRelayHop option in the SwarmConfig

* add an option to disable the limited relay

* make the relay service resources configurable

* refactor: use custom types

This enables us to swap defaults in go-ipfs without touching the config
file generated during `ipfs init`

ipfs/go-ipfs-config#146 (comment)
ipfs/go-ipfs-config#146 (comment)

* use OptionalDuration in RelayService configuration

* fix: *OptionalInteger with omitempty

This removes null values from the config

* fix: Flag does not need to be a pointer

* refactor: flatten RelayService limits

this simplifies consumer code and removes nil footgun

* docs: clarify different relay types

* feat: flag for ForceReachability mode in libp2p (ipfs#150)

adds Internal.Libp2pForceReachability
needed for sharness tests in ipfs#8522

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

Co-authored-by: Marcin Rataj <lidel@lidel.org>
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Mar 4, 2022
* remove the EnableRelayHop option in the SwarmConfig

* add an option to disable the limited relay

* make the relay service resources configurable

* refactor: use custom types

This enables us to swap defaults in go-ipfs without touching the config
file generated during `ipfs init`

ipfs/go-ipfs-config#146 (comment)
ipfs/go-ipfs-config#146 (comment)

* use OptionalDuration in RelayService configuration

* fix: *OptionalInteger with omitempty

This removes null values from the config

* fix: Flag does not need to be a pointer

* refactor: flatten RelayService limits

this simplifies consumer code and removes nil footgun

* docs: clarify different relay types

* feat: flag for ForceReachability mode in libp2p (ipfs#150)

adds Internal.Libp2pForceReachability
needed for sharness tests in ipfs#8522

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

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants