Commit Graph

91 Commits

Author SHA1 Message Date
e5f3e88134 added : timed_cache sub-module 2025-03-17 09:27:13 -06:00
0fa8711ca7 updated : seen message map type to bool from int 2025-03-17 09:27:13 -06:00
d7eab27564 refactored and moved all interfaces to abc.py (#504)
* refactored : host_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored : network_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored : notifee_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored : net_connection_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored: raw_connection_interface, secure_conn_interface and stream_muxer abc.py

* refactored: addrbook_interface

* refactored :peerdata_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored :peermetadata_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored :multiselect_client_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored :multiselect_communicator_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored :multiselect_muxer_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored :interfaces

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored :security_transport_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* refactored :listener_interface

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* moved all interfaces and typing files

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>

* fixed documentation and moved pubsub abc.py

Co-authored-by: Khwahish Patel <khwahish.p1@ahduni.edu.in>

* added exclude-members in custom_types docs

* added : newsfragment for moving all interfaces to libp2p.abc

---------

Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com>
Co-authored-by: Mystical <125946525+mystical-prog@users.noreply.github.com>
2025-02-21 16:01:45 -07:00
e7a9ee78a8 rename typing.py to custom_types.py for clarity 2025-02-02 07:18:52 -07:00
8787613e91 run lint with pyupgrade at py39-plus 2025-01-25 15:48:39 -07:00
33332d7106 sync handle_rpc docstring 2024-12-03 14:00:18 -07:00
d9b92635c1 drop async-service dep and copy relevant code into a local async_service
tool, updated for modern handling of ExceptionGroup
2024-05-27 12:14:36 -06:00
94483714a3 run lint and fix errors, except mypy 2024-02-19 16:05:58 -07:00
66975ae3f2 Pubsub: change run_task to run_daemon_task 2020-02-04 17:43:39 +08:00
ce5663705f Merge branch 'master' into feature/porting-to-trio 2019-12-24 02:19:43 +08: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
f3732f9480 Fix tests 2019-12-18 12:37:04 +08:00
19ce8a2140 Fix mypy 2019-12-17 21:56:02 +08:00
009df257bc Check peer id exist in dict before access 2019-12-17 18:47:58 +08:00
47d10e186f Add SubscriptionAPI
And `TrioSubscriptionAPI`, to make subscription io-agnostic.
2019-12-17 18:17:28 +08:00
b4bd997932 Fix mypy 2019-12-17 17:49:49 +08:00
65766ec9ac Change type of local peers var from list to set 2019-12-17 17:36:15 +08:00
f1d58ef8ff Change type of peers from list to set:
`peers_gossipsub`, `peers_floodsub` and mesh/fanout peers
2019-12-17 17:30:24 +08:00
7d6daa8e10 Minor cleanup:
- remove outdated comment
- add new peer at the end
- turn peers to send from list to set
2019-12-17 17:17:03 +08:00
a675da52ee Update libp2p/pubsub/gossipsub.py
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-12-07 15:46:42 +08:00
2d3bfc8184 Apply PR feedback:
use defaultdict and init control message
2019-12-06 23:42:31 +08:00
1929f307fb Fix all modules except for security 2019-12-06 17:06:37 +08:00
db0017ddbb Fix lint after applying suggestion 2019-12-05 17:33:07 +08:00
b4900d53da Apply suggestions from code review
Co-Authored-By: Chih Cheng Liang <chihchengliang@gmail.com>
2019-12-05 15:21:09 +08:00
67f02c512a Remove unnecessary check and fix test 2019-12-05 15:10:04 +08:00
e6813da5f5 Refactor _get_peers_to_send 2019-12-05 14:35:34 +08:00
c08b2375e1 Fix: should not remove topic if no peers 2019-12-03 23:10:47 +08:00
a9abf1e3dd Fix list deletion and add list remove check 2019-12-03 22:37:49 +08:00
bb15c817b1 Fix var access before assignment 2019-12-03 22:14:45 +08:00
ea6cd30a16 Add back some comment and TODO. Add comment to tests 2019-12-03 18:45:33 +08:00
5efdf4c703 Group messages for peer in heartbeat 2019-12-03 15:48:23 +08:00
ab1500c708 Remove unneccessary check in gossip heartbeat 2019-12-03 15:03:06 +08:00
920cf646ef Fix lint and add check in fanout heartbeat 2019-12-02 22:49:27 +08:00
a7e0c5d737 Add missing cleanup in gossipsub remove_peer 2019-12-02 22:41:49 +08:00
357341e0d8 Remove unneccessary filter and check in gossipsub 2019-12-02 22:40:35 +08:00
c2d88962c7 Add gossipsub heartbeat_initial_delay 2019-12-02 16:55:16 +08:00
0672f5ae6d Fix: move heartbeat delay to heartbeat 2019-12-02 16:38:48 +08:00
50fd0acf41 Cleanup outdated TODOs in gossipsub 2019-11-30 20:19:17 +08:00
e355cb2600 Apply PR feedback:
Only use pop method if error handling is in place
2019-11-23 16:04:22 +08:00
501eef59de Apply PR feedback:
Only use pop method if graceful failure handling is desired
2019-11-21 14:48:03 +08:00
19907e18ec Replace (check and) del pattern with pop method 2019-11-20 23:06:37 +08:00
ace5ef69a8 Apply PR feedback:
handle pubsub dead peer when stream closed in gossipsub
2019-11-16 17:03:04 +08:00
ccc7879422 Add stream.write error handling in gossipsub 2019-11-16 16:57:11 +08:00
9be9b4bbfc Handle StreamClosed in pub/gossip/flood-sub 2019-11-16 16:56:59 +08:00
bafdd8512d Enforce pre-summary newline in docstrings 2019-10-24 20:10:45 +02:00
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +02:00