203 Commits

Author SHA1 Message Date
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
Jacob Heun
b621fbdfdc revert: "fix: throw if no conn encryption module provided (#665)"
This reverts commit c038550fad5b285528d87427fc5fa37ba2b0ba3f.
2020-06-15 12:45:49 +02:00
Vasco Santos
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
Alex Potsides
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
Jacob Heun
52a615f922 fix: expose the muxed stream interface on inbound streams 2020-05-28 12:37:48 +02:00
Vasco Santos
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
Vasco Santos
84b935f682 feat: metadata book (#638)
* feat: metadata book

* chore: address review

* chore: address review
2020-05-28 12:37:48 +02:00
Vasco Santos
aaa1155633 chore: uncomment local peer public key after connect test 2020-05-28 12:37:48 +02:00
Vasco Santos
0be74e6a61 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
Vasco Santos
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
Vasco Santos
2b45fee0ed fix: onConnect should not add addr to the addressBook 2020-05-28 12:37:48 +02:00
Vasco Santos
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
Vasco Santos
6627278a87 chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
Vasco Santos
65e87460b0 chore: add keys to keybook on connection upgraded 2020-05-28 12:37:48 +02:00
Vasco Santos
7b8d01697d chore: apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
Vasco Santos
ce38033c10 feat: keybook 2020-05-28 12:37:48 +02:00
Vasco Santos
48a9a3eecc refactor: peristent peer-store extended class and disabled by defaul 2020-05-28 12:37:48 +02:00
Vasco Santos
9ea9287bea chore: persist delete with test 2020-05-28 12:37:48 +02:00
Vasco Santos
5123a8357b feat: peerStore persistence 2020-05-28 12:37:48 +02:00