Commit Graph

50 Commits

Author SHA1 Message Date
e9674d2bca refractored Peer_Info to PeerInfo as imports 2025-05-09 17:31:15 -06:00
99238403dd added logger in test file and added dependency in tox.ini 2025-05-09 17:31:15 -06:00
9655c88788 feat/561-added autonat service 2025-05-09 17:31:15 -06:00
1213710af3 lint: resolved lint issues 2025-05-01 09:14:46 -06:00
e928e6a8cd Refactor: Update test_identify_push.py removing duplicated import 2025-05-01 09:14:46 -06:00
91beff5e63 fix: added identify push to setup.py 2025-05-01 09:14:46 -06:00
e752629212 fix: fixing test_examples.py failing test 2025-05-01 09:14:46 -06:00
66707364a7 doc: adding identify push protocol examples and doc 2025-05-01 09:14:46 -06:00
cef73519d3 feat: identify-push protocol. initial release 2025-05-01 09:14:46 -06:00
346a0a14db Pubsub example for py-libp2p (#515)
* Initial setup for pubsup

* Created node and trying to setup gossipsub

* Fix: Use pubsub object for publishing messages instead of gossipsub

* Correct help message for port argument.

* Fix: Used pubsub object instead of gossipsub object on Client side

* Fix: handle_new_peer method of pubsub is used to connect to new peers.

* used for host.connect to connect to peers

* Corrected script for connecting to other peers.

* message receiving function created

* message publishing function created

* Refactored the code for improved clarity and maintainability.

* fix: make publish loop input non-blocking to prevent event loop blocking

* refactored the code for better user experience while publishing message

* corrected the name of protocol

* Fix: Correct the implementation of the port argument

* Added pubsub initialization

* added logging

* pubsub instance is running

* Enhance publish loop with user prompts and error handling

* Connection monitoring added

* Add key pair generation and security options to pubsub host initialization

* Refactor pubsub logging and corrected gossipsub protocol id

* Started gossipsub service

* Add dynamic port assignment

* Refactor pubsub example for CI

* feat: monitor_peer_topics function added

* Noise protocol added

* refactor: default port set to none and some logging changes.

* refactor: Add graceful shutdown with termination events

- Replace infinite loops with termination events
- Add proper shutdown handling for all loops
- Implement clean resource cleanup on exit
- Add shutdown message for better user feedback
- Update signal handling for graceful termination

* Changed import path for factories file.
- to align import statement with changes from PR 543

* Added News Fragment

* Added pub-sub demo to the console_scripts section in setup.py

* Added pubsub example to Documentation

* Fix formatting and path in PubSub documentation example

* Added pubsub example in toctree

* Added tests for pubsub example

* updated the description of pubsub example

* corrected the name of pubsub docs file

* Remove unused imports and security options from pubsub example

* Update script usage instructions in pubsub example

* Enhanced compatibility for python 3.9

* Corrected console output
2025-04-06 14:38:14 -06:00
eca5e526f5 Fix flaky test_simple_last_seen_cache with retry loop and docstring 2025-04-06 14:17:15 -06:00
4514e86ee4 move pubsub testing tools into tests/utils 2025-03-27 14:21:45 -06:00
24b2704d8c move factories to tests/utils/factories 2025-03-27 14:21:45 -06:00
604a447287 feat: add identify protocol example 2025-03-24 17:55:16 -06:00
51c7d53453 test: add test_complete_remote_address_delegation_chain 2025-03-24 08:02:21 -06:00
9350caa65c feat: Add observed addresses of remote peer using get_remote_address 2025-03-24 08:02:21 -06:00
798229cd3a feat: add observed_addr to identify protocol 2025-03-24 08:02:21 -06:00
bd8bd953ec feat: add agent version to identify protocol and improved tests 2025-03-24 08:02:21 -06:00
dc903460dc fix some imports 2025-03-24 07:59:35 -06:00
df72979606 moved factories to tests 2025-03-24 07:59:35 -06:00
b2a6294cfa feat(host): add get_live_peers() to track connection state 2025-03-23 15:01:18 -06:00
f6279c23ac added : demos to test ci 2025-03-23 14:46:24 -06:00
c86f3d0467 added dedicated test file and moved timed_cache to tools 2025-03-17 09:27:13 -06:00
e5f3e88134 added : timed_cache sub-module 2025-03-17 09:27:13 -06:00
ea85067beb check other cases and add test_rsa.py 2025-03-16 07:02:53 -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
460db3dce8 merge template, fill vars, lint 2025-01-25 14:43:45 -07:00
f02d03844a refactored from unit_test to pytest 2024-11-24 14:39:29 -07:00
f957e310d6 refactored add_addrs in peerdata and added test_peerdata.py 2024-11-24 14:39:29 -07:00
b478e72fac removed print and commented statements 2024-11-21 11:51:19 -07:00
de2c06ec65 updated test name 2024-11-21 11:51:19 -07:00
17575f4a38 added test for connected peers 2024-11-21 11:51:19 -07:00
a10b8fdb91 added msg dropping test 2024-11-15 15:16:19 +07:00
1ab689a1e2 added ping_service tests 2024-10-29 14:05:01 -06:00
7495039a29 fixed failed tests due to RaisesGroup 2024-10-29 08:07:10 -06: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
d8d0f05a88 update default docs and release process, drop bumpversion for
bump-my-version
2024-05-21 14:01:08 -06:00
eea065fb57 reorg test structure to match tox and CI jobs, drop bumpversion for bump-my-version and move config to pyproject.toml, fix docs building 2024-04-20 09:18:26 -06:00
94483714a3 run lint and fix errors, except mypy 2024-02-19 16:05:58 -07:00
42605c0288 merge template updates and refill vars 2024-02-19 14:49:30 -07:00
608a0a954b Update test_import_and_version.py
clean up test_import_and_version
2024-01-09 14:36:12 -07:00
4ac9e87166 Update test_import_and_version.py
clean up test_import_and_version
2024-01-09 14:35:27 -07:00
e342fe7624 add version to import test 2024-01-09 12:07:08 -07:00
431db89753 template cleanup following initial merge with py-evm (#80)
* template cleanup following initial merge with py-evm

* add flake8 pin comment

* correct license years

* add pin note to mypy
2023-05-01 15:19:14 -06:00
d589daf00d Fill in template variables 2019-11-26 13:33:57 -08:00
d1b5a56ccf Match linting rules after merging in template 2019-11-26 13:33:08 -08:00
beb1b10ee8 silence flake8 error during module import test 2018-02-06 16:10:25 -08:00
6abf066779 add module import test 2018-02-06 15:56:11 -08:00
a7955a560e init 2018-01-24 16:00:28 -08:00