Commit Graph

65 Commits

Author SHA1 Message Date
mhchia
f1dbd52d67
Merge branch 'master' into feature/trio 2020-02-06 10:39:54 +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
Jonathan de Jong
0827d0d9ef add 2 more instances of formatting violations 2019-12-19 18:09:47 +01:00
Jonathan de Jong
b1248ff315 enforced f-strings everywhere, %s on logging
extended _multiaddr_from_socket to support UDP and IPv6 automatically
changed TCPListener to use _ip4_or_6_from_multiaddr to get host, and not ip4 only

enforced `from error` everywhere with raises
added call braces to exceptions
2019-12-19 17:31:18 +01:00
Jonathan de Jong
794d2101e9 fixes #197 2019-12-17 11:00:45 +01:00
NIC619
9f3f2c53da
Apply PR feedback:
use defaultdict for peer data map
2019-11-26 16:18:15 +08:00
NIC619
94c7a0bca4
Apply PR feedback and fix 2019-11-26 14:04:28 +08:00
NIC619
fab27b0357
Fix lint 2019-11-26 12:35:50 +08:00
NIC619
ffa73f5649
Check if pubkey matches peer ID before add 2019-11-26 12:33:55 +08:00
NIC619
0bfbdf7fab
Move keypair into PeerData 2019-11-26 12:27:59 +08:00
NIC619
828ae69c66
Apply PR feedback: add_key_pair 2019-11-26 11:52:31 +08:00
NIC619
566e4c080d
Fix lint 2019-11-25 17:32:53 +08:00
NIC619
8b4022328d
Update peer store interface 2019-11-25 17:16:47 +08:00
NIC619
144d93a023
Add pubkey/privkey info to PeerStore 2019-11-24 18:04:00 +08:00
NIC619
9837f30698
Rename peer_map to peer_data_map 2019-11-24 16:52:46 +08:00
Piper Merriam
ded3792924
Merge pull request #331 from dmuhs/fix/docs-format
Add automatic docstring formatting
2019-10-28 09:39:52 -06: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
NIC619
211e2f6dd0
Catch PeerDataError in PeerStore.get 2019-10-17 15:52:57 +08:00
Aratz M. Lasa
ac9feef26c Pull request feedback 2019-10-15 20:32:25 +02:00
Aratz M. Lasa
d1d91e4091 Refactored for 'lint' testenv 2019-10-15 19:02:03 +02:00
aratz-lasa
65b5e7aeea
Update libp2p/peer/peerinfo.py
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-10-15 16:31:20 +02:00
Aratz M. Lasa
8143563831 Added tests for 'RoutedHost' and modified 'FindPeer' 2019-10-15 01:01:16 +02:00
Alex Stokes
50ae439d20
remove friendly IDs 2019-09-07 11:04:20 -04:00
Kevin Mai-Husan Chia
e9ca372fb5
Merge pull request #271 from mhchia/fix/pubsub-interop
Pubsub interop with go-libp2p-daemon
2019-09-04 22:28:14 +08:00
mhchia
0e3d4508d6
PR feedback
- Use `Sequence` instead of `List`
- Add note
- Remove redundant words in docstring
2019-09-04 20:52:18 +08:00
Alex Stokes
345e696a7d
Add option to inline "short" public keys for peer IDs
Added to remain interoperable w/ the Go implementation
2019-09-03 13:14:04 -07:00
mhchia
dfd9ebdc5e
Change PeerInfo to remove dep on PeerData 2019-09-02 14:30:27 +08:00
mhchia
d35b8ffc64
Conform stream_id to go-mplex 2019-08-28 21:43:34 +08:00
Alex Stokes
44e5de636f
Add "friendly" peer ID string representation for debugging 2019-08-24 22:38:26 +02:00
Alex Stokes
87d943aa39
Internalize the protobuf serialization to the concept of a Key
Given its use across various components of `libp2p` (not just peer IDs),
it makes the abstraction cleaner to pull the serialization into the
key class and expose the canonical serialization to bytes.
2019-08-20 19:01:36 +02:00
Alex Stokes
ab7653526f
Code cleanup / formatting 2019-08-15 16:33:33 -07:00
Alex Stokes
6506079a36
Generate peer IDs according to the spec 2019-08-14 09:00:39 -07:00
Alex Stokes
f9e859a8e9
Clean up peer.ID 2019-08-14 09:00:39 -07:00
Alex Stokes
3debd2c808
Run black and isort w/ the new config 2019-08-13 14:36:42 -07: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
ee290b2ac2
Fix missing asterisk 2019-08-02 16:48:32 +08:00
NIC619
0173b5e0d9
Add ID.to_base58() and comparison against str type 2019-08-02 14:46:01 +08:00
NIC619
924e965537
Change argument name of Network.listen and blakc format 2019-08-02 14:45:59 +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
NIC619
5e215901c0
Apply PR feedback 2019-07-30 23:41:28 +08:00
NIC619
c4105688d1
Fix after rebase 2019-07-30 17:31:08 +08:00
NIC619
e53727d301
Apply PR feedback: fix type hints 2019-07-30 16:28:25 +08:00
NIC619
2d4e23cfe2
Fix cyclic import and lint 2019-07-30 16:28:05 +08:00