Commit Graph

846 Commits

Author SHA1 Message Date
dfd9ebdc5e Change PeerInfo to remove dep on PeerData 2019-09-02 14:30:27 +08:00
b77834d129 Use asyncio.subprocess over pexpect
In the test for pubsub, since there were unknown issues when I test
against pexpect.
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
db858e467c Merge pull request #273 from mhchia/fix/secio-pb-initpy
Add the missing __init__.py
2019-09-02 14:27:59 +08:00
77a0cc3a87 Add the missing __init__.py 2019-09-02 14:18:52 +08:00
73ae5a35ec Merge pull request #270 from mhchia/fix/mplex-stream-id-and-interop
Fix mplex stream id and add interop CI
2019-08-31 23:56:43 +08:00
b955c0fa02 Explicitly import ID, Transport from secio 2019-08-31 22:38:46 +08:00
aa0866698f PR feedback: Add check in Swarm.close_peer 2019-08-31 22:37:59 +08:00
9e8a6bdf29 Update tests/conftest.py
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-08-31 22:32:43 +08:00
1e59438f25 Update libp2p/network/swarm.py
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-08-31 22:32:32 +08:00
cec2aea928 Move shared fixtures and constants to files 2019-08-29 22:38:08 +08:00
9ceb5f55bb Call make_echo_proc with is_host_insecure
Use the fixture, this way we can configure `is_host_insecure` to support
the test against secio.
2019-08-29 22:08:27 +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
64c0dab3af Fix isort 2019-08-29 00:01:48 +08:00
e0399beed8 Fix tar argument 2019-08-28 23:50:46 +08:00
15f62dff68 Use go12 in CI 2019-08-28 23:48:25 +08:00
b726d7c9da Add tox and CI for interop 2019-08-28 23:39:33 +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
5b122d04b2 Merge pull request #267 from NIC619/fix_conn_attr_in_mplex
Small fix on `conn` attribute and docstring in mplex
2019-08-25 16:53:29 +08:00
5e68aff1d1 Fix conn attribute and docstring in mplex 2019-08-25 14:42:44 +08:00
f08aa339b4 Verify the channel can pass some plaintext 2019-08-24 23:26:26 +02:00
737195f461 Simplify testing connection w/ other simplifications 2019-08-24 23:15:31 +02:00
10e30beb42 Disable "friendly" IDs for tests that expect a full string 2019-08-24 22:57:22 +02: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
9355f33da8 Add basic test for secio
Two peers in-memory can create a secure, bidirectional channel
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