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

fix: throw if no conn encryption module provided #665

Merged
merged 3 commits into from
Jun 11, 2020

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Jun 11, 2020

The main focus of this PR is throwing an error if a connEncryption module is not provided.
With that in mind, it also improves the configuration docs visibility from the Libp2p.create API doc, as well as that transports and connEncryption modules are required.

It also changes the peerDiscovery example to use the discovery module tag and be coherent with the docs.

Fixes #664

test/insecure/configuration.spec.js Outdated Show resolved Hide resolved
src/errors.js Outdated Show resolved Hide resolved
vasco-santos and others added 2 commits June 11, 2020 12:30
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

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

lgtm!

@jacobheun jacobheun merged commit c038550 into master Jun 11, 2020
@jacobheun jacobheun deleted the fix/throw-if-no-conn-encryption-provided branch June 11, 2020 10:49
achingbrain added a commit to ipfs/js-ipfs that referenced this pull request Jun 13, 2020
Since the `v0.28.1` point release, libp2p now requires a connection
enryption module to be passed in config, otherwise it throws.

See: libp2p/js-libp2p#665
@achingbrain
Copy link
Member

*cough* *cough* breaking change *cough* *cough*

achingbrain added a commit to ipfs/js-ipfs that referenced this pull request Jun 13, 2020
Since the `v0.28.1` patch release, libp2p requires a connection encryption
module to be passed in config, otherwise it throws.

See: libp2p/js-libp2p#665
@jacobheun
Copy link
Contributor

You're right, this is an api change. While this shouldn't break production applications as it is required for libp2p to function properly, it can break testing environments for people. I'll do a revert commit for this and move this to an 0.29 branch.

jacobheun added a commit that referenced this pull request Jun 15, 2020
jacobheun added a commit that referenced this pull request Jun 15, 2020
@jacobheun
Copy link
Contributor

Reverted in v0.28.2

jacobheun added a commit that referenced this pull request Jun 15, 2020
@jacobheun
Copy link
Contributor

Branch 0.29.x has been created for the next minor release. The change has been reapplied for that branch.

jacobheun added a commit that referenced this pull request Jul 13, 2020
jacobheun added a commit that referenced this pull request Jul 14, 2020
vasco-santos added a commit that referenced this pull request Jul 15, 2020
vasco-santos added a commit that referenced this pull request Jul 30, 2020
jacobheun pushed a commit that referenced this pull request Aug 12, 2020
jacobheun pushed a commit that referenced this pull request Aug 27, 2020
oliveriosousa pushed a commit to ipfs-examples/js-ipfs-examples that referenced this pull request Jul 26, 2021
Since the `v0.28.1` patch release, libp2p requires a connection encryption
module to be passed in config, otherwise it throws.

See: libp2p/js-libp2p#665
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.

no peer:connect event with autoDial
3 participants