Commit Graph

859 Commits

Author SHA1 Message Date
mhchia
4f7bb30d82
Add INetStream to type StreamReader
TODO: Make stream readers implement `Reader`
2019-09-03 22:59:44 +08:00
mhchia
c6d81d70b3
Try 3.7-dev in CI
Use https over ssh when cloning go-libp2p-daemon

To avoid """
Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
"""

Exit if clone fails

Fix daemon url
2019-09-03 22:50:14 +08:00
mhchia
d1b0340164
Update bindings version 2019-09-03 21:55:07 +08:00
mhchia
2ba7948f95
Update bindings version 2019-09-03 18:52:55 +08:00
mhchia
5280f3965c
Update install script for interop
And adjust the structure of go packages for interop
2019-09-03 17:41:17 +08:00
mhchia
749ff275ed
Refactor make_p2pd
Let `make_p2pd` get rid of `unused_tcp_port_factory`, which should only
exist in fixtures/tests.
2019-09-03 16:55:42 +08:00
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
a883816881
Add connect utility function 2019-09-02 18:40:12 +08:00
mhchia
56ef0b962c
Add test for host connect and disconnect 2019-09-02 17:32:15 +08:00
mhchia
dfd9ebdc5e
Change PeerInfo to remove dep on PeerData 2019-09-02 14:30:27 +08:00
mhchia
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
mhchia
1b5d064a8d
Add utility functions for libp2p bindings
To prepare for pubsub interop test
2019-09-02 14:30:25 +08:00
Kevin Mai-Husan Chia
db858e467c
Merge pull request #273 from mhchia/fix/secio-pb-initpy
Add the missing __init__.py
2019-09-02 14:27:59 +08:00
mhchia
77a0cc3a87
Add the missing __init__.py 2019-09-02 14:18:52 +08:00
Kevin Mai-Husan Chia
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
mhchia
b955c0fa02
Explicitly import ID, Transport from secio 2019-08-31 22:38:46 +08:00
mhchia
aa0866698f
PR feedback: Add check in Swarm.close_peer 2019-08-31 22:37:59 +08:00
Kevin Mai-Husan Chia
9e8a6bdf29
Update tests/conftest.py
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-08-31 22:32:43 +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
cec2aea928
Move shared fixtures and constants to files 2019-08-29 22:38:08 +08:00
mhchia
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
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
64c0dab3af
Fix isort 2019-08-29 00:01:48 +08:00
mhchia
e0399beed8
Fix tar argument 2019-08-28 23:50:46 +08:00
mhchia
15f62dff68
Use go12 in CI 2019-08-28 23:48:25 +08:00
mhchia
b726d7c9da
Add tox and CI for interop 2019-08-28 23:39:33 +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
NIC Lin
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
NIC619
5e68aff1d1
Fix conn attribute and docstring in mplex 2019-08-25 14:42:44 +08:00
Alex Stokes
f08aa339b4
Verify the channel can pass some plaintext 2019-08-24 23:26:26 +02:00
Alex Stokes
737195f461
Simplify testing connection w/ other simplifications 2019-08-24 23:15:31 +02:00
Alex Stokes
10e30beb42
Disable "friendly" IDs for tests that expect a full string 2019-08-24 22:57:22 +02: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