Commit Graph

66 Commits

Author SHA1 Message Date
mhchia
6e01a7da31
PR feedback: async with host.run() 2020-01-26 16:44:42 +08:00
mhchia
3372c32432
Fix examples and modify new_node
- Fix examples `chat.py` and `echo.py`
    - Use trio directly, instead of `trio-asyncio`
    - Remove redundant code
- Change entry API `new_node` to `new_host_trio`
2019-12-24 18:03:18 +08:00
mhchia
ce5663705f
Merge branch 'master' into feature/porting-to-trio 2019-12-24 02:19:43 +08:00
Chih Cheng Liang
82dcce214a
Remove kademlia module (#377)
* Remove kademlia and routing/kademlia

* cleanup

* Fix routed_host test

* lint mypy

* fix doc

* remove set_up_nodes_by_transport_and_disc_opt and fix typing
2019-12-06 14:14:33 +08:00
Jason Carver
2a9dc96269
Merge pull request #369 from carver/docs-travis-target
Add docs test to Travis CI
2019-11-27 10:36:15 -08:00
Jason Carver
d503950179 Fix all doc build warnings 2019-11-26 17:44:33 -08:00
Chih Cheng Liang
417b5e7d61
remove unused asyncio 2019-11-26 15:27:06 +08:00
Chih Cheng Liang
d4d345c3c7
progressing 2019-11-26 15:27:05 +08:00
Chih Cheng Liang
ed17bfd663
hack chat example 2019-11-26 15:27:04 +08:00
NIC619
828ae69c66
Apply PR feedback: add_key_pair 2019-11-26 11:52:31 +08:00
NIC619
a63f00d8f8
Store our pubkey/privkey info during
`initialize_default_swarm`
2019-11-25 16:55:55 +08:00
Chih Cheng Liang
bcd7890124
Move test utilities to tools (#356)
* move test factories to libp2p/tools

* remove unused inits

* move pubsub test utils to tools

* cleanup test_interop

* fix typing libp2p/tools/utils

* add typing to pubsub utils

* fix factories typing

* fix typing for floodsub_integration_test_settings

* fix rest of the typing

* fix isort
2019-11-21 11:47:54 +08:00
mhchia
10dd997805
Reorganize factories 2019-11-06 12:11:09 -08:00
Alex Stokes
32c55bcaf2
hosts track their public key 2019-11-06 11:41:27 -08:00
Dominik Muhs
bafdd8512d Enforce pre-summary newline in docstrings 2019-10-24 20:10:45 +02:00
Dominik Muhs
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +02:00
Aratz M. Lasa
70ea471491 Blacked 2019-10-15 19:11:11 +02:00
Aratz M. Lasa
d1d91e4091 Refactored for 'lint' testenv 2019-10-15 19:02:03 +02:00
Aratz M. Lasa
3f24b015ab Implemented Host that includes a routing system. Explicitly separating different Host types as in Go implementation 2019-10-14 00:29:28 +02:00
mhchia
37bee9fb16
PR feedback
- Use `TMuxerOptions` and `TSecurityOptions` in libp2p/__init__.py
- Remove the default value for `muxer_transports_by_protocol` in
`MuxerMultistream` and `secure_transports_by_protocol`
`SecureMultistream`
2019-09-24 12:51:59 +08:00
Kevin Mai-Husan Chia
1bd18c84f2
Apply suggestions from code review
Co-Authored-By: Alex Stokes <r.alex.stokes@gmail.com>
2019-09-24 12:33:14 +08:00
mhchia
a9ad37bc6f
Add mplex tests and fix error in SwarmConn.close 2019-09-19 16:31:41 +08:00
Alex Stokes
350cc04c97
Allow the key pair to drive ID generation 2019-09-03 13:26:58 -07:00
Alex Stokes
228032805a
Some code cleanup 2019-08-24 22:38:25 +02:00
Alex Stokes
d176115972
Add secio to security upgrader suite 2019-08-24 22:37:46 +02:00
mhchia
22b1a5395d
A working plaintext 2.0 without validation 2019-08-22 22:53:46 +08:00
mhchia
8596f7390f
PR feedback: set protocol_id to constants 2019-08-21 11:43:24 +08:00
mhchia
4358a4bc89
Negotiate multiselect version for Muxer
`MuxerMultistream` is introduced to negotiate `Multiselect` version
before negotiating Multiplexer's version. This is required by
multistream 1.x
2019-08-21 11:43:24 +08:00
Alex Stokes
7535a02da7
Clean up key gen 2019-08-15 19:24:30 -07:00
Alex Stokes
2e3ffb9d53
Use types for {Private,Public}Key and address other missing type hints 2019-08-15 16:33:34 -07:00
Alex Stokes
9e18d7561d
Supply local priv and pub key when upgrading to a secure transport 2019-08-15 16:33:34 -07:00
Alex Stokes
02e073d85a
Keep the host's private key for use in transports 2019-08-15 16:33:33 -07:00
Alex Stokes
1e5357a1e1
Update the ISecureConn interface following the reference and simplify accordingly 2019-08-15 16:33:33 -07:00
Alex Stokes
d50e1b6872
Use direct types over indirect types 2019-08-15 16:33:32 -07:00
Alex Stokes
ad20d8cb00
Make a KeyPair dataclass for passing around key pairs 2019-08-14 09:00:40 -07:00
Alex Stokes
c40314a043
Use new RSA key type 2019-08-14 09:00:39 -07:00
Alex Stokes
992585852f
Use explicit imports in top-level declaration 2019-08-13 17:43:21 -07:00
Chih Cheng Liang
28f6de37ee
Fix the rest of the typing hints (#232)
* ignore kad

* fix swarm, and minor

* fix init and swarm

* ignore pb

* enable mypy

* fix basic host

* fix tcp

* fix mplex

* add typing for pb

* skip format pyi

* [mypy] no need to ignore pb now

* add typing to chat
2019-08-11 16:47:54 +08:00
Alex Stokes
7477b29508 run black w/ extended line length 2019-08-04 12:37:41 +08:00
Alex Stokes
c8005c8113 Run isort in repo 2019-08-03 17:50:14 +08:00
Alex Stokes
bd8d45fbc1
Refactor ID to not use third-party type for cryptographic keys
Remove `ID.from_privkey` which would require specific knowledge per cryptosystem
2019-08-02 21:51:16 -07:00
mhchia
2e94fcf56c
Remove pylint:disable 2019-08-02 23:26:06 +08:00
NIC619
f00e80bc25
Fix wrong peer id type used in KadPeerInfo 2019-08-02 14:42:10 +08:00
NIC619
b928bdb356
Convert from base58/pubkey/privkey to class method 2019-08-02 14:42:10 +08:00
NIC619
80481252ca
Refactor ID to take in type bytes only 2019-08-02 14:42:10 +08:00
Alex Stokes
0ae9840928
Run black over repo 2019-07-31 15:00:12 -07:00
Kevin Mai-Husan Chia
4422888f6f
Merge pull request #180 from mhchia/fix/include-all-pkgs-setuptools
Change `packages` in `setup`
2019-07-20 22:39:57 +08:00
mhchia
10511d4930
Clean up a bit 2019-07-09 23:55:43 +08:00
NIC619
900b6d9f37
Fix docstring 2019-06-21 11:51:11 -06:00
ZX
49384ad3d7
Merge pull request #159 from libp2p/security-dev
Implement security
2019-05-07 09:56:19 -04:00