libp2p 0.2.9__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {libp2p-0.2.9/libp2p.egg-info → libp2p-0.4.0}/PKG-INFO +44 -36
- {libp2p-0.2.9 → libp2p-0.4.0}/README.md +27 -27
- {libp2p-0.2.9 → libp2p-0.4.0}/docs/conf.py +23 -2
- libp2p-0.4.0/examples/advanced/network_discover.py +90 -0
- libp2p-0.4.0/examples/bitswap/__init__.py +1 -0
- libp2p-0.4.0/examples/bitswap/bitswap.py +393 -0
- libp2p-0.4.0/examples/bootstrap/bootstrap.py +158 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/chat/chat.py +33 -6
- libp2p-0.4.0/examples/circuit_relay/__init__.py +5 -0
- libp2p-0.4.0/examples/circuit_relay/relay_example.py +611 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/doc-examples/example_encryption_insecure.py +9 -7
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/doc-examples/example_encryption_noise.py +9 -4
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/doc-examples/example_encryption_secio.py +9 -4
- libp2p-0.4.0/examples/doc-examples/example_mplex_timeouts.py +392 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/doc-examples/example_multiplexer.py +9 -4
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/doc-examples/example_peer_discovery.py +11 -5
- libp2p-0.4.0/examples/doc-examples/example_quic_transport.py +49 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/doc-examples/example_running.py +9 -4
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/doc-examples/example_transport.py +9 -4
- libp2p-0.4.0/examples/doc-examples/multiple_connections_example.py +210 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/echo/echo.py +49 -14
- libp2p-0.4.0/examples/echo/echo_quic.py +207 -0
- libp2p-0.4.0/examples/identify/identify.py +326 -0
- libp2p-0.4.0/examples/identify_push/identify_push_demo.py +312 -0
- libp2p-0.4.0/examples/identify_push/identify_push_listener_dialer.py +455 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/kademlia/kademlia.py +30 -9
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/mDNS/mDNS.py +29 -13
- libp2p-0.4.0/examples/monitoring-demo/configure.py +31 -0
- libp2p-0.4.0/examples/monitoring-demo/run_demo.py +300 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/ping/ping.py +34 -7
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/pubsub/pubsub.py +26 -21
- libp2p-0.4.0/examples/random_walk/random_walk.py +228 -0
- libp2p-0.4.0/examples/rendezvous/rendezvous.py +295 -0
- libp2p-0.4.0/examples/test_tcp_data_transfer.py +446 -0
- libp2p-0.4.0/examples/transport_integration_demo.py +210 -0
- libp2p-0.4.0/examples/upnp/upnp_demo.py +45 -0
- libp2p-0.4.0/examples/websocket/test_tcp_echo.py +220 -0
- libp2p-0.4.0/examples/websocket/test_websocket_transport.py +148 -0
- libp2p-0.4.0/examples/websocket/websocket_demo.py +448 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/__init__.py +152 -21
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/abc.py +430 -11
- libp2p-0.4.0/libp2p/bitswap/__init__.py +64 -0
- libp2p-0.4.0/libp2p/bitswap/block_store.py +109 -0
- libp2p-0.4.0/libp2p/bitswap/chunker.py +180 -0
- libp2p-0.4.0/libp2p/bitswap/cid.py +236 -0
- libp2p-0.4.0/libp2p/bitswap/client.py +860 -0
- libp2p-0.4.0/libp2p/bitswap/config.py +39 -0
- libp2p-0.4.0/libp2p/bitswap/dag.py +589 -0
- libp2p-0.4.0/libp2p/bitswap/dag_pb.py +268 -0
- libp2p-0.4.0/libp2p/bitswap/errors.py +51 -0
- libp2p-0.4.0/libp2p/bitswap/messages.py +166 -0
- libp2p-0.4.0/libp2p/bitswap/pb/__init__.py +1 -0
- libp2p-0.4.0/libp2p/bitswap/pb/bitswap_pb2.py +38 -0
- libp2p-0.4.0/libp2p/bitswap/pb/bitswap_pb2.pyi +185 -0
- libp2p-0.4.0/libp2p/bitswap/pb/dag_pb_pb2.py +28 -0
- libp2p-0.4.0/libp2p/bitswap/pb/dag_pb_pb2.pyi +65 -0
- libp2p-0.4.0/libp2p/bitswap/pb/unixfs_pb2.py +32 -0
- libp2p-0.4.0/libp2p/bitswap/pb/unixfs_pb2.pyi +126 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/pb/crypto_pb2.py +2 -2
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/pb/crypto_pb2.pyi +2 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/custom_types.py +9 -6
- libp2p-0.4.0/libp2p/discovery/bootstrap/__init__.py +5 -0
- libp2p-0.4.0/libp2p/discovery/bootstrap/bootstrap.py +312 -0
- libp2p-0.4.0/libp2p/discovery/bootstrap/utils.py +51 -0
- libp2p-0.4.0/libp2p/discovery/random_walk/__init__.py +17 -0
- libp2p-0.4.0/libp2p/discovery/random_walk/config.py +16 -0
- libp2p-0.4.0/libp2p/discovery/random_walk/exceptions.py +19 -0
- libp2p-0.4.0/libp2p/discovery/random_walk/random_walk.py +218 -0
- libp2p-0.4.0/libp2p/discovery/random_walk/rt_refresh_manager.py +208 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/__init__.py +37 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/client.py +362 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/config.py +34 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/discovery.py +259 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/errors.py +87 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/messages.py +84 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/pb/__init__.py +7 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/pb/rendezvous_pb2.py +48 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/pb/rendezvous_pb2.pyi +292 -0
- libp2p-0.4.0/libp2p/discovery/rendezvous/service.py +332 -0
- libp2p-0.4.0/libp2p/discovery/upnp/upnp.py +196 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/basic_host.py +125 -10
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/defaults.py +4 -1
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/routed_host.py +34 -2
- libp2p-0.4.0/libp2p/identity/identify/identify.py +164 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/identity/identify/pb/identify_pb2.py +2 -2
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/identity/identify/pb/identify_pb2.pyi +5 -2
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/identity/identify_push/identify_push.py +90 -14
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/io/trio.py +11 -6
- libp2p-0.4.0/libp2p/kad_dht/common.py +21 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/kad_dht/kad_dht.py +341 -9
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/kad_dht/pb/kademlia_pb2.py +9 -8
- libp2p-0.4.0/libp2p/kad_dht/pb/kademlia_pb2.pyi +70 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/kad_dht/peer_routing.py +46 -1
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/kad_dht/provider_store.py +43 -4
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/kad_dht/routing_table.py +156 -13
- libp2p-0.4.0/libp2p/kad_dht/utils.py +197 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/kad_dht/value_store.py +34 -9
- libp2p-0.4.0/libp2p/network/config.py +70 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/network/connection/swarm_connection.py +108 -3
- libp2p-0.4.0/libp2p/network/stream/net_stream.py +367 -0
- libp2p-0.4.0/libp2p/network/swarm.py +1007 -0
- libp2p-0.4.0/libp2p/peer/envelope.py +276 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/peer/id.py +13 -12
- libp2p-0.4.0/libp2p/peer/pb/crypto_pb2.py +31 -0
- libp2p-0.4.0/libp2p/peer/pb/crypto_pb2.pyi +33 -0
- libp2p-0.4.0/libp2p/peer/pb/envelope_pb2.py +28 -0
- libp2p-0.4.0/libp2p/peer/pb/envelope_pb2.pyi +18 -0
- libp2p-0.4.0/libp2p/peer/pb/peer_record_pb2.py +29 -0
- libp2p-0.4.0/libp2p/peer/pb/peer_record_pb2.pyi +21 -0
- libp2p-0.4.0/libp2p/peer/peer_record.py +251 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/peer/peerinfo.py +4 -1
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/peer/peerstore.py +227 -2
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/protocol_muxer/multiselect.py +17 -6
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/protocol_muxer/multiselect_client.py +7 -5
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/protocol_muxer/multiselect_communicator.py +8 -2
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/floodsub.py +6 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/gossipsub.py +370 -38
- libp2p-0.4.0/libp2p/pubsub/pb/rpc_pb2.py +52 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/pb/rpc_pb2.pyi +26 -3
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/pubsub.py +97 -12
- libp2p-0.4.0/libp2p/pubsub/score.py +299 -0
- libp2p-0.4.0/libp2p/pubsub/utils.py +80 -0
- libp2p-0.4.0/libp2p/rcmgr/__init__.py +21 -0
- libp2p-0.4.0/libp2p/rcmgr/allowlist.py +162 -0
- libp2p-0.4.0/libp2p/rcmgr/cidr_limits.py +90 -0
- libp2p-0.4.0/libp2p/rcmgr/circuit_breaker.py +147 -0
- libp2p-0.4.0/libp2p/rcmgr/config.py +598 -0
- libp2p-0.4.0/libp2p/rcmgr/connection_lifecycle.py +334 -0
- libp2p-0.4.0/libp2p/rcmgr/connection_limits.py +248 -0
- libp2p-0.4.0/libp2p/rcmgr/connection_pool.py +147 -0
- libp2p-0.4.0/libp2p/rcmgr/connection_tracker.py +470 -0
- libp2p-0.4.0/libp2p/rcmgr/enhanced_errors.py +579 -0
- libp2p-0.4.0/libp2p/rcmgr/exceptions.py +111 -0
- libp2p-0.4.0/libp2p/rcmgr/graceful_degradation.py +258 -0
- libp2p-0.4.0/libp2p/rcmgr/health_checks.py +652 -0
- libp2p-0.4.0/libp2p/rcmgr/limits.py +8 -0
- libp2p-0.4.0/libp2p/rcmgr/manager.py +798 -0
- libp2p-0.4.0/libp2p/rcmgr/memory_limits.py +356 -0
- libp2p-0.4.0/libp2p/rcmgr/memory_pool.py +128 -0
- libp2p-0.4.0/libp2p/rcmgr/memory_stats.py +340 -0
- libp2p-0.4.0/libp2p/rcmgr/metrics.py +287 -0
- libp2p-0.4.0/libp2p/rcmgr/monitoring.py +723 -0
- libp2p-0.4.0/libp2p/rcmgr/prometheus_exporter.py +463 -0
- libp2p-0.4.0/libp2p/rcmgr/protocol_rate_limiter.py +649 -0
- libp2p-0.4.0/libp2p/rcmgr/rate_limiter.py +714 -0
- libp2p-0.4.0/libp2p/rcmgr/token_bucket.py +469 -0
- libp2p-0.4.0/libp2p/records/pubkey.py +102 -0
- libp2p-0.4.0/libp2p/records/record.py +19 -0
- libp2p-0.4.0/libp2p/records/utils.py +27 -0
- libp2p-0.4.0/libp2p/records/validator.py +89 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/__init__.py +9 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/circuit_v2/__init__.py +14 -0
- libp2p-0.4.0/libp2p/relay/circuit_v2/config.py +182 -0
- libp2p-0.4.0/libp2p/relay/circuit_v2/dcutr.py +597 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/circuit_v2/discovery.py +45 -15
- libp2p-0.4.0/libp2p/relay/circuit_v2/nat.py +300 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/circuit_v2/pb/__init__.py +6 -1
- libp2p-0.4.0/libp2p/relay/circuit_v2/pb/circuit_pb2.py +40 -0
- libp2p-0.4.0/libp2p/relay/circuit_v2/pb/circuit_pb2.pyi +92 -0
- libp2p-0.4.0/libp2p/relay/circuit_v2/pb/dcutr_pb2.py +27 -0
- libp2p-0.4.0/libp2p/relay/circuit_v2/pb/dcutr_pb2.pyi +53 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/circuit_v2/protocol.py +322 -208
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/circuit_v2/protocol_buffer.py +4 -7
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/circuit_v2/resources.py +24 -2
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/relay/circuit_v2/transport.py +151 -93
- libp2p-0.4.0/libp2p/relay/circuit_v2/utils.py +86 -0
- libp2p-0.4.0/libp2p/security/__init__.py +24 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/exceptions.py +4 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/noise/io.py +14 -3
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/noise/messages.py +29 -1
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/noise/patterns.py +35 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/noise/transport.py +0 -5
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/secure_session.py +5 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/security_multistream.py +8 -1
- libp2p-0.4.0/libp2p/security/tls/__init__.py +36 -0
- libp2p-0.4.0/libp2p/security/tls/certificate.py +392 -0
- libp2p-0.4.0/libp2p/security/tls/io.py +299 -0
- libp2p-0.4.0/libp2p/security/tls/transport.py +372 -0
- libp2p-0.4.0/libp2p/stream_muxer/mplex/mplex_stream.py +395 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/muxer_multistream.py +21 -5
- libp2p-0.4.0/libp2p/stream_muxer/rw_lock.py +70 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/yamux/yamux.py +145 -118
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/constants.py +29 -1
- libp2p-0.4.0/libp2p/transport/__init__.py +57 -0
- libp2p-0.4.0/libp2p/transport/quic/config.py +345 -0
- libp2p-0.4.0/libp2p/transport/quic/connection.py +1535 -0
- libp2p-0.4.0/libp2p/transport/quic/exceptions.py +391 -0
- libp2p-0.4.0/libp2p/transport/quic/listener.py +1041 -0
- libp2p-0.4.0/libp2p/transport/quic/security.py +1165 -0
- libp2p-0.4.0/libp2p/transport/quic/stream.py +664 -0
- libp2p-0.4.0/libp2p/transport/quic/transport.py +493 -0
- libp2p-0.4.0/libp2p/transport/quic/utils.py +462 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/transport/tcp/tcp.py +6 -0
- libp2p-0.4.0/libp2p/transport/transport_registry.py +267 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/transport/upgrader.py +7 -7
- libp2p-0.4.0/libp2p/transport/websocket/connection.py +198 -0
- libp2p-0.4.0/libp2p/transport/websocket/listener.py +225 -0
- libp2p-0.4.0/libp2p/transport/websocket/multiaddr_utils.py +202 -0
- libp2p-0.4.0/libp2p/transport/websocket/transport.py +229 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/utils/__init__.py +17 -0
- libp2p-0.4.0/libp2p/utils/address_validation.py +160 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/utils/logging.py +24 -12
- libp2p-0.4.0/libp2p/utils/paths.py +267 -0
- libp2p-0.4.0/libp2p/utils/varint.py +232 -0
- {libp2p-0.2.9 → libp2p-0.4.0/libp2p.egg-info}/PKG-INFO +44 -36
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p.egg-info/SOURCES.txt +242 -10
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p.egg-info/entry_points.txt +2 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p.egg-info/requires.txt +12 -5
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p.egg-info/top_level.txt +1 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/pyproject.toml +25 -12
- libp2p-0.4.0/scripts/audit_paths.py +255 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/scripts/release/test_package.py +10 -2
- libp2p-0.4.0/tests/core/bitswap/__init__.py +1 -0
- libp2p-0.4.0/tests/core/bitswap/conftest.py +40 -0
- libp2p-0.4.0/tests/core/bitswap/test_block_store.py +146 -0
- libp2p-0.4.0/tests/core/bitswap/test_chunker.py +378 -0
- libp2p-0.4.0/tests/core/bitswap/test_cid.py +122 -0
- libp2p-0.4.0/tests/core/bitswap/test_client.py +303 -0
- libp2p-0.4.0/tests/core/bitswap/test_dag.py +567 -0
- libp2p-0.4.0/tests/core/bitswap/test_dag_pb.py +319 -0
- libp2p-0.4.0/tests/core/bitswap/test_integration.py +438 -0
- libp2p-0.4.0/tests/core/bitswap/test_messages.py +175 -0
- libp2p-0.4.0/tests/core/bitswap/test_protocol_versions.py +534 -0
- libp2p-0.4.0/tests/core/discovery/__init__.py +1 -0
- libp2p-0.4.0/tests/core/discovery/bootstrap/__init__.py +1 -0
- libp2p-0.4.0/tests/core/discovery/bootstrap/test_integration.py +52 -0
- libp2p-0.4.0/tests/core/discovery/bootstrap/test_utils.py +39 -0
- libp2p-0.4.0/tests/core/discovery/random_walk/test_random_walk.py +99 -0
- libp2p-0.4.0/tests/core/discovery/random_walk/test_rt_refresh_manager.py +451 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/__init__.py +1 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/test_client.py +260 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/test_config.py +123 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/test_discovery.py +290 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/test_errors.py +250 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/test_integration.py +394 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/test_messages.py +359 -0
- libp2p-0.4.0/tests/core/discovery/rendezvous/test_service.py +390 -0
- libp2p-0.4.0/tests/core/discovery/upnp/test_upnp.py +209 -0
- libp2p-0.4.0/tests/core/host/test_basic_host.py +61 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/host/test_live_peers.py +2 -2
- libp2p-0.4.0/tests/core/identity/identify/test_identify.py +99 -0
- libp2p-0.4.0/tests/core/identity/identify/test_identify_integration.py +241 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/identity/identify_push/test_identify_push.py +106 -1
- libp2p-0.4.0/tests/core/identity/identify_push/test_identify_push_integration.py +552 -0
- libp2p-0.4.0/tests/core/io/test_trio_error_handling.py +136 -0
- libp2p-0.4.0/tests/core/kad_dht/test_kad_dht.py +603 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/kad_dht/test_unit_peer_routing.py +4 -1
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/kad_dht/test_unit_routing_table.py +26 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/kad_dht/test_unit_value_store.py +47 -21
- libp2p-0.4.0/tests/core/network/test_enhanced_swarm.py +325 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/network/test_net_stream.py +4 -4
- libp2p-0.4.0/tests/core/network/test_net_stream_concurrency.py +423 -0
- libp2p-0.4.0/tests/core/network/test_net_stream_error_state.py +223 -0
- libp2p-0.4.0/tests/core/network/test_net_stream_state_transitions.py +113 -0
- libp2p-0.4.0/tests/core/network/test_notifee_performance.py +82 -0
- libp2p-0.4.0/tests/core/network/test_notify.py +297 -0
- libp2p-0.4.0/tests/core/network/test_notify_listen_lifecycle.py +76 -0
- libp2p-0.4.0/tests/core/network/test_swarm.py +372 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/peer/test_addrbook.py +53 -0
- libp2p-0.4.0/tests/core/peer/test_envelope.py +129 -0
- libp2p-0.4.0/tests/core/peer/test_peer_record.py +112 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/peer/test_peerinfo.py +4 -5
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/peer/test_peerstore.py +27 -0
- libp2p-0.4.0/tests/core/protocol_muxer/test_negotiate_timeout.py +149 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/protocol_muxer/test_protocol_muxer.py +59 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_dummyaccount_demo.py +3 -3
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_gossipsub.py +177 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_get_message_id.py +119 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_gossipsub_px_and_backoff.py +15 -2
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v12.py +281 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v12_integration.py +185 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_core_functionality.py +173 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_flood_publishing.py +333 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_ihave_iwant.py +270 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_invalid_behavior.py +301 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_network_scenarios.py +301 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_opportunistic_grafting.py +371 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_peer_scoring.py +867 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_peer_scoring_behavior.py +231 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_score_gates.py +661 -0
- libp2p-0.4.0/tests/core/pubsub/test_gossipsub_v1_1_signed_peer_records.py +509 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_pubsub.py +184 -5
- libp2p-0.4.0/tests/core/pubsub/test_pubsub_notifee_integration.py +90 -0
- libp2p-0.4.0/tests/core/rcmgr/__init__.py +6 -0
- libp2p-0.4.0/tests/core/rcmgr/test_cidr_limits.py +24 -0
- libp2p-0.4.0/tests/core/rcmgr/test_connection_protection.py +144 -0
- libp2p-0.4.0/tests/core/rcmgr/test_enum_string_conversion.py +57 -0
- libp2p-0.4.0/tests/core/rcmgr/test_hierarchical_scopes.py +48 -0
- libp2p-0.4.0/tests/core/rcmgr/test_preupgrade_admission.py +20 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rate_limiting.py +46 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rcmgr_config.py +447 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rcmgr_core.py +326 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rcmgr_health_checks.py +350 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rcmgr_integration.py +61 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rcmgr_metrics.py +317 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rcmgr_monitoring.py +414 -0
- libp2p-0.4.0/tests/core/rcmgr/test_rcmgr_simple.py +143 -0
- libp2p-0.4.0/tests/core/rcmgr/test_resource_manager_integration.py +74 -0
- libp2p-0.4.0/tests/core/records/test_validator.py +145 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/relay/test_circuit_v2_discovery.py +192 -12
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/relay/test_circuit_v2_protocol.py +302 -4
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/relay/test_circuit_v2_transport.py +133 -3
- libp2p-0.4.0/tests/core/relay/test_dcutr_integration.py +563 -0
- libp2p-0.4.0/tests/core/relay/test_dcutr_protocol.py +208 -0
- libp2p-0.4.0/tests/core/relay/test_nat.py +297 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/security/test_security_multistream.py +3 -0
- libp2p-0.4.0/tests/core/security/tls/test_certificate.py +44 -0
- libp2p-0.4.0/tests/core/security/tls/test_tls.py +62 -0
- libp2p-0.4.0/tests/core/security/tls/test_transport_security.py +179 -0
- libp2p-0.4.0/tests/core/stream_muxer/test_mplex_stream.py +559 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/stream_muxer/test_multiplexer_selection.py +6 -3
- libp2p-0.4.0/tests/core/stream_muxer/test_muxer_multistream.py +108 -0
- libp2p-0.4.0/tests/core/stream_muxer/test_read_write_lock.py +590 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/tools/async_service/test_trio_based_service.py +2 -0
- libp2p-0.4.0/tests/core/tools/test_bind_address_config.py +162 -0
- libp2p-0.4.0/tests/core/transport/quic/test_connection.py +553 -0
- libp2p-0.4.0/tests/core/transport/quic/test_connection_id.py +624 -0
- libp2p-0.4.0/tests/core/transport/quic/test_integration.py +418 -0
- libp2p-0.4.0/tests/core/transport/quic/test_listener.py +150 -0
- libp2p-0.4.0/tests/core/transport/quic/test_transport.py +123 -0
- libp2p-0.4.0/tests/core/transport/quic/test_utils.py +321 -0
- libp2p-0.4.0/tests/core/transport/test_transport_registry.py +324 -0
- libp2p-0.4.0/tests/core/transport/test_upgrader.py +27 -0
- libp2p-0.4.0/tests/core/transport/test_websocket.py +1632 -0
- libp2p-0.4.0/tests/core/transport/test_websocket_p2p.py +532 -0
- libp2p-0.4.0/tests/core/utils/test_varint.py +215 -0
- libp2p-0.4.0/tests/examples/test_echo_thin_waist.py +109 -0
- libp2p-0.4.0/tests/examples/test_examples_bind_address.py +117 -0
- libp2p-0.4.0/tests/examples/test_quic_echo_example.py +6 -0
- libp2p-0.4.0/tests/interop/js_libp2p/README.md +81 -0
- libp2p-0.4.0/tests/interop/js_libp2p/js_node/README.md +53 -0
- libp2p-0.4.0/tests/interop/js_libp2p/js_node/package.json +39 -0
- libp2p-0.4.0/tests/interop/js_libp2p/js_node/src/package.json +21 -0
- libp2p-0.4.0/tests/interop/js_libp2p/js_node/src/ping.js +204 -0
- libp2p-0.4.0/tests/interop/js_libp2p/js_node/src/ping_client.js +241 -0
- libp2p-0.4.0/tests/interop/js_libp2p/js_node/src/ping_server.js +167 -0
- libp2p-0.4.0/tests/interop/js_libp2p/js_node/src/ws_ping_node.mjs +122 -0
- libp2p-0.4.0/tests/interop/js_libp2p/scripts/run_test.ps1 +194 -0
- libp2p-0.4.0/tests/interop/js_libp2p/scripts/run_test.sh +215 -0
- libp2p-0.4.0/tests/interop/nim_libp2p/.gitignore +8 -0
- libp2p-0.4.0/tests/interop/nim_libp2p/conftest.py +119 -0
- libp2p-0.4.0/tests/interop/nim_libp2p/nim_echo_server.nim +108 -0
- libp2p-0.4.0/tests/interop/nim_libp2p/scripts/setup_nim_echo.sh +74 -0
- libp2p-0.4.0/tests/interop/nim_libp2p/test_echo_interop.py +195 -0
- libp2p-0.4.0/tests/interop/test_js_ws_ping.py +127 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/factories.py +59 -2
- libp2p-0.4.0/tests/utils/interop/__init__.py +0 -0
- libp2p-0.4.0/tests/utils/pubsub/__init__.py +0 -0
- libp2p-0.4.0/tests/utils/test_address_validation.py +56 -0
- libp2p-0.4.0/tests/utils/test_default_bind_address.py +206 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/test_logging.py +36 -12
- libp2p-0.4.0/tests/utils/test_paths.py +290 -0
- libp2p-0.2.9/examples/doc-examples/example_net_stream.py +0 -263
- libp2p-0.2.9/examples/identify/identify.py +0 -127
- libp2p-0.2.9/examples/identify_push/identify_push_demo.py +0 -163
- libp2p-0.2.9/examples/identify_push/identify_push_listener_dialer.py +0 -276
- libp2p-0.2.9/libp2p/identity/identify/identify.py +0 -110
- libp2p-0.2.9/libp2p/kad_dht/common.py +0 -14
- libp2p-0.2.9/libp2p/kad_dht/pb/kademlia_pb2.pyi +0 -133
- libp2p-0.2.9/libp2p/kad_dht/utils.py +0 -117
- libp2p-0.2.9/libp2p/network/stream/net_stream.py +0 -308
- libp2p-0.2.9/libp2p/network/swarm.py +0 -417
- libp2p-0.2.9/libp2p/pubsub/pb/rpc_pb2.py +0 -51
- libp2p-0.2.9/libp2p/relay/circuit_v2/config.py +0 -92
- libp2p-0.2.9/libp2p/relay/circuit_v2/pb/circuit_pb2.py +0 -37
- libp2p-0.2.9/libp2p/relay/circuit_v2/pb/circuit_pb2.pyi +0 -184
- libp2p-0.2.9/libp2p/stream_muxer/mplex/mplex_stream.py +0 -277
- libp2p-0.2.9/libp2p/utils/varint.py +0 -87
- libp2p-0.2.9/tests/core/host/test_basic_host.py +0 -24
- libp2p-0.2.9/tests/core/identity/identify/test_identify.py +0 -72
- libp2p-0.2.9/tests/core/kad_dht/test_kad_dht.py +0 -168
- libp2p-0.2.9/tests/core/network/test_notify.py +0 -130
- libp2p-0.2.9/tests/core/network/test_swarm.py +0 -186
- libp2p-0.2.9/tests/core/protocol_muxer/test_negotiate_timeout.py +0 -59
- libp2p-0.2.9/tests/core/stream_muxer/test_mplex_stream.py +0 -215
- libp2p-0.2.9/tests/interop/js_libp2p/test_js_basic.py +0 -5
- {libp2p-0.2.9 → libp2p-0.4.0}/LICENSE-APACHE +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/LICENSE-MIT +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/MANIFEST.in +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/chat/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/echo/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/identify/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/identify_push/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/examples/ping/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/authenticated_encryption.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/ecc.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/ed25519.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/key_exchange.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/keys.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/pb/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/rsa.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/secp256k1.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/serialization.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/crypto/x25519.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/events/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/events/peerDiscovery.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/mdns/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/mdns/broadcaster.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/mdns/listener.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/mdns/mdns.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/discovery/mdns/utils.py +0 -0
- {libp2p-0.2.9/libp2p/host → libp2p-0.4.0/libp2p/discovery/upnp}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/host/autonat/pb → libp2p-0.4.0/libp2p/host}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/autonat/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/autonat/autonat.py +0 -0
- {libp2p-0.2.9/libp2p/identity/identify → libp2p-0.4.0/libp2p/host/autonat}/pb/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/autonat/pb/autonat_pb2.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/autonat/pb/autonat_pb2.pyi +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/autonat/pb/autonat_pb2_grpc.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/autonat/pb/autonat_pb2_grpc.pyi +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/autonat/pb/generate_proto.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/host/ping.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/identity/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/identity/identify/__init__.py +0 -0
- {libp2p-0.2.9/libp2p/io → libp2p-0.4.0/libp2p/identity/identify/pb}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/identity/identify_push/__init__.py +0 -0
- {libp2p-0.2.9/libp2p/kad_dht/pb → libp2p-0.4.0/libp2p/io}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/io/abc.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/io/exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/io/msgio.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/io/utils.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/kad_dht/__init__.py +0 -0
- {libp2p-0.2.9/libp2p/network → libp2p-0.4.0/libp2p/kad_dht/pb}/__init__.py +0 -0
- {libp2p-0.2.9/libp2p/network/connection → libp2p-0.4.0/libp2p/network}/__init__.py +0 -0
- {libp2p-0.2.9/libp2p/network/stream → libp2p-0.4.0/libp2p/network/connection}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/network/connection/exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/network/connection/raw_connection.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/network/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/peer → libp2p-0.4.0/libp2p/network/stream}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/network/stream/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/protocol_muxer → libp2p-0.4.0/libp2p/peer}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/peer/peerdata.py +0 -0
- {libp2p-0.2.9/libp2p/pubsub → libp2p-0.4.0/libp2p/protocol_muxer}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/protocol_muxer/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/pubsub/pb → libp2p-0.4.0/libp2p/pubsub}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/mcache.py +0 -0
- {libp2p-0.2.9/libp2p/security → libp2p-0.4.0/libp2p/pubsub/pb}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/pubsub_notifee.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/subscription.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/pubsub/validators.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/py.typed +0 -0
- {libp2p-0.2.9/libp2p/security/insecure → libp2p-0.4.0/libp2p/records}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/base_session.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/base_transport.py +0 -0
- {libp2p-0.2.9/libp2p/security/insecure/pb → libp2p-0.4.0/libp2p/security/insecure}/__init__.py +0 -0
- {libp2p-0.2.9/libp2p/security/noise → libp2p-0.4.0/libp2p/security/insecure/pb}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/insecure/pb/plaintext_pb2.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/insecure/pb/plaintext_pb2.pyi +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/insecure/transport.py +0 -0
- {libp2p-0.2.9/libp2p/security/noise/pb → libp2p-0.4.0/libp2p/security/noise}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/noise/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/security/secio → libp2p-0.4.0/libp2p/security/noise/pb}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/noise/pb/noise_pb2.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/noise/pb/noise_pb2.pyi +0 -0
- {libp2p-0.2.9/libp2p/security/secio/pb → libp2p-0.4.0/libp2p/security/secio}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/secio/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/stream_muxer → libp2p-0.4.0/libp2p/security/secio/pb}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/secio/pb/spipe_pb2.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/secio/pb/spipe_pb2.pyi +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/security/secio/transport.py +0 -0
- {libp2p-0.2.9/libp2p/stream_muxer/mplex → libp2p-0.4.0/libp2p/stream_muxer}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/tools → libp2p-0.4.0/libp2p/stream_muxer/mplex}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/mplex/constants.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/mplex/datastructures.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/mplex/exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/mplex/mplex.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/stream_muxer/yamux/__init__.py +0 -0
- {libp2p-0.2.9/libp2p/tools/timed_cache → libp2p-0.4.0/libp2p/tools}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/_utils.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/abc.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/base.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/stats.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/trio_service.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/async_service/typing.py +0 -0
- {libp2p-0.2.9/libp2p/transport → libp2p-0.4.0/libp2p/tools/timed_cache}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/timed_cache/base_timed_cache.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/timed_cache/first_seen_cache.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/timed_cache/last_seen_cache.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/tools/utils.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/transport/exceptions.py +0 -0
- {libp2p-0.2.9/libp2p/transport/tcp → libp2p-0.4.0/libp2p/transport/quic}/__init__.py +0 -0
- {libp2p-0.2.9/tests → libp2p-0.4.0/libp2p/transport/tcp}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p/utils/version.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/libp2p.egg-info/dependency_links.txt +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/newsfragments/validate_files.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/setup.cfg +0 -0
- {libp2p-0.2.9/tests/discovery → libp2p-0.4.0/tests}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/conftest.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/crypto/test_ed25519.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/crypto/test_rsa.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/crypto/test_secp256k1.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/crypto/test_x25519.py +0 -0
- {libp2p-0.2.9/tests → libp2p-0.4.0/tests/core}/discovery/mdns/__init__.py +0 -0
- {libp2p-0.2.9/tests → libp2p-0.4.0/tests/core}/discovery/mdns/test_broadcaster.py +0 -0
- {libp2p-0.2.9/tests → libp2p-0.4.0/tests/core}/discovery/mdns/test_listener.py +0 -0
- {libp2p-0.2.9/tests → libp2p-0.4.0/tests/core}/discovery/mdns/test_mdns.py +0 -0
- {libp2p-0.2.9/tests → libp2p-0.4.0/tests/core}/discovery/mdns/test_utils.py +0 -0
- {libp2p-0.2.9/tests → libp2p-0.4.0/tests/core}/exceptions/test_exceptions.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/host/test_autonat.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/host/test_connected_peers.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/host/test_ping.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/host/test_routed_host.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/kad_dht/test_unit_provider_store.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/network/conftest.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/network/test_swarm_conn.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/peer/test_interop.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/peer/test_peerdata.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/peer/test_peerid.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/peer/test_peermetadata.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_floodsub.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_gossipsub_backward_compatibility.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_gossipsub_direct_peers.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_mcache.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/pubsub/test_subscription.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/security/noise/test_msg_read_writer.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/security/noise/test_noise.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/security/test_insecure_peerstore_integration.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/security/test_secio.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/stream_muxer/conftest.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/stream_muxer/test_async_context_manager.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/stream_muxer/test_mplex_conn.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/stream_muxer/test_yamux.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/stream_muxer/test_yamux_interleaving.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/stream_muxer/test_yamux_interleaving_EOF.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/test_import_and_version.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/test_libp2p/test_libp2p.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/tools/async_service/test_trio_external_api.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/tools/async_service/test_trio_manager_stats.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/tools/timed_cache/test_timed_cache.py +0 -0
- /libp2p-0.2.9/tests/utils/__init__.py → /libp2p-0.4.0/tests/core/transport/quic/test_concurrency.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/core/transport/test_tcp.py +0 -0
- {libp2p-0.2.9/tests/core → libp2p-0.4.0/tests}/examples/test_examples.py +0 -0
- {libp2p-0.2.9/tests/utils → libp2p-0.4.0/tests}/interop/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/interop/go_libp2p/test_go_basic.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/interop/rust_libp2p/test_rust_basic.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/interop/zig_libp2p/test_zig_basic.py +0 -0
- {libp2p-0.2.9/tests/utils/pubsub → libp2p-0.4.0/tests/utils}/__init__.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/interop/constants.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/interop/daemon.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/interop/envs.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/interop/process.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/interop/utils.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/pubsub/dummy_account_node.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/pubsub/floodsub_integration_test_settings.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/pubsub/utils.py +0 -0
- {libp2p-0.2.9 → libp2p-0.4.0}/tests/utils/utils.py +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libp2p
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: libp2p: The Python implementation of the libp2p networking stack
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Maintainer: Luca (acul71)
|
|
6
|
+
Maintainer-email: pacrob <pacrob-py-libp2p@proton.me>, Manu Sheel Gupta <manu@seeta.in>, Dave Grantham <dwg@linuxprogrammer.org>
|
|
7
|
+
License-Expression: MIT AND Apache-2.0
|
|
7
8
|
Project-URL: Homepage, https://github.com/libp2p/py-libp2p
|
|
8
9
|
Keywords: libp2p,p2p
|
|
9
10
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -18,22 +19,25 @@ Requires-Python: <4.0,>=3.10
|
|
|
18
19
|
Description-Content-Type: text/markdown
|
|
19
20
|
License-File: LICENSE-APACHE
|
|
20
21
|
License-File: LICENSE-MIT
|
|
22
|
+
Requires-Dist: aioquic>=1.2.0
|
|
21
23
|
Requires-Dist: base58>=1.0.3
|
|
22
|
-
Requires-Dist: coincurve
|
|
24
|
+
Requires-Dist: coincurve==21.0.0
|
|
23
25
|
Requires-Dist: exceptiongroup>=1.2.0; python_version < "3.11"
|
|
26
|
+
Requires-Dist: fastecdsa==2.3.2; sys_platform != "win32"
|
|
24
27
|
Requires-Dist: grpcio>=1.41.0
|
|
25
28
|
Requires-Dist: lru-dict>=1.1.6
|
|
26
|
-
Requires-Dist:
|
|
29
|
+
Requires-Dist: miniupnpc>=2.3
|
|
30
|
+
Requires-Dist: multiaddr>=0.0.11
|
|
27
31
|
Requires-Dist: mypy-protobuf>=3.0.0
|
|
28
32
|
Requires-Dist: noiseprotocol>=0.3.0
|
|
29
|
-
Requires-Dist: protobuf<5.0.0,>=4.
|
|
33
|
+
Requires-Dist: protobuf<5.0.0,>=4.25.0
|
|
30
34
|
Requires-Dist: pycryptodome>=3.9.2
|
|
31
35
|
Requires-Dist: pymultihash>=0.8.2
|
|
32
36
|
Requires-Dist: pynacl>=1.3.0
|
|
33
37
|
Requires-Dist: rpcudp>=3.0.0
|
|
34
38
|
Requires-Dist: trio-typing>=0.0.4
|
|
35
39
|
Requires-Dist: trio>=0.26.0
|
|
36
|
-
Requires-Dist:
|
|
40
|
+
Requires-Dist: trio-websocket>=0.11.0
|
|
37
41
|
Requires-Dist: zeroconf<0.148.0,>=0.147.0
|
|
38
42
|
Provides-Extra: dev
|
|
39
43
|
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
@@ -52,6 +56,8 @@ Requires-Dist: p2pclient==0.2.0; extra == "dev"
|
|
|
52
56
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
53
57
|
Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
|
|
54
58
|
Requires-Dist: pytest-trio>=0.5.2; extra == "dev"
|
|
59
|
+
Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
|
|
60
|
+
Requires-Dist: pytest-rerunfailures>=12.0; extra == "dev"
|
|
55
61
|
Requires-Dist: factory-boy<3.0.0,>=2.12.0; extra == "dev"
|
|
56
62
|
Requires-Dist: ruff>=0.11.10; extra == "dev"
|
|
57
63
|
Requires-Dist: pyrefly<0.18.0,>=0.17.1; extra == "dev"
|
|
@@ -61,11 +67,13 @@ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
|
|
|
61
67
|
Requires-Dist: towncrier<25,>=24; extra == "docs"
|
|
62
68
|
Requires-Dist: tomli; python_version < "3.11" and extra == "docs"
|
|
63
69
|
Provides-Extra: test
|
|
70
|
+
Requires-Dist: factory-boy<3.0.0,>=2.12.0; extra == "test"
|
|
64
71
|
Requires-Dist: p2pclient==0.2.0; extra == "test"
|
|
65
72
|
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
66
|
-
Requires-Dist: pytest-
|
|
73
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
|
|
74
|
+
Requires-Dist: pytest-timeout>=2.4.0; extra == "test"
|
|
67
75
|
Requires-Dist: pytest-trio>=0.5.2; extra == "test"
|
|
68
|
-
Requires-Dist:
|
|
76
|
+
Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
|
|
69
77
|
Dynamic: license-file
|
|
70
78
|
|
|
71
79
|
# py-libp2p
|
|
@@ -82,13 +90,13 @@ Dynamic: license-file
|
|
|
82
90
|
[](https://github.com/libp2p/py-libp2p/actions/workflows/tox.yml)
|
|
83
91
|
[](http://py-libp2p.readthedocs.io/en/latest/?badge=latest)
|
|
84
92
|
|
|
85
|
-
>
|
|
93
|
+
> py-libp2p has moved beyond its experimental roots and is steadily progressing toward production readiness. The core features are stable, and we’re focused on refining performance, expanding protocol support, and ensuring smooth interop with other libp2p implementations. We welcome contributions and real-world usage feedback to help us reach full production maturity.
|
|
86
94
|
|
|
87
95
|
Read more in the [documentation on ReadTheDocs](https://py-libp2p.readthedocs.io/). [View the release notes](https://py-libp2p.readthedocs.io/en/latest/release_notes.html).
|
|
88
96
|
|
|
89
97
|
## Maintainers
|
|
90
98
|
|
|
91
|
-
Currently maintained by [@pacrob](https://github.com/pacrob), [@seetadev](https://github.com/seetadev) and [@dhuseby](https://github.com/dhuseby)
|
|
99
|
+
Currently maintained by [@pacrob](https://github.com/pacrob), [@seetadev](https://github.com/seetadev) and [@dhuseby](https://github.com/dhuseby). Please reach out to us for collaboration or active feedback. If you have questions, feel free to open a new [discussion](https://github.com/libp2p/py-libp2p/discussions). We are also available on the libp2p Discord — join us at #py-libp2p [sub-channel](https://discord.gg/d92MEugb).
|
|
92
100
|
|
|
93
101
|
## Feature Breakdown
|
|
94
102
|
|
|
@@ -103,20 +111,20 @@ ______________________________________________________________________
|
|
|
103
111
|
| **Transport** | **Status** | **Source** |
|
|
104
112
|
| -------------------------------------- | :--------: | :---------------------------------------------------------------------------------: |
|
|
105
113
|
| **`libp2p-tcp`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/transport/tcp/tcp.py) |
|
|
106
|
-
| **`libp2p-quic`** |
|
|
107
|
-
| **`libp2p-websocket`** |
|
|
108
|
-
| **`libp2p-webrtc-browser-to-server`** |
|
|
109
|
-
| **`libp2p-webrtc-private-to-private`** |
|
|
114
|
+
| **`libp2p-quic`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/transport/quic) |
|
|
115
|
+
| **`libp2p-websocket`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/transport/websocket) |
|
|
116
|
+
| **`libp2p-webrtc-browser-to-server`** | 🌱 | |
|
|
117
|
+
| **`libp2p-webrtc-private-to-private`** | 🌱 | |
|
|
110
118
|
|
|
111
119
|
______________________________________________________________________
|
|
112
120
|
|
|
113
121
|
### NAT Traversal
|
|
114
122
|
|
|
115
|
-
| **NAT Traversal** | **Status** |
|
|
116
|
-
| ----------------------------- | :--------: |
|
|
117
|
-
| **`libp2p-circuit-relay-v2`** |
|
|
118
|
-
| **`libp2p-autonat`** |
|
|
119
|
-
| **`libp2p-hole-punching`** |
|
|
123
|
+
| **NAT Traversal** | **Status** | **Source** |
|
|
124
|
+
| ----------------------------- | :--------: | :-----------------------------------------------------------------------------: |
|
|
125
|
+
| **`libp2p-circuit-relay-v2`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/relay/circuit_v2) |
|
|
126
|
+
| **`libp2p-autonat`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/host/autonat) |
|
|
127
|
+
| **`libp2p-hole-punching`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/relay/circuit_v2) |
|
|
120
128
|
|
|
121
129
|
______________________________________________________________________
|
|
122
130
|
|
|
@@ -124,27 +132,27 @@ ______________________________________________________________________
|
|
|
124
132
|
|
|
125
133
|
| **Secure Communication** | **Status** | **Source** |
|
|
126
134
|
| ------------------------ | :--------: | :---------------------------------------------------------------------------: |
|
|
127
|
-
| **`libp2p-noise`** |
|
|
128
|
-
| **`libp2p-tls`** |
|
|
135
|
+
| **`libp2p-noise`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/security/noise) |
|
|
136
|
+
| **`libp2p-tls`** | 🌱 | |
|
|
129
137
|
|
|
130
138
|
______________________________________________________________________
|
|
131
139
|
|
|
132
140
|
### Discovery
|
|
133
141
|
|
|
134
|
-
| **Discovery** | **Status** |
|
|
135
|
-
| -------------------- | :--------: |
|
|
136
|
-
| **`bootstrap`** |
|
|
137
|
-
| **`random-walk`** |
|
|
138
|
-
| **`mdns-discovery`** |
|
|
139
|
-
| **`rendezvous`** |
|
|
142
|
+
| **Discovery** | **Status** | **Source** |
|
|
143
|
+
| -------------------- | :--------: | :----------------------------------------------------------------------------------: |
|
|
144
|
+
| **`bootstrap`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/bootstrap) |
|
|
145
|
+
| **`random-walk`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/random_walk) |
|
|
146
|
+
| **`mdns-discovery`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/mdns) |
|
|
147
|
+
| **`rendezvous`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/rendezvous) |
|
|
140
148
|
|
|
141
149
|
______________________________________________________________________
|
|
142
150
|
|
|
143
151
|
### Peer Routing
|
|
144
152
|
|
|
145
|
-
| **Peer Routing** | **Status** |
|
|
146
|
-
| -------------------- | :--------: |
|
|
147
|
-
| **`libp2p-kad-dht`** |
|
|
153
|
+
| **Peer Routing** | **Status** | **Source** |
|
|
154
|
+
| -------------------- | :--------: | :--------------------------------------------------------------------: |
|
|
155
|
+
| **`libp2p-kad-dht`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/kad_dht) |
|
|
148
156
|
|
|
149
157
|
______________________________________________________________________
|
|
150
158
|
|
|
@@ -159,10 +167,10 @@ ______________________________________________________________________
|
|
|
159
167
|
|
|
160
168
|
### Stream Muxers
|
|
161
169
|
|
|
162
|
-
| **Stream Muxers** | **Status** |
|
|
163
|
-
| ------------------ | :--------: |
|
|
164
|
-
| **`libp2p-yamux`** |
|
|
165
|
-
| **`libp2p-mplex`** |
|
|
170
|
+
| **Stream Muxers** | **Status** | **Source** |
|
|
171
|
+
| ------------------ | :--------: | :-------------------------------------------------------------------------------: |
|
|
172
|
+
| **`libp2p-yamux`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/stream_muxer/yamux) |
|
|
173
|
+
| **`libp2p-mplex`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/stream_muxer/mplex) |
|
|
166
174
|
|
|
167
175
|
______________________________________________________________________
|
|
168
176
|
|
|
@@ -170,7 +178,7 @@ ______________________________________________________________________
|
|
|
170
178
|
|
|
171
179
|
| **Storage** | **Status** |
|
|
172
180
|
| ------------------- | :--------: |
|
|
173
|
-
| **`libp2p-record`** |
|
|
181
|
+
| **`libp2p-record`** | 🌱 |
|
|
174
182
|
|
|
175
183
|
______________________________________________________________________
|
|
176
184
|
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
[](https://github.com/libp2p/py-libp2p/actions/workflows/tox.yml)
|
|
13
13
|
[](http://py-libp2p.readthedocs.io/en/latest/?badge=latest)
|
|
14
14
|
|
|
15
|
-
>
|
|
15
|
+
> py-libp2p has moved beyond its experimental roots and is steadily progressing toward production readiness. The core features are stable, and we’re focused on refining performance, expanding protocol support, and ensuring smooth interop with other libp2p implementations. We welcome contributions and real-world usage feedback to help us reach full production maturity.
|
|
16
16
|
|
|
17
17
|
Read more in the [documentation on ReadTheDocs](https://py-libp2p.readthedocs.io/). [View the release notes](https://py-libp2p.readthedocs.io/en/latest/release_notes.html).
|
|
18
18
|
|
|
19
19
|
## Maintainers
|
|
20
20
|
|
|
21
|
-
Currently maintained by [@pacrob](https://github.com/pacrob), [@seetadev](https://github.com/seetadev) and [@dhuseby](https://github.com/dhuseby)
|
|
21
|
+
Currently maintained by [@pacrob](https://github.com/pacrob), [@seetadev](https://github.com/seetadev) and [@dhuseby](https://github.com/dhuseby). Please reach out to us for collaboration or active feedback. If you have questions, feel free to open a new [discussion](https://github.com/libp2p/py-libp2p/discussions). We are also available on the libp2p Discord — join us at #py-libp2p [sub-channel](https://discord.gg/d92MEugb).
|
|
22
22
|
|
|
23
23
|
## Feature Breakdown
|
|
24
24
|
|
|
@@ -33,20 +33,20 @@ ______________________________________________________________________
|
|
|
33
33
|
| **Transport** | **Status** | **Source** |
|
|
34
34
|
| -------------------------------------- | :--------: | :---------------------------------------------------------------------------------: |
|
|
35
35
|
| **`libp2p-tcp`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/transport/tcp/tcp.py) |
|
|
36
|
-
| **`libp2p-quic`** |
|
|
37
|
-
| **`libp2p-websocket`** |
|
|
38
|
-
| **`libp2p-webrtc-browser-to-server`** |
|
|
39
|
-
| **`libp2p-webrtc-private-to-private`** |
|
|
36
|
+
| **`libp2p-quic`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/transport/quic) |
|
|
37
|
+
| **`libp2p-websocket`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/transport/websocket) |
|
|
38
|
+
| **`libp2p-webrtc-browser-to-server`** | 🌱 | |
|
|
39
|
+
| **`libp2p-webrtc-private-to-private`** | 🌱 | |
|
|
40
40
|
|
|
41
41
|
______________________________________________________________________
|
|
42
42
|
|
|
43
43
|
### NAT Traversal
|
|
44
44
|
|
|
45
|
-
| **NAT Traversal** | **Status** |
|
|
46
|
-
| ----------------------------- | :--------: |
|
|
47
|
-
| **`libp2p-circuit-relay-v2`** |
|
|
48
|
-
| **`libp2p-autonat`** |
|
|
49
|
-
| **`libp2p-hole-punching`** |
|
|
45
|
+
| **NAT Traversal** | **Status** | **Source** |
|
|
46
|
+
| ----------------------------- | :--------: | :-----------------------------------------------------------------------------: |
|
|
47
|
+
| **`libp2p-circuit-relay-v2`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/relay/circuit_v2) |
|
|
48
|
+
| **`libp2p-autonat`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/host/autonat) |
|
|
49
|
+
| **`libp2p-hole-punching`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/relay/circuit_v2) |
|
|
50
50
|
|
|
51
51
|
______________________________________________________________________
|
|
52
52
|
|
|
@@ -54,27 +54,27 @@ ______________________________________________________________________
|
|
|
54
54
|
|
|
55
55
|
| **Secure Communication** | **Status** | **Source** |
|
|
56
56
|
| ------------------------ | :--------: | :---------------------------------------------------------------------------: |
|
|
57
|
-
| **`libp2p-noise`** |
|
|
58
|
-
| **`libp2p-tls`** |
|
|
57
|
+
| **`libp2p-noise`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/security/noise) |
|
|
58
|
+
| **`libp2p-tls`** | 🌱 | |
|
|
59
59
|
|
|
60
60
|
______________________________________________________________________
|
|
61
61
|
|
|
62
62
|
### Discovery
|
|
63
63
|
|
|
64
|
-
| **Discovery** | **Status** |
|
|
65
|
-
| -------------------- | :--------: |
|
|
66
|
-
| **`bootstrap`** |
|
|
67
|
-
| **`random-walk`** |
|
|
68
|
-
| **`mdns-discovery`** |
|
|
69
|
-
| **`rendezvous`** |
|
|
64
|
+
| **Discovery** | **Status** | **Source** |
|
|
65
|
+
| -------------------- | :--------: | :----------------------------------------------------------------------------------: |
|
|
66
|
+
| **`bootstrap`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/bootstrap) |
|
|
67
|
+
| **`random-walk`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/random_walk) |
|
|
68
|
+
| **`mdns-discovery`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/mdns) |
|
|
69
|
+
| **`rendezvous`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/discovery/rendezvous) |
|
|
70
70
|
|
|
71
71
|
______________________________________________________________________
|
|
72
72
|
|
|
73
73
|
### Peer Routing
|
|
74
74
|
|
|
75
|
-
| **Peer Routing** | **Status** |
|
|
76
|
-
| -------------------- | :--------: |
|
|
77
|
-
| **`libp2p-kad-dht`** |
|
|
75
|
+
| **Peer Routing** | **Status** | **Source** |
|
|
76
|
+
| -------------------- | :--------: | :--------------------------------------------------------------------: |
|
|
77
|
+
| **`libp2p-kad-dht`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/kad_dht) |
|
|
78
78
|
|
|
79
79
|
______________________________________________________________________
|
|
80
80
|
|
|
@@ -89,10 +89,10 @@ ______________________________________________________________________
|
|
|
89
89
|
|
|
90
90
|
### Stream Muxers
|
|
91
91
|
|
|
92
|
-
| **Stream Muxers** | **Status** |
|
|
93
|
-
| ------------------ | :--------: |
|
|
94
|
-
| **`libp2p-yamux`** |
|
|
95
|
-
| **`libp2p-mplex`** |
|
|
92
|
+
| **Stream Muxers** | **Status** | **Source** |
|
|
93
|
+
| ------------------ | :--------: | :-------------------------------------------------------------------------------: |
|
|
94
|
+
| **`libp2p-yamux`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/stream_muxer/yamux) |
|
|
95
|
+
| **`libp2p-mplex`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/stream_muxer/mplex) |
|
|
96
96
|
|
|
97
97
|
______________________________________________________________________
|
|
98
98
|
|
|
@@ -100,7 +100,7 @@ ______________________________________________________________________
|
|
|
100
100
|
|
|
101
101
|
| **Storage** | **Status** |
|
|
102
102
|
| ------------------- | :--------: |
|
|
103
|
-
| **`libp2p-record`** |
|
|
103
|
+
| **`libp2p-record`** | 🌱 |
|
|
104
104
|
|
|
105
105
|
______________________________________________________________________
|
|
106
106
|
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
14
14
|
# add these directories to sys.path here. If the directory is relative to the
|
|
15
15
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
16
|
-
# sys.path.insert(0, os.path.abspath('.'))
|
|
17
16
|
|
|
18
17
|
import doctest
|
|
19
18
|
import os
|
|
20
19
|
import sys
|
|
20
|
+
|
|
21
|
+
sys.path.insert(0, os.path.abspath('..'))
|
|
21
22
|
from unittest.mock import MagicMock
|
|
22
23
|
|
|
23
24
|
try:
|
|
@@ -49,6 +50,21 @@ extensions = [
|
|
|
49
50
|
"sphinx_rtd_theme",
|
|
50
51
|
]
|
|
51
52
|
|
|
53
|
+
# Configure Python domain to prefer canonical imports
|
|
54
|
+
# This helps resolve ambiguous references like ResourceManager
|
|
55
|
+
python_use_unqualified_type_names = False
|
|
56
|
+
|
|
57
|
+
# Configure autodoc to prefer specific imports for ambiguous references
|
|
58
|
+
autodoc_type_aliases = {
|
|
59
|
+
"ResourceManager": "libp2p.rcmgr.ResourceManager",
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
# Suppress specific warnings about ambiguous cross-references
|
|
63
|
+
# Since ResourceManager is intentionally re-exported, both locations are valid
|
|
64
|
+
suppress_warnings = [
|
|
65
|
+
"ref.python", # Suppress ambiguous cross-reference warnings
|
|
66
|
+
]
|
|
67
|
+
|
|
52
68
|
# Add any paths that contain templates here, relative to this directory.
|
|
53
69
|
templates_path = ["_templates"]
|
|
54
70
|
|
|
@@ -290,7 +306,12 @@ texinfo_documents = [
|
|
|
290
306
|
]
|
|
291
307
|
|
|
292
308
|
# Prevent autodoc from trying to import module from tests.factories
|
|
293
|
-
autodoc_mock_imports = [
|
|
309
|
+
autodoc_mock_imports = [
|
|
310
|
+
"tests.factories",
|
|
311
|
+
# Mocked ONLY for Sphinx/autodoc: this module does not exist in the codebase
|
|
312
|
+
# but some doc tools may try to import it. No real code references this import.
|
|
313
|
+
"libp2p.relay.circuit_v2.lib"
|
|
314
|
+
]
|
|
294
315
|
|
|
295
316
|
# Documents to append as an appendix to all manuals.
|
|
296
317
|
# texinfo_appendices = []
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Advanced demonstration of Thin Waist address handling.
|
|
3
|
+
|
|
4
|
+
Run:
|
|
5
|
+
python -m examples.advanced.network_discovery
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from multiaddr import Multiaddr
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from libp2p.utils.address_validation import (
|
|
14
|
+
expand_wildcard_address,
|
|
15
|
+
get_available_interfaces,
|
|
16
|
+
get_optimal_binding_address,
|
|
17
|
+
get_wildcard_address,
|
|
18
|
+
)
|
|
19
|
+
except ImportError:
|
|
20
|
+
# Fallbacks if utilities are missing - use minimal network discovery
|
|
21
|
+
import socket
|
|
22
|
+
|
|
23
|
+
def get_available_interfaces(port: int, protocol: str = "tcp"):
|
|
24
|
+
# Try to get local network interfaces, fallback to loopback
|
|
25
|
+
addrs = []
|
|
26
|
+
try:
|
|
27
|
+
# Get hostname IP (better than hardcoded localhost)
|
|
28
|
+
hostname = socket.gethostname()
|
|
29
|
+
local_ip = socket.gethostbyname(hostname)
|
|
30
|
+
if local_ip != "127.0.0.1":
|
|
31
|
+
addrs.append(Multiaddr(f"/ip4/{local_ip}/{protocol}/{port}"))
|
|
32
|
+
except Exception:
|
|
33
|
+
pass
|
|
34
|
+
# Always include loopback as fallback
|
|
35
|
+
addrs.append(Multiaddr(f"/ip4/127.0.0.1/{protocol}/{port}"))
|
|
36
|
+
return addrs
|
|
37
|
+
|
|
38
|
+
def expand_wildcard_address(addr: Multiaddr, port: int | None = None):
|
|
39
|
+
if port is None:
|
|
40
|
+
return [addr]
|
|
41
|
+
addr_str = str(addr).rsplit("/", 1)[0]
|
|
42
|
+
return [Multiaddr(addr_str + f"/{port}")]
|
|
43
|
+
|
|
44
|
+
def get_optimal_binding_address(port: int, protocol: str = "tcp"):
|
|
45
|
+
# Try to get a non-loopback address first
|
|
46
|
+
interfaces = get_available_interfaces(port, protocol)
|
|
47
|
+
for addr in interfaces:
|
|
48
|
+
if "127.0.0.1" not in str(addr):
|
|
49
|
+
return addr
|
|
50
|
+
# Fallback to loopback if no other interfaces found
|
|
51
|
+
return Multiaddr(f"/ip4/127.0.0.1/{protocol}/{port}")
|
|
52
|
+
|
|
53
|
+
def get_wildcard_address(port: int, protocol: str = "tcp"):
|
|
54
|
+
return Multiaddr(f"/ip4/0.0.0.0/{protocol}/{port}")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def main() -> None:
|
|
58
|
+
port = 8080
|
|
59
|
+
interfaces = get_available_interfaces(port)
|
|
60
|
+
print(f"Discovered interfaces for port {port}:")
|
|
61
|
+
for a in interfaces:
|
|
62
|
+
print(f" - {a}")
|
|
63
|
+
|
|
64
|
+
# Demonstrate wildcard address as a feature
|
|
65
|
+
wildcard_v4 = get_wildcard_address(port)
|
|
66
|
+
print(f"\nWildcard address (feature): {wildcard_v4}")
|
|
67
|
+
|
|
68
|
+
expanded_v4 = expand_wildcard_address(wildcard_v4)
|
|
69
|
+
print("\nExpanded IPv4 wildcard:")
|
|
70
|
+
for a in expanded_v4:
|
|
71
|
+
print(f" - {a}")
|
|
72
|
+
|
|
73
|
+
wildcard_v6 = Multiaddr(f"/ip6/::/tcp/{port}")
|
|
74
|
+
expanded_v6 = expand_wildcard_address(wildcard_v6)
|
|
75
|
+
print("\nExpanded IPv6 wildcard:")
|
|
76
|
+
for a in expanded_v6:
|
|
77
|
+
print(f" - {a}")
|
|
78
|
+
|
|
79
|
+
print("\nOptimal binding address heuristic result:")
|
|
80
|
+
print(f" -> {get_optimal_binding_address(port)}")
|
|
81
|
+
|
|
82
|
+
override_port = 9000
|
|
83
|
+
overridden = expand_wildcard_address(wildcard_v4, port=override_port)
|
|
84
|
+
print(f"\nPort override expansion to {override_port}:")
|
|
85
|
+
for a in overridden:
|
|
86
|
+
print(f" - {a}")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
if __name__ == "__main__":
|
|
90
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Bitswap example package."""
|