1
0
mirror of https://github.com/fluencelabs/js-libp2p synced 2025-03-16 23:50:51 +00:00

308 Commits

Author SHA1 Message Date
Vasco Santos
5123a8357b feat: peerStore persistence 2020-05-28 12:37:48 +02:00
Vasco Santos
43630f1e0b test: use libp2p-noise ()
* chore: use libp2p-noise

* chore: address review
2020-05-28 12:37:48 +02:00
Vasco Santos
7fbd1556e8 fix: use libp2p.multiaddrs instead of listen
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
Vasco Santos
d33919d0b3 chore: use kad-dht with renamed peer-store properties 2020-05-28 12:37:48 +02:00
Vasco Santos
c215339a27 chore: rename peer-store properties 2020-05-28 12:37:48 +02:00
Vasco Santos
12e48adafa chore: remove peer-info usage
BREAKING CHANGE: all API methods with peer-info parameters or return values were changed. You can check the API.md document, in order to check the new values to use
2020-05-28 12:37:48 +02:00
Vasco Santos
ed6d5bb4b4 chore: deprecate old peer store api ()
* chore: deprecate old peer-store api

BREAKING CHANGE: the peer-store api changed. Check the API docs for the new specification.

* chore: apply suggestions from code review

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

* chore: apply suggestions from code review

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

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
dependabot-preview[bot]
dfed982404 chore(deps-dev): bump libp2p-gossipsub from 0.2.6 to 0.3.0
Bumps [libp2p-gossipsub](https://github.com/ChainSafe/gossipsub-js) from 0.2.6 to 0.3.0.
- [Release notes](https://github.com/ChainSafe/gossipsub-js/releases)
- [Changelog](https://github.com/ChainSafe/gossipsub-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ChainSafe/gossipsub-js/compare/v0.2.6...v0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-11 11:00:13 +02:00
dependabot-preview[bot]
60b6a55906
chore(deps-dev): bump aegir from 21.10.2 to 22.0.0 ()
Bumps [aegir](https://github.com/ipfs/aegir) from 21.10.2 to 22.0.0.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ipfs/aegir/compare/v21.10.2...v22.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-08 10:52:49 +02:00
Jacob Heun
ea6b1ecce4
chore: update contributors 2020-05-06 13:21:54 +02:00
Vasco Santos
d3ab238738 chore: update aegir 2020-05-05 20:08:45 +02:00
Vasco Santos
97455957ac
chore: remove wrtc devdep () 2020-04-30 12:00:50 +02:00
dependabot-preview[bot]
03ce7c3103
chore(deps-dev): bump p-times from 2.1.0 to 3.0.0 ()
Bumps [p-times](https://github.com/sindresorhus/p-times) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/sindresorhus/p-times/releases)
- [Commits](https://github.com/sindresorhus/p-times/compare/v2.1.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-28 13:16:41 +02:00
Jacob Heun
8dd361338b
chore: update contributors 2020-04-24 17:38:32 +02:00
Hugo Dias
9b13fe321a
fix: remove node global ()
* fix: use new libp2p-crypto

* fix: remove node globals and reduce size

- adds buffer require
- adds globalThis where needed
- streaming-iterables was remove and new utils created, this will be consolidated in `ipfs-utils` and backported here to normalize all these iterator helper functions
- latency-monitor was copied inside the repo
- iso-random-stream is now used instead of node crypto
- the test `should ignore self on discovery` was moved to node only

Size: 172.97KB
47.03KB below the 220KB limit.

`aegir build --node false` and `aegir test -t browser --node false` now work 🎉

* fix: fix require path

* fix: feedback

* fix: update deps and bundle size

* chore: bump interfaces

* chore: update size
2020-04-24 17:10:40 +02:00
Jacob Heun
09a604b5e5
chore: update contributors 2020-04-16 16:35:01 +02:00
Jacob Heun
ed16b69057
chore: update delegate routing deps to fix branches ()
* chore: update delegate routing deps to fix branches

* chore: bump delegate router versions
2020-04-16 15:48:13 +02:00
Jacob Heun
7b56f559cb
chore: update contributors 2020-04-06 13:33:08 +02:00
Jacob Heun
1414e45969
chore: update contributors 2020-03-31 13:47:41 +02:00
dependabot-preview[bot]
afdbe3deac
chore(deps-dev): bump cids from 0.7.5 to 0.8.0 ()
Bumps [cids](https://github.com/multiformats/js-cid) from 0.7.5 to 0.8.0.
- [Release notes](https://github.com/multiformats/js-cid/releases)
- [Changelog](https://github.com/multiformats/js-cid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/multiformats/js-cid/compare/v0.7.5...v0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 09:08:13 +01:00
Vasco Santos
ce58805e90
chore(deps): bump p-settle from 3.1.0 to 4.0.0 ()
Bumps [p-settle](https://github.com/sindresorhus/p-settle) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/sindresorhus/p-settle/releases)
- [Commits](https://github.com/sindresorhus/p-settle/compare/v3.1.0...v4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-05 18:12:58 +01:00
dependabot-preview[bot]
fad9cb22e0
chore(deps): bump p-any from 2.1.0 to 3.0.0 ()
Bumps [p-any](https://github.com/sindresorhus/p-any) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/sindresorhus/p-any/releases)
- [Commits](https://github.com/sindresorhus/p-any/compare/v2.1.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 11:23:26 +01:00
dependabot-preview[bot]
e1b158fbb9
chore(deps-dev): bump sinon from 8.1.1 to 9.0.0 ()
Bumps [sinon](https://github.com/sinonjs/sinon) from 8.1.1 to 9.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v8.1.1...v9.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 11:10:34 +01:00
dependabot-preview[bot]
1837d6e95e
chore(deps-dev): bump aegir from 20.6.1 to 21.3.0 ()
Bumps [aegir](https://github.com/ipfs/aegir) from 20.6.1 to 21.3.0.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ipfs/aegir/compare/v20.6.1...v21.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 10:58:46 +01:00
Vasco Santos
4bce6aa0b9
chore: use libp2p utils ()
* chore: use libp2p utils

* chore: update libp2p-utils
2020-02-18 07:45:26 -05:00
dependabot-preview[bot]
4d11edd62c chore(deps-dev): bump nock from 11.9.1 to 12.0.0
Bumps [nock](https://github.com/nock/nock) from 11.9.1 to 12.0.0.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v11.9.1...v12.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 07:44:45 -05:00
Jacob Heun
b3d8132ea6
chore: update contributors 2020-02-11 17:15:59 +01:00
Jacob Heun
a317a8b011
fix: dont allow multiaddr dials without a peer id ()
* fix: require peer ids when dialing multiaddrs

* chore: fix lint

* docs: add more info about multiaddr peer ids
2020-02-11 16:32:40 +01:00
Jacob Heun
58c0c7c03e
chore: update contributors 2020-02-05 17:46:41 +01:00
Vasco Santos
5608178247
test: add interop tests job in ci ()
* chore: interop tests in ci

* chore: address review

* chore: use interop release
2020-02-05 12:01:46 +01:00
dependabot-preview[bot]
dcd58693f5 chore(deps): bump err-code from 1.1.2 to 2.0.0
Bumps [err-code](https://github.com/IndigoUnited/js-err-code) from 1.1.2 to 2.0.0.
- [Release notes](https://github.com/IndigoUnited/js-err-code/releases)
- [Commits](https://github.com/IndigoUnited/js-err-code/compare/1.1.2...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 11:59:34 +01:00
dependabot-preview[bot]
8bf05e6db6 chore(deps-dev): bump abortable-iterator from 2.1.0 to 3.0.0
Bumps [abortable-iterator](https://github.com/alanshaw/abortable-iterator) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/alanshaw/abortable-iterator/releases)
- [Commits](https://github.com/alanshaw/abortable-iterator/compare/v2.1.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 11:58:58 +01:00
dependabot-preview[bot]
0589d53616 chore(deps-dev): bump nock from 10.0.6 to 11.7.2
Bumps [nock](https://github.com/nock/nock) from 10.0.6 to 11.7.2.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v10.0.6...v11.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 11:58:38 +01:00
Jacob Heun
56a7842664
chore: update contributors 2020-02-03 15:55:45 +01:00
Jacob Heun
2d6408eb30
chore: update contributors 2020-01-28 13:06:11 +01:00
Jacob Heun
b83880765f chore: update contributors 2020-01-24 14:40:40 +01:00
Jacob Heun
c1038bec92 fix: use toB58String everywhere to be consistent ()
* 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
Jacob Heun
e9d16ba190 chore: update contributors 2020-01-24 14:40:40 +01:00
Alan Shaw
ba4681b312 fix: conn mngr min/max connection values ()
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
Jacob Heun
58db09a9d3 chore: update contributors 2020-01-24 14:40:40 +01:00
Jacob Heun
ae5ce9a66f chore: update contributors 2020-01-24 14:40:40 +01:00
Vasco Santos
f1eb373235 feat: discovery modules from transports should be added ()
* 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 ()
* 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
4f7586886c refactor: ping ()
* 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
1db69c5f27 chore: remove unused packages 2020-01-24 14:40:40 +01:00
Jacob Heun
633b0c291f fix: clean up pending dials abort per feedback 2020-01-24 14:40:40 +01:00
Jacob Heun
85988cfaab chore: fix lint
test: reduce interval of randomwalk in test

chore(test): glob fix
2020-01-24 14:40:40 +01:00
Jacob Heun
6b1da8326f test(fix): fix support for it.only, it.skip, etc 2020-01-24 14:40:40 +01:00
Jacob Heun
7ac5e42a1a chore: fix linting 2020-01-24 14:40:40 +01:00