631 Commits

Author SHA1 Message Date
David Dias
eb2528c1d6
docs: fix chat url (#550) 2020-02-05 11:58:04 +01:00
Vasco Santos
141cf90ca0
chore: remove pdd test stories (#546) 2020-02-04 11:52:23 +01:00
Jacob Heun
f4ec459a7b
chore: release version v0.27.1 v0.27.1 2020-02-03 15:55:46 +01:00
Jacob Heun
56a7842664
chore: update contributors 2020-02-03 15:55:45 +01:00
Alex Potsides
be8fc9daf1
fix: stop stream after first pong received (#545)
When connecting to go-IPFS from a webworker, the stream opened by
the ping protocol is never closed.

The change here uses `take` to only receive one buffer from the
remote node before closing the stream.
2020-02-03 15:50:40 +01:00
Jacob Heun
f39e8f0da9
docs: add migration guide from 0.26 to 0.27 (#543)
* docs: add migration guide from 0.26 to 0.27

* docs(fix): relative links

* chore(docs): apply suggestions from code review

* chore: apply review suggestions

* chore: remove unwanted log
2020-01-30 13:03:15 +01:00
shresthagrawal
ed0c2cb6c1
docs: redirect to the npm docs for latest release (#541)
* docs: redirect to the npm docs for latest release

* Apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-01-29 15:53:57 +01:00
Cayman
c6592c5797 docs: fix api link formatting (#542) 2020-01-28 18:55:37 +01:00
Jacob Heun
33cef10721
chore: release version v0.27.0 v0.27.0 2020-01-28 13:06:11 +01:00
Jacob Heun
2d6408eb30
chore: update contributors 2020-01-28 13:06:11 +01:00
Jacob Heun
29a96690ad test(fix): fix listening test for ci 2020-01-24 14:40:40 +01:00
Jacob Heun
8b94cd1e2e chore: release version v0.27.0-rc.0 2020-01-24 14:40:40 +01:00
Jacob Heun
b83880765f chore: update contributors 2020-01-24 14:40:40 +01:00
Vasco Santos
560d7084fe refactor: examples-browser (#508)
* refactor: examples-browser

* chore: add information to use signalling server

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: update deps

* docs: refactor libp2p browser example

* docs(examples): add back websockets and boostrap nodes

docs(examples): redo the browser readme

* fix: handle edge case of connections closing early

* chore: fix lint

* chore: update example deps and readme

* chore: update webrtc-star

* chore: apply suggestions from code review

Co-Authored-By: Alan Shaw <alan.shaw@protocol.ai>

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2020-01-24 14:40:40 +01:00
Vasco Santos
d21b7ce4ff docs: getting started (#514)
* docs: getting started

* docs: review getting started (#520)

* doc: initial review of getting started

Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>

* chore: move multiplexing to basic setup

* chore: add read more cta

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: just configure multiplexer

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: just use websockets and changed dht module introduction

* chore: add reference for events in the API doc

* docs: simplify getting started guide and clean up language

* chore: apply suggestions from code review

Co-Authored-By: Alan Shaw <alan.shaw@protocol.ai>

* docs(fix): address review comments

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2020-01-24 14:40:40 +01:00
Jacob Heun
c1038bec92 fix: use toB58String everywhere to be consistent (#537)
* chore: update deps

* fix: consistently use b58 peerid string

The migration to base32 will happen at a later date
2020-01-24 14:40:40 +01:00
Vasco Santos
bb2e56e6c7 fix: registrar should filter the disconnected conn (#532)
* fix: registrar on disconnect only when no connections

* chore: add test
2020-01-24 14:40:40 +01:00
Alan Shaw
4222c49556 fix: stop discoveries (#530)
* fix: stop discoveries

* test: add discovery stop test

* chore: fix lint

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Jacob Heun
2f2ba420ef chore: release version v0.27.0-pre.2 2020-01-24 14:40:40 +01:00
Jacob Heun
e9d16ba190 chore: update contributors 2020-01-24 14:40:40 +01:00
Vasco Santos
afb552c063 refactor: examples transports (#503)
* refactor: examples-transports

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: address review

* chore: address review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Vasco Santos
721151b9fc refactor: examples/pnet (#523)
* refactor: examples/pnet

* chore: rename pnet-ipfs to pnet

* chore: address review
2020-01-24 14:40:40 +01:00
Vasco Santos
efc96c2f19 refactor: examples/discovery-mechanisms (#498)
* refactor: examples-discovery-mechanisms

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: suggestion interval

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: add peer connected event

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Alan Shaw
ba4681b312 fix: conn mngr min/max connection values (#528)
Fixes the case when options are passed with `maxConnections` and/or `minConnections` set to `undefined`:

```console
{
  defaultOptions: {
    maxConnections: Infinity,
    minConnections: 0,
    maxData: Infinity,
    maxSentData: Infinity,
    maxReceivedData: Infinity,
    maxEventLoopDelay: Infinity,
    pollInterval: 2000,
    movingAverageInterval: 60000,
    defaultPeerValue: 1
  },
  options: {
    minPeers: 25,
    maxConnections: undefined,
    minConnections: undefined
  }
}
{ maxConnections: undefined, minConnections: undefined }
      1) "before all" hook in "custom config"
(node:67176) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: Connection Manager maxConnections must be greater than minConnections
    at new ConnectionManager (node_modules/libp2p/src/connection-manager/index.js:43:5)
    at new Libp2p (node_modules/libp2p/src/index.js:92:30)
    at Object.module.exports [as libp2p] (src/core/components/libp2p.js:27:10)
    at Proxy.start (src/core/components/start.js:48:31)
    at async Daemon.start (src/cli/daemon.js:63:31)
    at async startHttpAPI (test/http-api/routes.js:29:5)
    at async Context.<anonymous> (test/http-api/routes.js:48:7)
```
2020-01-24 14:40:40 +01:00
Vasco Santos
6b00eeab0a refactor: examples/protocol-and-stream-muxing (#502) 2020-01-24 14:40:40 +01:00
Jacob Heun
c339be10ee feat: allow transport options to be passed on creation (#524)
* feat: allow transport options to be passed on creation

* fix: only add circuit transport if enabled

* chore: fix lint
2020-01-24 14:40:40 +01:00
Vasco Santos
7b326cc525 refactor: examples/peer-and-content-routing (#500)
* refactor: examples-peer-and-content-routing

* chore: address review

* chore: review suggestions

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Vasco Santos
835a689965 refactor: examples/encrypted-communications (#499)
* refactor: examples/encrypted-communications

* chore: address review
2020-01-24 14:40:40 +01:00
Vasco Santos
b08d81cee7 refactor: examples-pubsub (#504) 2020-01-24 14:40:40 +01:00
Jacob Heun
6445fda050 feat: add libp2p.connections getter (#522)
* fix: make hangup accept what the API says it does

* feat: add libp2p.connections getter

* chore: fix typo
2020-01-24 14:40:40 +01:00
Jacob Heun
4ca481b869 fix: make dialer configurable (#521)
docs: update configuration and api docs
2020-01-24 14:40:40 +01:00
Vasco Santos
5d7ee50e76 fix: upgrader should not need muxers (#517)
* fix: upgrader should not need muxers

* chore: address review

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Jacob Heun
48fd64182b chore: release version v0.27.0-pre.1 2020-01-24 14:40:40 +01:00
Jacob Heun
58db09a9d3 chore: update contributors 2020-01-24 14:40:40 +01:00
Jacob Heun
15f7c2a974 feat: coalescing dial support (#518)
* docs: fix spelling in api

* fix: dont create peerstore twice

* feat: add support for dial coalescing

* doc(fix): add setPeerValue to API TOC

* docs: add more jsdocs to dialer

* chore: remove old comment

* fix: ensure connections are closed

* fix: registrar.getConnections returns first open conn

* fix: directly set the closed status

* chore: remove unneeded log

* refactor: peerStore.put takes an options object
2020-01-24 14:40:40 +01:00
Alan Shaw
4384d139d2 docs: add ToC link to pubsub.unsubscribe 2020-01-24 14:40:40 +01:00
Alan Shaw
bd1068e5d9 docs: fix the ToC links (#515) 2020-01-24 14:40:40 +01:00
Vasco Santos
854ac49a10 chore: update readme (#513) 2020-01-24 14:40:40 +01:00
Jacob Heun
f9d0047bf6 chore: release version v0.27.0-pre.0 2020-01-24 14:40:40 +01:00
Jacob Heun
ae5ce9a66f chore: update contributors 2020-01-24 14:40:40 +01:00
Jacob Heun
14a1955a78 refactor: connection manager (#511)
* refactor: initial refactor of the connection manager

* fix: start/stop issues

* fix: add tests and resolve pruning issues

* chore: fix lint

* test: move conn manager tests to node only for now

* chore: apply suggestions from code review

Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>

* fix: assert min max connection options

* test: fix assertion check for browser

* docs: add api and config docs for conn manager
2020-01-24 14:40:40 +01:00
Vasco Santos
f1eb373235 feat: discovery modules from transports should be added (#510)
* feat: discovery modules from transports should be added

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: address review

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Jacob Heun
dabee00127 refactor: stats (#501)
* docs: add initial notes on stats

* feat: initial refactor of stats to metrics

* feat: add support for placeholder metrics

This is helpful for tracking metrics prior to knowing the remote peers id

* fix: add metrics tests and fix issues

* fix: always clear the dial timeout timer

* docs: add metrics to api doc

* chore: apply suggestions from code review

Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>

* docs: update metrics docs

* fix: call metrics.onDisconnect

* docs(config): add example headers so they appear in the TOC

* docs(config): add metrics configuration

* docs(relay): fix relay configuration docs
2020-01-24 14:40:40 +01:00
Vasco Santos
17b6a3fd73 docs: config (#495)
* docs: new api

* chore: new iteration

* chore: apply suggestions from code review

Co-Authored-By: Alan Shaw <alan.shaw@protocol.ai>

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: address review

* docs: add events

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* docs: configuration

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: update peer routing description

Co-Authored-By: Yusef Napora <yusef@protocol.ai>

* chore: decouple examples

* chore: address pr comment

* fix: connection encryption is required

* chore: apply review suggestion

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Vasco Santos
4f7586886c refactor: ping (#505)
* refactor: ping

* chore: ping is now a function

* chore: address review
2020-01-24 14:40:40 +01:00
Jacob Heun
71f46bf4a6 chore: it-all over async-iterator-all 2020-01-24 14:40:40 +01:00
Jacob Heun
cba035a75b chore: add bundlesize check back to ci 2020-01-24 14:40:40 +01:00
Jacob Heun
2c5183bd70 chore: remove uneeded dep check exclusions 2020-01-24 14:40:40 +01:00
Jacob Heun
a586efb5f7 chore: disable pull dep check until ping is refactored 2020-01-24 14:40:40 +01:00
Jacob Heun
1db69c5f27 chore: remove unused packages 2020-01-24 14:40:40 +01:00