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
33dae87c35
Add pubsub test for gossipsub
2019-09-03 16:07:44 +08:00
fd1f466002
Fix: failed to open stream using existing conn
...
Fix #233
2019-09-03 14:12:16 +08:00
194b494057
Tested against subscriptions and publish
2019-09-02 23:21:57 +08:00
3717dc9adf
Add helper functions
2019-09-02 21:01:13 +08:00
dfd9ebdc5e
Change PeerInfo to remove dep on PeerData
2019-09-02 14:30:27 +08:00
1b5d064a8d
Add utility functions for libp2p bindings
...
To prepare for pubsub interop test
2019-09-02 14:30:25 +08:00
77a0cc3a87
Add the missing __init__.py
2019-09-02 14:18:52 +08:00
aa0866698f
PR feedback: Add check in Swarm.close_peer
2019-08-31 22:37:59 +08:00
1e59438f25
Update libp2p/network/swarm.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com >
2019-08-31 22:32:32 +08:00
b2c5371323
Add TODO for Swarm.connections
2019-08-29 22:00:07 +08:00
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
34a4d7b0ed
Add the missing StreamID class
2019-08-28 21:45:18 +08:00
d35b8ffc64
Conform stream_id to go-mplex
2019-08-28 21:43:34 +08:00
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
a193ae81fd
Fix typo w/ header tag under different reset scenarios
2019-08-26 11:39:30 -07:00
c5eda4065d
Expose reset method on NetStream
2019-08-26 11:38:39 -07:00
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
66c3bacf7e
Merge pull request #254 from ralexstokes/implement-secio
...
Implement `secio`
2019-08-26 19:22:00 +02:00
fa0acd9fc5
Apply PR feedback
2019-08-26 10:03:12 -07:00
c1ffb03f77
Update comment to reflect correct function
2019-08-26 09:51:49 -07:00
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
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
5e68aff1d1
Fix conn attribute and docstring in mplex
2019-08-25 14:42:44 +08:00
a363ba97d1
Work in terms of the IRawConnection abstraction
2019-08-24 22:52:09 +02:00
eb5ef39399
Convert message IO to work w/ a RawConnection.
2019-08-24 22:47:56 +02:00
7c004a4e14
Mypy fixes
2019-08-24 22:38:26 +02:00
44e5de636f
Add "friendly" peer ID string representation for debugging
2019-08-24 22:38:26 +02:00
852609c85d
Clean up base session type
2019-08-24 22:38:26 +02:00
b8c0ef9ebb
Fix bugs in secio implementation
2019-08-24 22:38:25 +02:00
228032805a
Some code cleanup
2019-08-24 22:38:25 +02:00
3f4589d497
Get tests working
2019-08-24 22:38:25 +02:00
d176115972
Add secio to security upgrader suite
2019-08-24 22:37:46 +02:00
376a5d4fc6
Adjust callsite
2019-08-24 22:37:45 +02:00
1adef05e94
Typing and linting fixes
2019-08-24 22:37:45 +02:00
0fa3331b8c
Add clearer indication of "self encryption"
2019-08-24 22:37:45 +02:00
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
4d30b31c55
Finish first pass at secio implementation
2019-08-24 22:37:45 +02:00
af2e50aaf4
Add facility for authenticated encryption
2019-08-24 22:37:45 +02:00
228c17ae9e
Add ECDH key exchange utility
2019-08-24 22:37:44 +02:00
fb13dfa7b3
Add sign and verify operations for secp256k1 keys
2019-08-24 22:37:44 +02:00
3c97a5a0ed
Add ECC key implementation
2019-08-24 22:37:44 +02:00
91e11f3ec0
[wip] more secio implementation
2019-08-24 22:37:44 +02:00
0cc3fc24a7
Add source for some secure bytes, e.g. to provide a nonce
2019-08-24 22:37:44 +02:00
b59c5d6ca1
Add "msgio" functions
2019-08-24 22:37:44 +02:00
26165b0729
[wip] sketch of secio handshake
2019-08-24 22:37:44 +02:00
fd08bcf624
Add secio protobufs
2019-08-24 22:37:43 +02:00
23f53ef954
Allow optional peer ID in a security session
2019-08-24 22:37:43 +02:00
27c0a4f77b
formatting
2019-08-24 22:37:43 +02:00
5b32bfdd3f
Add call to wait_closed method of asyncio.StreamWriter
2019-08-24 22:06:24 +02:00