mhchia
6cb033fd1f
Refactor multiselect
out of Swarm
to BasicHost
2019-09-19 13:59:50 +08:00
mhchia
0bd213bbb7
Refactor mplex and start to add close detection
2019-09-19 13:56:05 +08:00
NIC619
f368f5e93b
Apply PR feedback
2019-09-15 15:09:58 +08:00
NIC619
786a03544c
Add some loggings to swarm and cosmetic updates
2019-09-14 21:47:49 +08:00
mhchia
451f993058
Fix isort
2019-09-11 18:05:41 +08:00
mhchia
c1ffc0ab07
Fix transport.dial
in swarm
2019-09-11 17:13:21 +08:00
Alex Stokes
4bd32cc4bc
Add logs during connection handshake
2019-09-10 19:02:29 -04:00
mhchia
10415cb956
Use ReadWriteCloser
for conns and streams
2019-09-05 23:24:17 +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
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
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
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
Alex Stokes
5b32bfdd3f
Add call to wait_closed
method of asyncio.StreamWriter
2019-08-24 22:06:24 +02:00
Alex Stokes
e29c1507bf
remove unused fields
2019-08-24 21:50:06 +02:00
mhchia
16a4fd33c1
PR feedbacks
...
- Move exceptions to exceptions.py
- Raise `UpgradeFailure` in upgrader
- Refine the try/catch for upgraders in swarm
2019-08-22 22:53:49 +08:00
mhchia
5768daa9bf
PR feedbacks
...
- Nits
- Add `SecurityUpgradeFailure` and handle `UpgradeFailure` in Swarm.
2019-08-22 22:53:47 +08:00
mhchia
bb7d37fd4f
Fix msg encoding
...
- Change varint-prefix encode to fixedint-prefix(4 bytes) encode.
2019-08-22 22:53:46 +08:00
mhchia
22b1a5395d
A working plaintext 2.0 without validation
2019-08-22 22:53:46 +08:00
mhchia
7bc363f2fa
Remove initiator in Mplex
...
Besides, fix the wrong passed `multi_addr` to `mplex_stream`.
2019-08-22 22:53:45 +08:00
mhchia
4358a4bc89
Negotiate multiselect version for Muxer
...
`MuxerMultistream` is introduced to negotiate `Multiselect` version
before negotiating Multiplexer's version. This is required by
multistream 1.x
2019-08-21 11:43:24 +08:00
mhchia
86d4ce1da8
Add delim_encode
and delim_read
...
- Add `StreamCommunicator` and `RawConnectionCommunicator`, read/write
messages with delim codec, with `IMuxedStream` and `IRawConnection`
respectively.
- Use it in `Multiselect` and `MultiselectClient`.
2019-08-18 19:51:04 +08:00
Alex Stokes
3debd2c808
Run black
and isort
w/ the new config
2019-08-13 14:36:42 -07:00
Chih Cheng Liang
28f6de37ee
Fix the rest of the typing hints ( #232 )
...
* ignore kad
* fix swarm, and minor
* fix init and swarm
* ignore pb
* enable mypy
* fix basic host
* fix tcp
* fix mplex
* add typing for pb
* skip format pyi
* [mypy] no need to ignore pb now
* add typing to chat
2019-08-11 16:47:54 +08:00
Chih Cheng Liang
c536aa3e07
flake8
2019-08-08 16:09:02 +08:00
Chih Cheng Liang
5903012e0e
add typing to protocol_muxer
2019-08-08 16:09:02 +08:00
Chih Cheng Liang
9e0a806218
move stream and connection interfaces to abc
2019-08-05 11:17:38 +08:00
Chih Cheng Liang
29091266fc
add still needed TYPE_CHECK
2019-08-05 10:46:49 +08:00
Alex Stokes
7477b29508
run black w/ extended line length
2019-08-04 12:37:41 +08:00
Alex Stokes
c8005c8113
Run isort
in repo
2019-08-03 17:50:14 +08:00
mhchia
2e94fcf56c
Remove pylint:disable
2019-08-02 23:26:06 +08:00
NIC619
3a4b592a5a
Fix missing asterisk
2019-08-02 15:06:39 +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
Alex Stokes
0ae9840928
Run black
over repo
2019-07-31 15:00:12 -07:00
NIC619
5e215901c0
Apply PR feedback
2019-07-30 23:41:28 +08:00
NIC619
c4105688d1
Fix after rebase
2019-07-30 17:31:08 +08:00
NIC619
e53727d301
Apply PR feedback: fix type hints
2019-07-30 16:28:25 +08:00
NIC619
2d4e23cfe2
Fix cyclic import and lint
2019-07-30 16:28:05 +08:00
NIC619
a4a0d79f6d
Improve import layout
2019-07-30 16:27:29 +08:00
NIC619
d716e90e17
Fix on type hints
2019-07-30 16:25:33 +08:00
NIC619
edd164c878
Add type hints to network folder
2019-07-30 16:25:17 +08:00
mhchia
8f9e5a28ff
Temp
2019-07-24 21:54:36 +08:00
ZX
49384ad3d7
Merge pull request #159 from libp2p/security-dev
...
Implement security
2019-05-07 09:56:19 -04:00
stuckinaboot
ff500e6d8e
Merge branch 'master' into security-dev
2019-05-01 17:26:23 -04:00
Stuckinaboot
4333c2d061
Fix linting issues'
2019-05-01 13:54:19 -04:00
Stuckinaboot
f59f27d4d0
Integrate security selectin into libp2p system
2019-04-30 03:09:05 -04:00