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
94483714a3
run lint and fix errors, except mypy
2024-02-19 16:05:58 -07:00
080f8edc8e
Use trio.lowlevel instead of trio.hazmat
...
Since trio 0.15.0, hazmat has been deprecated.
trio-typing and mypy are bumped to support newer trio and each other.
2021-02-23 22:02:34 +07:00
ce5663705f
Merge branch 'master' into feature/porting-to-trio
2019-12-24 02:19:43 +08: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
47d10e186f
Add SubscriptionAPI
...
And `TrioSubscriptionAPI`, to make subscription io-agnostic.
2019-12-17 18:17:28 +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
1929f307fb
Fix all modules except for security
2019-12-06 17:06:37 +08:00
e9ab0646e3
Fix Pubsub
2019-12-03 17:27:49 +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
986a852e7e
Remove forced debug level
2019-10-01 11:17:05 +02:00
9bad7a61f0
Add some loggings to pubsub
2019-09-14 21:54:26 +08:00
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
1b5d064a8d
Add utility functions for libp2p bindings
...
To prepare for pubsub interop test
2019-09-02 14:30:25 +08:00
3debd2c808
Run black and isort w/ the new config
2019-08-13 14:36:42 -07:00
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
7477b29508
run black w/ extended line length
2019-08-04 12:37:41 +08:00
2e94fcf56c
Remove pylint:disable
2019-08-02 23:26:06 +08:00
cd684aad9e
Update peer_id to type peer.ID in pubsub folder
2019-08-02 14:45:23 +08:00
b928bdb356
Convert from base58/pubkey/privkey to class method
2019-08-02 14:42:10 +08:00
0ae9840928
Run black over repo
2019-07-31 15:00:12 -07:00
c4105688d1
Fix after rebase
2019-07-30 17:31:08 +08:00
a4a0d79f6d
Improve import layout
2019-07-30 16:27:29 +08:00
d716e90e17
Fix on type hints
2019-07-30 16:25:33 +08:00
b2f496d081
Fix type hints except pb msg in pubsub folder
2019-07-30 16:24:34 +08:00
63014eeaae
Add type hints to floodsub.py
2019-07-30 16:20:47 +08:00
f02d38c0ee
Reflect PR feedback
...
* Rename `src` to `msg_forwarder` in pubsub/floodsub/gossipsub
* Rename Variables
* Sort imports
* Clean up
2019-07-29 12:09:35 +08:00
74d831d4e2
Reflect PR feedback
2019-07-28 18:06:38 +08:00
70c5c84f32
Update libp2p/pubsub/floodsub.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com >
2019-07-28 16:09:01 +08:00
a1e20caebe
Update libp2p/pubsub/floodsub.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com >
2019-07-28 16:07:11 +08:00
ffb3920468
Update libp2p/pubsub/floodsub.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com >
2019-07-28 16:06:03 +08:00
65aedcb25a
Fix several tests
2019-07-26 18:35:25 +08:00
035d08b8bd
Fix test_floodsub.py
2019-07-25 23:11:27 +08:00
cae4f34034
Refactor floodsub.publish
...
Passed the first test of floodsub
2019-07-25 14:08:16 +08:00
93cf5a2c32
A roughly skeleton of floodsub.publish
...
Still need to ensure when to deliver to ourselves
2019-07-24 22:33:32 +08:00
b528c211b9
Temp modified publish
2019-07-24 21:55:57 +08:00
d3a948be47
Fix error: Change params floodsub.publish back
2019-07-24 16:24:14 +08:00
d6c19e71a6
Add typing and notes in pubsub
2019-07-24 14:54:30 +08:00
9052e8f8bd
The Gossipsub PR ( #162 )
...
* Add handle_rpc call to pubsub
* Scaffold gossipsub functions
* Add timer
* Implement most of mesh construction
* Implement emit and handle
* Implement fanout heartbeat
* Refactor emit
* some gossipsub cleanup and test
* minor lint stuff, more to come
* Implement publish
* Fix comment
* Modify pubsub/gossipsub so that floodsub tests pass using gossipsub router
* Add floodsub tests to gossipsub
* Handle case where select_from_minus, num_to_select > size(pool-minus)
* Add topic membership
* Implement handle ihave
* Implement most of iwant
* Add mcache.add and comments
* Refactor handle_ihave
* Implement stream write in handle_iwant
* Implement gossip heartbeat
* unresolved vars
* initial mcache code
* documenting mcache
* writing test/debugging mcache
* finished mcache test and debugged
* Make gossipsub backward compatibility its own file
* remove mcache prints
* DEBUGGING
* Add sender_peer_id to handle_rpc to get gossip test passing
* Modify gossipsub to make fanout work
* fanout maintenance test
* debugging gsub GOSSIP
* DEBUGGING
* debugged sender seen cachce
* adding lru, removing prints
* pylint cleanup
* Fix github comments in PR
* minor floodsub possible bugfix
2019-05-06 23:44:13 -04:00
686c55b09c
Remove unnecessary print #146
2019-04-05 17:38:29 -04:00
7d3a8b5e77
clean up
2019-04-03 15:13:56 -04:00
bc6a27a762
fix all tests
2019-04-03 15:13:56 -04:00
fb5b3e4a24
reworked floodsub logic
2019-04-03 15:13:56 -04:00
3836aa65f1
fix encoding issue
2019-04-03 15:13:56 -04:00