221 Commits

Author SHA1 Message Date
Vasco Santos
585ad52b4c 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-12-16 13:56:41 +01:00
Vasco Santos
49fffda23c test: custom announce filter 2020-12-16 13:56:41 +01:00
Vasco Santos
689c35ed1c fix: remove test/dialing/utils extra file 2020-12-16 13:56:41 +01:00
Vasco Santos
5758db8ea9 chore: remove noAnnounce from address manager 2020-12-16 13:56:41 +01:00
Vasco Santos
ef9d3ca2c6 feat: custom announce filter 2020-12-16 13:56:41 +01:00
Vasco Santos
97e3633f47 chore: store self protocols in protobook (#760) 2020-12-16 13:56:41 +01:00
Vasco Santos
ee23fb9508 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-12-16 13:56:41 +01:00
Vasco Santos
5c72424e57 chore: address review 2020-12-16 13:56:41 +01:00
Vasco Santos
0bf0b7cf89 feat: auto relay network query for new relays 2020-12-16 13:56:41 +01:00
Vasco Santos
bb83cacb5a chore: address review 2020-12-16 13:56:41 +01:00
Vasco Santos
447d0ed0dd chore: add identify test for multiaddr change 2020-12-16 13:56:41 +01:00
Vasco Santos
43eda43f06 chore: create signed peer record on new listen addresses in transport manager 2020-12-16 13:56:41 +01:00
Vasco Santos
7b93ece7f2 chore: use listening events to create self peer record on updates 2020-12-16 13:56:41 +01:00
Vasco Santos
4d1fcdb3d2 chore: auto relay multiaddr update push 2020-12-16 13:56:41 +01:00
Vasco Santos
caf66ea143 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-12-16 13:56:41 +01:00
Smite Chow
8691465a52
feat: support custom listener options (#822)
* support custom listener options

* fix get listener options

* add doc to explain custom listener options

* add ut

* fix code style

* Apply suggestions from code review

Co-authored-by: Vasco Santos <vasco.santos@ua.pt>

* add missing comma

Co-authored-by: Vasco Santos <vasco.santos@ua.pt>
2020-12-09 16:31:17 +01:00
Vasco Santos
6350a187c7
fix: dial self (#826) 2020-12-09 16:13:25 +01:00
Vasco Santos
d0a9fada32
feat: custom and store self agent version + store self protocol version (#800)
* feat: custom and store self protocol and agent version

* fix: do not enable custom protocolVersion
2020-11-20 15:14:01 +01:00
Vasco Santos
093c0ea13f
feat: resolve multiaddrs before dial (#782) 2020-11-04 13:54:50 +01:00
Jacob Heun
4c6be91588 fix: ensure streams are closed on connection close 2020-10-22 14:29:52 +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
60d437f595
fix: flakey identify test firefox (#774) 2020-10-06 15:37:01 +02:00
Vasco Santos
96df4b7dc4
chore: update aegir and jsdocs for eslint changes (#773) 2020-10-06 14:59:43 +02:00
Vasco Santos
fb4b2734d3
chore: update delegate deps (#753) 2020-09-15 12:47:16 +02:00
Vasco Santos
28b79a76a8
test: fix pubsub intermittent test (#741) 2020-08-27 16:42:07 +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
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
d437defede chore: rename isEqual to equals in tests 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
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
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
Vasco Santos
71daac24b1 chore: refactor and better docs 2020-08-27 15:38:01 +02:00
Vasco Santos
3e5d450eca feat: signed peer records record manager 2020-08-27 15:38:01 +02:00
Vasco Santos
689f90a698 revert: reapply "fix: throw if no conn encryption module provided (#665)"
This reapplies commit b621fbdfdc1844343c513ac40d4389e8beee714e.
2020-08-27 15:38:01 +02:00
Alex Potsides
8c56ec0d23
fix: allow certain keychain operations without a password (#726)
* fix: allow certain keychain operations without a password

Listing, removing, renaming etc keys do not require a password so
the user should not be required to provide one.

This means we don't have to prompt the user to create a password
when they aren't going to do any operations that require a password.

* fix: make keychain pass optional

* fix: support libp2p creation without keychain pass

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-05 19:03:11 +02:00
Jacob Heun
51d7ca44c1
feat(keychain): add support for ed25519 and secp keys (#725)
* feat(keychain): add support for ed25519 and secp keys

* chore: bump crypto

* refactor: cleanup keychain usage
2020-08-05 18:19:10 +02:00
Jacob Heun
726a746479
fix(identify): make agentversion dynamic and add it to the peerstore (#724) 2020-08-04 18:39:05 +02:00
Vasco Santos
2440c872df
fix: ping multiaddr from peer not previously stored in peerstore (#719) 2020-07-27 10:53:23 +02:00
Vasco Santos
7da9ad44ab
fix: create dial target for peer with no known addrs (#715) 2020-07-20 14:54:03 +02:00
Vasco Santos
9ccab40fc8
fix: not dial all known peers in parallel on startup (#698)
* fix: not dial all known peers on startup

* feat: connection manager should proactively connect to peers from peerStore

* chore: increase bundle size

* fix: do connMgr proactive dial on an interval

* chore: address review

* chore: use retimer reschedule

* chore: address review

* fix: use minConnections in default config

* chore: minPeers to minConnections everywhere
2020-07-14 16:05:26 +02:00
Jacob Heun
51da8874d8
test: add pubsub reconnect test (#693)
* test: add pubsub reconnect test

* chore: dep bump

* chore: remove temp pubsub dep

Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>

Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
2020-07-07 18:31:51 +02:00
Vasco Santos
f4898eb883
chore: add test for pubsub on reconnect (#691)
* chore: add test for pubsub on reconnect

* chore: update interface dep

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-07-03 16:08:37 +02:00