67 Commits

Author SHA1 Message Date
Jacob Heun
f28dffb268
fix: bail when discovering self (#357) 2019-04-16 12:05:22 +02:00
Jacob Heun
313b1eae20
fix: connection emits (#352)
* fix: add connection tracking events

* chore: update dependencies
2019-04-11 13:49:31 +02:00
Jacob Heun
01aa44724e
feat: auto dial discovered peers (#349) 2019-04-11 12:44:58 +02:00
Jacob Heun
e5f19e860b
fix: remove unneeded peerbook puts (#348) 2019-04-05 14:27:35 +02:00
Jacob Heun
eee60ed37d
feat: update to the latest switch (#336) 2019-03-21 14:23:00 +01:00
Thomas Eizinger
4ed5c039fc chore: change from ipfs to p2p protocol (#315)
https://github.com/multiformats/js-multiaddr/pull/76 changed the
default protocol from ipfs to p2p.

js-multiaddr is a transitive dependency of peer-info, so in order
to get this change, we had to bump the version of peer-info.

* fix: revert ipfs -> p2p change for some tests

As per PR feedback. Needed for backwards-compatibility.
2019-02-05 19:59:42 +01:00
Vasco Santos
9e7a080a5c fix: emit peer discovery for dht discovery 2019-02-05 19:54:02 +01:00
Jacob Heun
558e5987be chore: remove _isStarted as it's no longer used
_isStarted is an outdated property and shouldn't exist
in the code anymore. The state machine handles start
logic and the isStarted computed property pulls from there.
The code comments around dht and pubsub are also no
longer valid, so they were deleted.
2019-02-05 15:57:10 +01:00
Thomas Eizinger
91e60d4253
feat: prepare for new randomWalk config parameters
As per: https://github.com/libp2p/js-libp2p-kad-dht/issues/76

fix: pass whole dht config into DHT constructor
2019-02-05 12:42:40 +01:00
Jacob Heun
8047fb76fa
fix: start and stop error callback (#316)
* fix: ensure start and stop callbacks are called
2019-02-01 16:32:34 +01:00
Vasco Santos
c4cab007af feat: enable dht by default (#313)
BREAKING CHANGE: dht experimental flag was removed and a dht.enabled property was added to the config
2019-01-29 18:57:09 +01:00
Jacob Heun
fdfb7b4e86
fix: not started yet (#297)
* fix: callback when not started rather than throwing asserts

* fix: dont remove transports until the switch has stopped

* test: update connection check logic

* test: fix variable reference

* chore: update switch dep

* chore: update switch dep
2018-12-14 17:54:32 +01:00
Jacob Heun
53ed3bdb99
fix: use symbol instead of constructor name (#292) 2018-12-04 16:04:17 +01:00
Vasco Santos
7d12eb9e26 feat: allow configurable validators and selectors to the dht (#288)
* feat: allow configurable validators and selectors to the dht

* chore: remove fallback
2018-11-29 15:10:23 +01:00
Jacob Heun
f71fdfdf35 feat: conditionally emit errors
test: add tests for emit override
2018-11-12 19:26:04 +01:00
Vasco Santos
40e840d5fd feat: add datastore to config 2018-10-31 14:43:16 +01:00
Jacob Heun
0b75f99d75
feat: make libp2p a state machine (#257)
* docs: add events to readme
2018-10-19 17:37:34 +02:00
Jacob Heun
a95389a28e
feat: add delegated peer and content routing support (#242)
* feat: allow for configuring content and peer routing

* feat: support multiple peer and content routing modules

* docs: add delegated routing example
2018-10-19 16:28:28 +02:00
Vasco Santos
dd934b9690 fix: start kad dht random walk (#251)
* fix: start kad dht random walk

* chore: added tests and stop random walk

* chore: allows to disable discovery for dht

* chore: upgrade kad-dht version
2018-10-04 14:40:32 +02:00
Jacob Heun
2b7cc55c88 feat: add check for protector and enforced pnet
fix: update protector config and tests
docs: add private network info to the readme
test: fix an issue with config
2018-07-24 19:53:53 +02:00
Jacob Heun
6106915923 fix: start and stop connection manager with libp2p
test: add test to verify libp2p starts and stops the right things
test: add test for verifying disabled modules
fix: linting
2018-07-22 19:29:19 +01:00
Alan Shaw
4ad70efb00 fix: remove peer discovery module config checks
Configuration for the peer discovery modules is now optional so this does not need to be validated. This also cleans up the config module to reduce repetition.

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2018-06-29 23:42:43 +02:00
Alan Shaw
80f0b6077a fix: add null property guards
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2018-06-29 23:42:43 +02:00
Alan Shaw
ac5cacba33 fix: do not mutate the config object
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2018-06-29 23:42:43 +02:00
Alan Shaw
e320854db7 feat: enable peer discovery modules by default
This PR will enable any provided peer discovery modules by default if no configuration for the module is supplied/needed.

As before, modules can be explicitly disabled or enabled by passing config.

This also enables pre-configured modules (instances) to be passed and enabled without them having to have a `tag` and an unused config section.

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2018-06-29 23:42:43 +02:00
David Dias
6905f1ba41
feat: (BREAKING CHANGE) overhaul libp2p config and constructor
* docs: update chat example and add info to its readme
* docs: update echo example
* docs: update libp2p in browser example
* docs: update pubsub example
* docs: update peer and content routing examples
* docs: update discovery mechanisms example
* docs: update encrypted comms example
* docs: update protocol and stream muxing example
* feat: add config validation
* test: update CI configs, use only node 8
2018-06-28 10:06:25 +02:00
Pedro Teixeira
d5972045da feat: set and hook up libp2p-connection-manager (#184) 2018-06-20 11:19:37 +01:00
Diogo Silva
bb0c9905ed feat: use class-is for type checks 2018-04-05 19:47:02 +01:00
Pedro Teixeira
2c04a71007 stats: exposed and documented 2018-03-15 08:09:56 -07:00
David Dias
0c543b7180 feat: add pubsub to libp2p 2018-02-16 19:23:35 +01:00
David Dias
f7f85dce0a test: update tests to new API 2018-02-07 08:37:03 +00:00
David Dias
6651401f0b feat: dialProtocol and small refactor 2018-02-07 08:37:03 +00:00
David Dias
23e8293b75 feat: use libp2p-switch 2018-02-07 07:31:10 +00:00
Chris Dostert
bd8a35aaf9 feat: add explicit error for case peer id not included in multiaddr (#155) 2018-02-05 12:36:20 +01:00
Irakli Gozalishvili
61bebd10fc fix: typo in DHT setup (#151)
I think there was a typo that would have ignored passed options and fallback to defaults for DHT datastore.
2018-01-16 05:58:12 -08:00
David Dias
190ad54f9e
PDD Compliance Tests (#137)
* transport story 1 done

* c

* transport series 2

* transports story 3

* the ipfs-bundle story 1
2017-12-18 10:23:34 +00:00
Pedro Teixeira
c88eaf416c fix: prevent "The libp2p node is not started yet" when stopping (#138) 2017-12-15 07:08:44 +00:00
Pedro Teixeira
1b7360fcfa fix: remove innactive multiaddrs (#131) 2017-12-14 07:27:13 +00:00
Dmitriy Ryajov
29cc0afc64 feat: enable and test Circuit Relay
* feat: new super simplified API

* feat: append peer id to multiaddr if not there

* [WIP] Awesome DHT (#86)

* feat: integrate dht

* better interfaces

* docs: add documentation for peerRouting, contentRouting, dht

* fix: take in passed datastore

* fix: update usage of _getPeerInfo

* fix: getPeerInfo

* docs: update docs

* moar

feat: correctly handle p2p-circuit addrs when creating a peer info object

refactor: rework config options

* feat: adding circuit relaying

* feat: rework circuit relay for protobufs

* feat: circuit loading and tests

* fix: clean up _getPeerInfo to work with /p2p-circuit

* wip: tests cleaup

* test: clean up

* wip

* fix: bringing back test reworks and new aegir

* test: group tests

* test: clean up

* test: adjust test

* fix: use getPeerId to determine if the ipfs fragment is missing

* feat: adding circuit relaying

* feat: circuit loading and tests

* test: clean up

* wip

* feat: upgrade to latest aegir

* fix: removing unused tests

* feat: cleanup tests

* fix: create node defautl options

* chore: upgrade swarm to latest version

* fix: updated aegir and adjust timeouts

* feat: more timeouts

* chore: updating deps

* fix: circle ci builds

* test: timeouts
2017-10-26 12:51:36 +01:00
David Dias
06eb7a19f3 docs(examples): Peer and Content Routing 1 and 2 (#107) 2017-07-20 14:19:36 -07:00
David Dias
c8f4eaf982 chore: update deps 2017-07-20 11:18:34 -07:00
David Dias
32cb59fa18 docs(examples): transports 1 2017-07-07 14:37:41 +01:00
Pedro Teixeira
73f2f6d050 feat: state events and query changes (#100) 2017-07-07 12:56:46 +01:00
David Dias
2e326e1619 fix: do not use assert in async funcs (#88) 2017-04-16 16:54:31 +01:00
Friedel Ziegelmayer
8aa932a491 [WIP] Awesome DHT (#86)
* feat: integrate dht

* better interfaces

* docs: add documentation for peerRouting, contentRouting, dht

* fix: take in passed datastore

* fix: update usage of _getPeerInfo

* fix: getPeerInfo

* docs: update docs

* moar
2017-04-06 15:45:23 -04:00
David Dias
031ecb3fe7 fix: correct method on peer-book 2017-03-31 16:17:59 +01:00
David Dias
dee0340806 chore: update to latest peer-info, peer-book and libp2p-swarm 2017-03-31 15:52:20 +01:00
David Dias
a4b41b0f9a feat: not remove peer from peerBook on disconnect 2017-03-30 07:20:45 +01:00
David Dias
291e79fc99 fix: addition of ipfs id appendix must come before transport filtering 2017-03-29 21:02:37 +01:00
David Dias
59ea9c388f feat: append peer id to multiaddr if not there 2017-03-29 20:02:54 +01:00