Commit Graph

17 Commits

Author SHA1 Message Date
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
ad20d8cb00
Make a KeyPair dataclass for passing around key pairs 2019-08-14 09:00:40 -07:00
Alex Stokes
329bd4eb0f
Clean up peer ID tests 2019-08-14 09:00:40 -07:00
Chih Cheng Liang
c536aa3e07 flake8 2019-08-08 16:09:02 +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
568454534f
Remove unused ID type conversions 2019-08-02 16:48:38 +08:00
NIC619
924e965537
Change argument name of Network.listen and blakc format 2019-08-02 14:45:59 +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
Stuckinaboot
a4529d827d Modify peer_id str 2019-05-22 11:37:07 -04:00
Stuckinaboot
4b40339b63 Update peerid tests for longer peerids 2019-05-22 11:37:07 -04:00
Tran Ly Vu
ebd5ddc21f Update unit tests from peer package (#103)
* Update more test for peerid.py

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Update more tests for peerid.py

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Update more tests for peerid.py

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Update more unit tests

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Update more unit tests

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* FIx travis failaure

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix travis failaure

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Update indent-string to tab

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix lines that too long

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Convert indent back to space

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix lines that too long

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix lines that too long

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix lines that too long

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix lines that too long

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Disable W0212 and E1120

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix lines that too long

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix failure from travis

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Fix failure from travis

Signed-off-by: Tran Ly Vu <tranly.vu@accellion.com>

* Remove W0212 and E1120

Signed-off-by: Tran Ly Vu <vutransingapore@gmail.com>

* Fix packages import

Signed-off-by: Tran Ly Vu <vutransingapore@gmail.com>

* Add pylint dsiable

Signed-off-by: Tran Ly Vu <vutransingapore@gmail.com>
2019-01-12 11:31:08 -05:00
Alexander Koshkin
ce6ddb27a9 Migrate to new project structure. 2019-01-09 21:38:56 +03:00
Christophe de Carvalho
611de28aca Add basic support for multiaddr addresses and improvement around peer id (#75)
* Improved peer ID construction and usage

* peer id object is directly passed to the network

no need to cast from a string to an ID

* don't base64 encode the peer id when loading from public key

* use proper multiaddr address

- keep multiaddr object into peerstore instead of string
- update network code to use new multiaddr lib
- update tests and example

* don't instanciate peerstore object in constructor

This has side effect where the same peerstore
is used for different instance of Libp2p

* add connect method to basic_host

* use zaibon's fork of sbuss/py-multiaddr

* lint
2018-11-29 10:06:40 -05:00