276 Commits

Author SHA1 Message Date
Vasco Santos
26c40c8dfd chore: add typedefs 2020-11-26 19:18:54 +01:00
Vasco Santos
dbc265371f
chore: use set-delayed-interval module on circuit (#809) 2020-11-26 12:01:53 +01:00
Vasco Santos
7c3f7e074e
feat: discover and connect to closest peers (#798) 2020-11-25 18:50:23 +01:00
Vasco Santos
ad6187d1e9
feat: custom dialer addr sorter (#792)
* feat: custom dialer addr sorter

* chore: use libp2p utils sorter via addressBook getMultiaddrsForPeer

* chore: use new libp2p utils

* chore: apply suggestions from code review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-11-20 15:16:40 +01:00
Vasco Santos
bd214d588a
chore: update pubsub (#801)
BREAKING CHANGE: pubsub signing policy properties were changed according to libp2p-interfaces changes to a single property. The emitSelf option default value was also modified to match the routers value
2020-11-13 15:14:21 +01:00
Vasco Santos
10d449ae9d chore: update address manager readme 2020-11-10 09:32:36 +01:00
Vasco Santos
0d1a34be36 chore: remove noAnnounce from address manager 2020-11-10 09:32:36 +01:00
Vasco Santos
0c551d2714 feat: custom announce filter 2020-11-10 09:32:36 +01:00
Vasco Santos
8456d0e051 chore: store self protocols in protobook (#760) 2020-11-09 14:11:48 +01:00
Vasco Santos
558bcf9541 chore: improve logging for auto relay active listen 2020-11-09 14:11:48 +01:00
Vasco Santos
3bd1768b04 chore: sort relay addresses to listen for public first 2020-11-09 14:11:48 +01:00
Vasco Santos
722cacd6d2 chore: lint issues fixed 2020-11-09 14:11:48 +01:00
Vasco Santos
2746b4b025 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-11-09 14:11:48 +01:00
Vasco Santos
29e30c2199 chore: add configuration docs for auto relay and hop service 2020-11-09 14:11:48 +01:00
Vasco Santos
3d2181f6fa chore: address review 2020-11-09 14:11:48 +01:00
Vasco Santos
e6b0134299 feat: auto relay network query for new relays 2020-11-09 14:11:48 +01:00
Vasco Santos
2530b834a1 chore: lint issue fixed 0.30 2020-11-09 14:11:48 +01:00
Vasco Santos
05e6472cce chore: address review 2020-11-09 14:11:48 +01:00
Vasco Santos
87d20ac46d chore: create signed peer record on new listen addresses in transport manager 2020-11-09 14:11:48 +01:00
Vasco Santos
ee8ee5b49b chore: use listening events to create self peer record on updates 2020-11-09 14:11:48 +01:00
Vasco Santos
971655ff27 chore: _isStarted is false when stop starts 2020-11-09 14:11:48 +01:00
Vasco Santos
8d75093dcb chore: auto relay multiaddr update push 2020-11-09 14:11:48 +01:00
Vasco Santos
25488853ef feat: auto relay (#723)
* feat: auto relay

* fix: leverage protoBook events to ask relay peers if they support hop

* chore: refactor disconnect

* chore: do not listen on a relayed conn

* chore: tweaks

* chore: improve _listenOnAvailableHopRelays logic

* chore: default value of 1 to maxListeners on auto-relay
2020-11-09 14:11:48 +01:00
Vasco Santos
093c0ea13f
feat: resolve multiaddrs before dial (#782) 2020-11-04 13:54:50 +01:00
Jacob Heun
06f26e586f
fix: cleanup open streams on conn close (#791) 2020-10-23 15:34:59 +02:00
Jacob Heun
e04224a1e2 fix: catch error in upgrader close call 2020-10-22 14:29:52 +02:00
Jacob Heun
4c6be91588 fix: ensure streams are closed on connection close 2020-10-22 14:29:52 +02:00
Vasco Santos
2fd3b0a0e5
chore: examples not using secio (#747)
* chore: examples not using secio

* chore(docs): remove unused dep

* chore(docs): remove reference of secio in setup

* chore(docs): replace circuit secio reference with noise

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-10-07 16:16:36 +02:00
Vasco Santos
ec6f7d1cfd
chore: lint issue fixed (#775) 2020-10-07 15:39:24 +02:00
Vasco Santos
a1053bdc54
chore: remove outdated events from libp2p js docs (#766) 2020-10-07 14:51:51 +02:00
Vasco Santos
0d48fc4f5a
test: use ed25519 keys in tests (#669)
* chore: use ed25519 keys in tests

* fix: persisted keybook recheck keybook content for delete

* chore: only store if key not inline

* chore: update peer id

* chore: identify wait for closed streams
2020-10-07 14:50:01 +02:00
Vasco Santos
96df4b7dc4
chore: update aegir and jsdocs for eslint changes (#773) 2020-10-06 14:59:43 +02:00
Jacob Heun
93dda74085 fix: peer record interop with go (#739)
* test: add go peer record interop test

* fix: correct the payload type of peer records

* chore: fix linting

* test: fix envelope test
2020-08-27 15:38:01 +02:00
Vasco Santos
55c9bfac44 feat: gossipsub 1.1 (#733)
* feat: gossipsub 1.1

BREAKING CHANGE: pubsub implementation is now directly exposed and its API was updated according to the new pubsub interface in js-libp2p-interfaces repo

* chore: use gossipsub branch with src added

* fix: add pubsub handlers adapter

* chore: fix deps

* chore: update pubsub docs and examples

* chore: apply suggestions from code review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>

* chore: use new floodsub

* chore: change validator doc set

Co-authored-by: Jacob Heun <jacobheun@gmail.com>

* chore: add new gossipsub src

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Alex Potsides
1e869717ff fix: replace node buffers with uint8arrays (#730)
* fix: replace node buffers with uint8arrays

Upgrades all deps and replaces all use of node Buffers with Uint8Arrays

BREAKING CHANGES:

- All deps used by this module now use Uint8Arrays in place of node Buffers

* chore: browser fixes

* chore: remove .only

* chore: stringify uint8array before parsing

* chore: update interop suite

* chore: remove ts from build command

* chore: update deps

* fix: update records to use uint8array

* chore: fix lint

* chore: update deps

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Vasco Santos
9107efe121 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Vasco Santos
cd09327eb6 chore: add notice for addressBook.set 2020-08-27 15:38:01 +02:00
Vasco Santos
ca57e65ecc chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Vasco Santos
f574e82a5d chore: apply suggestions from code review 2020-08-27 15:38:01 +02:00
Vasco Santos
15613ccf19 fix: do not return self on peerstore.peers 2020-08-27 15:38:01 +02:00
Vasco Santos
74d414c21f chore: add certified peer records to persisted peer store 2020-08-27 15:38:01 +02:00
Vasco Santos
8f2e69048f feat: cerified addressbook 2020-08-27 15:38:01 +02:00
Vasco Santos
b0a36ccbc8 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Vasco Santos
3158366579 fix: revert new identify protocol versions 2020-08-27 15:38:01 +02:00
Vasco Santos
1d318e12d8 chore: address review 2020-08-27 15:38:01 +02:00
Vasco Santos
8a97dded26 feat: create self peer record in identify 2020-08-27 15:38:01 +02:00
Vasco Santos
e50f0eeb7b feat: exchange signed peer records in identify 2020-08-27 15:38:01 +02:00
Vasco Santos
ee57a643cc chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Vasco Santos
89658dd655 chore: address review 2020-08-27 15:38:01 +02:00
Vasco Santos
4ab125e017 fix: signature compliant with spec 2020-08-27 15:38:01 +02:00