mhchia
7385a7a677
Add is_gossipsub
fixture in interop test
...
To use the same code to test against both routers: floodsub and
gossipsub.
2019-09-03 16:49:00 +08:00
mhchia
33dae87c35
Add pubsub test for gossipsub
2019-09-03 16:07:44 +08:00
mhchia
fd1f466002
Fix: failed to open stream using existing conn
...
Fix #233
2019-09-03 14:12:16 +08:00
mhchia
194b494057
Tested against subscriptions and publish
2019-09-02 23:21:57 +08:00
mhchia
3717dc9adf
Add helper functions
2019-09-02 21:01:13 +08:00
mhchia
dfd9ebdc5e
Change PeerInfo
to remove dep on PeerData
2019-09-02 14:30:27 +08:00
mhchia
1b5d064a8d
Add utility functions for libp2p bindings
...
To prepare for pubsub interop test
2019-09-02 14:30:25 +08:00
mhchia
77a0cc3a87
Add the missing __init__.py
2019-09-02 14:18:52 +08:00
mhchia
aa0866698f
PR feedback: Add check in Swarm.close_peer
2019-08-31 22:37:59 +08:00
Kevin Mai-Husan Chia
1e59438f25
Update libp2p/network/swarm.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-08-31 22:32:32 +08:00
mhchia
b2c5371323
Add TODO for Swarm.connections
2019-08-29 22:00:07 +08:00
mhchia
c61a06706a
Refactor interop tests and factories
...
- Add `close` and `disconnect` in `Host`
- Add `close` and `close_peer` in `Network`
- Change `IListener.close` to async, to await for server's closing
- Add factories for security transports, and modify `HostFactory`
2019-08-29 21:38:06 +08:00
mhchia
34a4d7b0ed
Add the missing StreamID class
2019-08-28 21:45:18 +08:00
mhchia
d35b8ffc64
Conform stream_id
to go-mplex
2019-08-28 21:43:34 +08:00
Alex Stokes
9b60e1757d
Merge pull request #269 from ralexstokes/add-reset-to-network-stream
...
Expose `reset` method on `NetStream`
2019-08-26 21:27:57 +02:00
Alex Stokes
a193ae81fd
Fix typo w/ header tag under different reset scenarios
2019-08-26 11:39:30 -07:00
Alex Stokes
c5eda4065d
Expose reset
method on NetStream
2019-08-26 11:38:39 -07:00
Alex Stokes
98a0e76dda
Merge pull request #268 from mhchia/fix/mplex-interop
...
Fix: name of a `MplexStream` is not handled in `Mplex`
2019-08-26 19:51:57 +02:00
Alex Stokes
66c3bacf7e
Merge pull request #254 from ralexstokes/implement-secio
...
Implement `secio`
2019-08-26 19:22:00 +02:00
Alex Stokes
fa0acd9fc5
Apply PR feedback
2019-08-26 10:03:12 -07:00
Alex Stokes
c1ffb03f77
Update comment to reflect correct function
2019-08-26 09:51:49 -07:00
mhchia
b6c8ab0dc9
Fix #259 : Use the unsigned LEB128 impl from py-wasm
...
Reference: https://github.com/ethereum/py-wasm/blob/master/wasm/parsers/leb128.py
2019-08-26 20:41:10 +08:00
mhchia
d59870ebbf
Fix MplexStream
error
...
When receiving a `NewStream`, the message of that packet is the
name of the stream, which should be handled, rather than letting it go
into the message queue.
2019-08-26 20:39:08 +08:00
NIC619
5e68aff1d1
Fix conn
attribute and docstring in mplex
2019-08-25 14:42:44 +08:00
Alex Stokes
a363ba97d1
Work in terms of the IRawConnection
abstraction
2019-08-24 22:52:09 +02:00
Alex Stokes
eb5ef39399
Convert message IO to work w/ a RawConnection
.
2019-08-24 22:47:56 +02:00
Alex Stokes
7c004a4e14
Mypy fixes
2019-08-24 22:38:26 +02:00
Alex Stokes
44e5de636f
Add "friendly" peer ID string representation for debugging
2019-08-24 22:38:26 +02:00
Alex Stokes
852609c85d
Clean up base session type
2019-08-24 22:38:26 +02:00
Alex Stokes
b8c0ef9ebb
Fix bugs in secio
implementation
2019-08-24 22:38:25 +02:00
Alex Stokes
228032805a
Some code cleanup
2019-08-24 22:38:25 +02:00
Alex Stokes
3f4589d497
Get tests working
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
Alex Stokes
376a5d4fc6
Adjust callsite
2019-08-24 22:37:45 +02:00
Alex Stokes
1adef05e94
Typing and linting fixes
2019-08-24 22:37:45 +02:00
Alex Stokes
0fa3331b8c
Add clearer indication of "self encryption"
2019-08-24 22:37:45 +02:00
Alex Stokes
8e913a3faa
Dispatch serialization of keys based on key type
...
- Add some tests to check high-level roundtrip
2019-08-24 22:37:45 +02:00
Alex Stokes
4d30b31c55
Finish first pass at secio
implementation
2019-08-24 22:37:45 +02:00
Alex Stokes
af2e50aaf4
Add facility for authenticated encryption
2019-08-24 22:37:45 +02:00
Alex Stokes
228c17ae9e
Add ECDH key exchange utility
2019-08-24 22:37:44 +02:00
Alex Stokes
fb13dfa7b3
Add sign
and verify
operations for secp256k1
keys
2019-08-24 22:37:44 +02:00
Alex Stokes
3c97a5a0ed
Add ECC key implementation
2019-08-24 22:37:44 +02:00
Alex Stokes
91e11f3ec0
[wip] more secio implementation
2019-08-24 22:37:44 +02:00
Alex Stokes
0cc3fc24a7
Add source for some secure bytes, e.g. to provide a nonce
2019-08-24 22:37:44 +02:00
Alex Stokes
b59c5d6ca1
Add "msgio" functions
2019-08-24 22:37:44 +02:00
Alex Stokes
26165b0729
[wip] sketch of secio handshake
2019-08-24 22:37:44 +02:00
Alex Stokes
fd08bcf624
Add secio
protobufs
2019-08-24 22:37:43 +02:00
Alex Stokes
23f53ef954
Allow optional peer ID in a security session
2019-08-24 22:37:43 +02:00
Alex Stokes
27c0a4f77b
formatting
2019-08-24 22:37:43 +02:00
Alex Stokes
5b32bfdd3f
Add call to wait_closed
method of asyncio.StreamWriter
2019-08-24 22:06:24 +02:00