Commit Graph

197 Commits

Author SHA1 Message Date
28b79a76a8 test: fix pubsub intermittent test (#741) 2020-08-27 16:42:07 +02:00
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
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
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
f574e82a5d chore: apply suggestions from code review 2020-08-27 15:38:01 +02:00
15613ccf19 fix: do not return self on peerstore.peers 2020-08-27 15:38:01 +02:00
d437defede chore: rename isEqual to equals in tests 2020-08-27 15:38:01 +02:00
74d414c21f chore: add certified peer records to persisted peer store 2020-08-27 15:38:01 +02:00
8f2e69048f feat: cerified addressbook 2020-08-27 15:38:01 +02:00
3158366579 fix: revert new identify protocol versions 2020-08-27 15:38:01 +02:00
1d318e12d8 chore: address review 2020-08-27 15:38:01 +02:00
8a97dded26 feat: create self peer record in identify 2020-08-27 15:38:01 +02:00
e50f0eeb7b feat: exchange signed peer records in identify 2020-08-27 15:38:01 +02:00
89658dd655 chore: address review 2020-08-27 15:38:01 +02:00
4ab125e017 fix: signature compliant with spec 2020-08-27 15:38:01 +02:00
71daac24b1 chore: refactor and better docs 2020-08-27 15:38:01 +02:00
3e5d450eca feat: signed peer records record manager 2020-08-27 15:38:01 +02:00
689f90a698 revert: reapply "fix: throw if no conn encryption module provided (#665)"
This reapplies commit b621fbdfdc.
2020-08-27 15:38:01 +02:00
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
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
726a746479 fix(identify): make agentversion dynamic and add it to the peerstore (#724) 2020-08-04 18:39:05 +02:00
2440c872df fix: ping multiaddr from peer not previously stored in peerstore (#719) 2020-07-27 10:53:23 +02:00
7da9ad44ab fix: create dial target for peer with no known addrs (#715) 2020-07-20 14:54:03 +02:00
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
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
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
b621fbdfdc revert: "fix: throw if no conn encryption module provided (#665)"
This reverts commit c038550fad.
2020-06-15 12:45:49 +02:00
c038550fad fix: throw if no conn encryption module provided (#665)
* fix: throw if no conn encryption module provided

* chore: address review

* chore: apply suggestions from code review

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

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-06-11 12:49:32 +02:00
d60a3215d0 chore: update interface datastore (#663)
* chore: update interface datastore

Updates to v1.x.x to not have multiple versions of this module in the ipfs browser bundle.

* fix: let batch commits complete before continuing tests

Batch commits are async but the tests weren't waiting for them to complete,
mainly because they are triggered by events.

There's no way that I can see of waiting for the batch commit to finish so
I've added delays to the tests. Not great but a start.

* chore: use error log

* test: wait for commit spies to complete

* chore: bump interface-datastore

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-06-10 23:39:40 +02:00
52a615f922 fix: expose the muxed stream interface on inbound streams 2020-05-28 12:37:48 +02:00
698c1df1b4 feat: support dial only on transport manager to tolerate errors (#643)
* feat: support dial only on transport manager to tolerate errors

* chore: address review

* chore: add jsdoc to transport manager tolerance errors
2020-05-28 12:37:48 +02:00
84b935f682 feat: metadata book (#638)
* feat: metadata book

* chore: address review

* chore: address review
2020-05-28 12:37:48 +02:00
aaa1155633 chore: uncomment local peer public key after connect test 2020-05-28 12:37:48 +02:00
0be74e6a61 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
6065923356 chore: integrate libp2p-keychain into js-libp2p (#633)
Integrates the libp2p-keychain codebase into this repo
2020-05-28 12:37:48 +02:00
2b45fee0ed fix: onConnect should not add addr to the addressBook 2020-05-28 12:37:48 +02:00
8bf5a70bb8 chore: integrate libp2p-keychain into js-libp2p (#633)
Integrates the libp2p-keychain codebase into this repo

Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Richard Schneider <makaretu@gmail.com>
Co-authored-by: Maciej Krüger <mkg20001@gmail.com>
Co-authored-by: Victor Bjelkholm <victorbjelkholm@gmail.com>
Co-authored-by: Masahiro Saito <camelmasa@gmail.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Hugo Dias <mail@hugodias.me>
Co-authored-by: Alberto Elias <hi@albertoelias.me>
Co-authored-by: Alex Potsides <alex@achingbrain.net>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
6627278a87 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
65e87460b0 chore: add keys to keybook on connection upgraded 2020-05-28 12:37:48 +02:00
7b8d01697d chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
ce38033c10 feat: keybook 2020-05-28 12:37:48 +02:00
48a9a3eecc refactor: peristent peer-store extended class and disabled by defaul 2020-05-28 12:37:48 +02:00
9ea9287bea chore: persist delete with test 2020-05-28 12:37:48 +02:00
5123a8357b feat: peerStore persistence 2020-05-28 12:37:48 +02:00
43630f1e0b test: use libp2p-noise (#585)
* chore: use libp2p-noise

* chore: address review
2020-05-28 12:37:48 +02:00
aaf62a40ec fix: libp2p connections getter 2020-05-28 12:37:48 +02:00
7fbd1556e8 fix: use libp2p.multiaddrs instead of listen
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
51474c334a chore: rename address functions and apply suggestions from code review
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
2a7967c1cc feat: address manager 2020-05-28 12:37:48 +02:00
d3a4bf0a3f chore: refactor connection manager and registrar 2020-05-28 12:37:48 +02:00