Commit Graph

1764 Commits

Author SHA1 Message Date
fe4354d377 Fix tests_interop
- Remove pexpect
- Use new version of `p2pclient`, which makes use of anyio
- Clean up tests
2020-01-07 14:14:34 +08:00
000e777ac7 Try older async-service 2019-12-26 20:44:58 +08:00
94f0fcb6ad Iterate dead_peer_receive_channel with async for 2019-12-26 20:44:32 +08:00
68c84b273d Use cls over the name of the factory 2019-12-26 20:44:10 +08:00
3c98b1973d Remove useless conftest for pubsub 2019-12-26 20:43:38 +08:00
4d814f0587 Merge pull request #394 from NIC619/fix_closing_a_reset_connection
Fix `close` an already reset connection
2019-12-26 12:13:26 +08:00
3b0386d861 Raise RawConnError 2019-12-24 22:27:16 +08:00
c62f1f374f Check if transport is closing before write/close 2019-12-24 22:23:38 +08:00
a390d21385 Remove RawConnError from exception handling 2019-12-24 21:57:13 +08:00
fb6076c061 Upgrade to 0.1.0a4
Probably it can solve the dag issue:
https://github.com/ethereum/async-service/issues/12
2019-12-24 21:50:42 +08:00
6ae3f5dc1b Add checkpoints in tests 2019-12-24 21:28:37 +08:00
53dbb0aff1 Fix pubsub_notifee.py
For wrong syntax and import
2019-12-24 18:37:59 +08:00
573c049d0f Catch expections in PubsubNotifee
Also, add lock to avoid resource race condition
2019-12-24 18:31:39 +08:00
2287dc95be Fix test for info_from_p2p_addr
It is because I removed some checks in the function. This checks should
be useless thanks to mypy
2019-12-24 18:08:33 +08:00
3372c32432 Fix examples and modify new_node
- Fix examples `chat.py` and `echo.py`
    - Use trio directly, instead of `trio-asyncio`
    - Remove redundant code
- Change entry API `new_node` to `new_host_trio`
2019-12-24 18:03:18 +08:00
8f52315816 Fix close an already reset connection 2019-12-24 16:19:49 +08:00
6fe5871d96 Use async-exit-stack over contextlib
For `AsyncExitStack`
2019-12-24 14:44:28 +08:00
ce5663705f Merge branch 'master' into feature/porting-to-trio 2019-12-24 02:19:43 +08:00
c35cb8318a Merge pull request #393 from ShadowJonathan/hashable_multiaddr
bump multiaddr to 0.0.9
2019-12-23 17:32:08 +08:00
45ef63af20 bump multiaddr from setup to 0.0.9 2019-12-23 09:24:41 +01:00
adae81ca01 fix logging bug 2019-12-23 09:15:56 +01:00
96f6b80e51 Merge remote-tracking branch 'origin/master' into f-string_clean
# Conflicts:
#	libp2p/network/swarm.py
2019-12-23 09:14:15 +01:00
9d3312ebaf Merge pull request #380 from ShadowJonathan/fix_dependencies
Fix dependency issues (and fastecdsa windows depencency)
2019-12-23 14:26:40 +08:00
1571bfac07 Merge pull request #386 from ShadowJonathan/issue_384
fixes #384
2019-12-23 14:25:38 +08:00
a08e749150 add lru to known_third_parties 2019-12-21 12:56:44 +01:00
17074dded0 add tests to new multiple multiaddr change 2019-12-21 10:35:34 +01:00
0b97f4d57c remove eth_utils per PR request 2019-12-21 08:59:07 +01:00
df8be6eb09 revert network/tcp.py and add changes to multiaddr_to_socket_fix 2019-12-19 21:09:11 +01:00
0827d0d9ef add 2 more instances of formatting violations 2019-12-19 18:09:47 +01:00
28da206aea Merge pull request #387 from NIC619/fix_inconsistent_pubsub_peer_record_update
Store peer ids in set instead of list and check if peer id exist before access
2019-12-20 00:34:14 +08:00
b1248ff315 enforced f-strings everywhere, %s on logging
extended _multiaddr_from_socket to support UDP and IPv6 automatically
changed TCPListener to use _ip4_or_6_from_multiaddr to get host, and not ip4 only

enforced `from error` everywhere with raises
added call braces to exceptions
2019-12-19 17:31:18 +01:00
3c75c85d7f Fix extra white space 2019-12-19 23:07:20 +08:00
cb80cfc50b Update libp2p/pubsub/gossipsub.py
Co-Authored-By: Chih Cheng Liang <chihchengliang@gmail.com>
2019-12-19 16:33:56 +08:00
74092c1371 Apply PR feedback: update error msg 2019-12-19 16:26:37 +08:00
e51d376d5e Combine peers_gossipsub and peers_floodsub 2019-12-19 14:44:49 +08:00
6cd3eb8fae Apply PR feedback:
change param type and remove check before `discard`
2019-12-19 14:15:51 +08:00
1124fc8211 add eth_utils
add fastecdsa-any requirements
2019-12-19 01:26:44 +01:00
6cf1b98a88 mark explicit modulo formatting (to get started with PR draft) 2019-12-19 00:37:09 +01:00
f54bc9d1af Make linter happy 2019-12-18 19:05:22 +01:00
81fe4049cf Apply PR review feedback
> add `if not addr` clause back
> use f-strings for exceptions instead of %s
2019-12-18 18:47:03 +01:00
4e4d91b2e2 Apply PR review suggestion (change "muxed" to "network" in docstrings)
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-12-18 10:54:52 +01:00
f3732f9480 Fix tests 2019-12-18 12:37:04 +08:00
6b75901243 apply PR feedback (remote len == 0 block, remove redundant fixme comment + docstring line)
change wording of final SwarmException to include possible case of no addresses in returned address set

add `from error` in except clause
2019-12-17 20:20:09 +01:00
445c0f8e65 Dangling kademlia cleanup 2019-12-17 10:11:17 -08:00
1355fbae99 Merge pull request #385 from ShadowJonathan/issue_197
fixes #197
2019-12-17 09:35:36 -08:00
19ce8a2140 Fix mypy 2019-12-17 21:56:02 +08:00
04b9d688f8 Add newsfragment 2019-12-17 19:09:15 +08:00
3cbe24caab fixes #384
also adds MultiError to libp2p/exceptions.py

and an additional fixme I have noticed
2019-12-17 12:00:11 +01:00
474ed41652 Remove dead peer if floodsub write stream fail 2019-12-17 18:48:25 +08:00
009df257bc Check peer id exist in dict before access 2019-12-17 18:47:58 +08:00