libp2p 0.2.1__tar.gz → 0.2.2__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.1/libp2p.egg-info → libp2p-0.2.2}/PKG-INFO +86 -75
- {libp2p-0.2.1 → libp2p-0.2.2}/README.md +64 -68
- {libp2p-0.2.1 → libp2p-0.2.2}/examples/chat/chat.py +4 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/examples/echo/echo.py +4 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/examples/ping/ping.py +5 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/__init__.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/authenticated_encryption.py +1 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/key_exchange.py +1 -2
- libp2p-0.2.1/libp2p/typing.py → libp2p-0.2.2/libp2p/custom_types.py +3 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/host/basic_host.py +11 -10
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/host/defaults.py +1 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/host/host_interface.py +9 -8
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/host/ping.py +4 -7
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/identity/identify/protocol.py +4 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/connection/net_connection_interface.py +1 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/connection/swarm_connection.py +2 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/network_interface.py +8 -7
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/stream/net_stream.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/stream/net_stream_interface.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/swarm.py +7 -9
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/addrbook_interface.py +3 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/peerdata.py +8 -8
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/peerdata_interface.py +5 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/peerinfo.py +4 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/peerstore.py +9 -9
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/peerstore_interface.py +7 -6
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/multiselect.py +4 -9
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/multiselect_client.py +2 -2
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/multiselect_client_interface.py +4 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/multiselect_muxer_interface.py +4 -8
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/abc.py +9 -9
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/floodsub.py +7 -8
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/gossipsub.py +38 -40
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/mcache.py +13 -14
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/pubsub.py +6 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/subscription.py +3 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/typing.py +3 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/routing/interfaces.py +1 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/insecure/transport.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/transport.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secio/transport.py +5 -6
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/security_multistream.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/mplex/mplex.py +6 -8
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/muxer_multistream.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/abc.py +4 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/base.py +9 -10
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/trio_service.py +7 -6
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/typing.py +4 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/factories.py +24 -25
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/pubsub/dummy_account_node.py +5 -7
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/pubsub/utils.py +1 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/utils.py +3 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/transport/listener_interface.py +1 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/transport/tcp/tcp.py +6 -6
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/transport/typing.py +8 -7
- {libp2p-0.2.1 → libp2p-0.2.2/libp2p.egg-info}/PKG-INFO +86 -75
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p.egg-info/SOURCES.txt +9 -8
- libp2p-0.2.2/libp2p.egg-info/entry_points.txt +4 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p.egg-info/requires.txt +5 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/pyproject.toml +4 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/scripts/release/test_package.py +4 -14
- {libp2p-0.2.1 → libp2p-0.2.2}/setup.py +14 -6
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/test_libp2p/test_libp2p.py +4 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/conftest.py +3 -3
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/test_bindings.py +1 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/test_echo.py +6 -6
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/test_pubsub.py +4 -4
- {libp2p-0.2.1/libp2p/tools → libp2p-0.2.2/tests/utils}/interop/daemon.py +6 -6
- {libp2p-0.2.1/libp2p/tools → libp2p-0.2.2/tests/utils}/interop/process.py +3 -4
- {libp2p-0.2.1 → libp2p-0.2.2}/LICENSE-APACHE +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/LICENSE-MIT +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/MANIFEST.in +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/examples/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/examples/chat/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/examples/echo/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/examples/ping/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/ecc.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/ed25519.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/keys.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/pb/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/pb/crypto_pb2.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/pb/crypto_pb2.pyi +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/rsa.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/secp256k1.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/crypto/serialization.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/host/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/host/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/host/routed_host.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/identity/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/identity/identify/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/identity/identify/pb/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/identity/identify/pb/identify_pb2.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/identity/identify/pb/identify_pb2.pyi +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/io/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/io/abc.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/io/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/io/msgio.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/io/trio.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/io/utils.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/connection/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/connection/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/connection/raw_connection.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/connection/raw_connection_interface.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/notifee_interface.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/stream/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/network/stream/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/id.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/peer/peermetadata_interface.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/multiselect_communicator.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/protocol_muxer/multiselect_communicator_interface.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/pb/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/pb/rpc_pb2.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/pb/rpc_pb2.pyi +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/pubsub_notifee.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/pubsub/validators.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/py.typed +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/routing/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/base_session.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/base_transport.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/insecure/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/insecure/pb/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/insecure/pb/plaintext_pb2.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/insecure/pb/plaintext_pb2.pyi +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/io.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/messages.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/patterns.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/pb/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/pb/noise_pb2.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/noise/pb/noise_pb2.pyi +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secio/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secio/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secio/pb/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secio/pb/spipe_pb2.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secio/pb/spipe_pb2.pyi +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secure_conn_interface.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secure_session.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/security/secure_transport_interface.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/abc.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/mplex/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/mplex/constants.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/mplex/datastructures.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/mplex/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/stream_muxer/mplex/mplex_stream.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/_utils.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/exceptions.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/async_service/stats.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/constants.py +0 -0
- {libp2p-0.2.1/libp2p/tools/interop → libp2p-0.2.2/libp2p/tools/pubsub}/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/tools/pubsub/floodsub_integration_test_settings.py +0 -0
- {libp2p-0.2.1/libp2p/tools/pubsub → libp2p-0.2.2/libp2p/transport}/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/transport/exceptions.py +0 -0
- {libp2p-0.2.1/libp2p/transport → libp2p-0.2.2/libp2p/transport/tcp}/__init__.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/transport/transport_interface.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/transport/upgrader.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p/utils.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p.egg-info/dependency_links.txt +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p.egg-info/not-zip-safe +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/libp2p.egg-info/top_level.txt +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/setup.cfg +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/conftest.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/crypto/test_ed25519.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/crypto/test_secp256k1.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/examples/test_examples.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/host/test_basic_host.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/host/test_connected_peers.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/host/test_ping.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/host/test_routed_host.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/identity/identify/test_protocol.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/network/conftest.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/network/test_net_stream.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/network/test_notify.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/network/test_swarm.py +1 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/network/test_swarm_conn.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/peer/test_addrbook.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/peer/test_interop.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/peer/test_peerdata.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/peer/test_peerid.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/peer/test_peerinfo.py +1 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/peer/test_peermetadata.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/peer/test_peerstore.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/protocol_muxer/test_protocol_muxer.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/pubsub/test_dummyaccount_demo.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/pubsub/test_floodsub.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/pubsub/test_gossipsub.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/pubsub/test_gossipsub_backward_compatibility.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/pubsub/test_mcache.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/pubsub/test_pubsub.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/pubsub/test_subscription.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/security/noise/test_msg_read_writer.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/security/noise/test_noise.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/security/test_secio.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/security/test_security_multistream.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/stream_muxer/conftest.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/stream_muxer/test_mplex_conn.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/stream_muxer/test_mplex_stream.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/test_import_and_version.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/tools/async_service/test_trio_based_service.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/tools/async_service/test_trio_external_api.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/tools/async_service/test_trio_manager_stats.py +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/core/transport/test_tcp.py +1 -1
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/go_pkgs/examples/README.md +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/go_pkgs/examples/echo/main.go +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/go_pkgs/examples/go.mod +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/go_pkgs/examples/go.sum +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/go_pkgs/examples/utils/host.go +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/go_pkgs/install_interop_go_pkgs.sh +0 -0
- {libp2p-0.2.1 → libp2p-0.2.2}/tests/interop/test_net_stream.py +0 -0
- {libp2p-0.2.1/libp2p/transport/tcp → libp2p-0.2.2/tests/utils/interop}/__init__.py +0 -0
- {libp2p-0.2.1/libp2p/tools → libp2p-0.2.2/tests/utils}/interop/constants.py +0 -0
- {libp2p-0.2.1/libp2p/tools → libp2p-0.2.2/tests/utils}/interop/envs.py +0 -0
- {libp2p-0.2.1/libp2p/tools → libp2p-0.2.2/tests/utils}/interop/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: libp2p
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: libp2p: The Python implementation of the libp2p networking stack
|
|
5
5
|
Home-page: https://github.com/libp2p/py-libp2p
|
|
6
6
|
Author: The Ethereum Foundation
|
|
@@ -16,12 +16,12 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
16
16
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
17
|
Classifier: Natural Language :: English
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
-
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Requires-Python: >=3.9, <4
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
License-File: LICENSE-APACHE
|
|
27
27
|
License-File: LICENSE-MIT
|
|
@@ -43,7 +43,7 @@ Requires-Dist: fastecdsa-any==1.7.5; sys_platform == "win32"
|
|
|
43
43
|
Requires-Dist: fastecdsa==1.7.5; sys_platform != "win32"
|
|
44
44
|
Provides-Extra: dev
|
|
45
45
|
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
46
|
-
Requires-Dist:
|
|
46
|
+
Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
|
|
47
47
|
Requires-Dist: ipython; extra == "dev"
|
|
48
48
|
Requires-Dist: mypy==1.10.0; extra == "dev"
|
|
49
49
|
Requires-Dist: pre-commit>=3.4.0; extra == "dev"
|
|
@@ -52,7 +52,8 @@ Requires-Dist: twine; extra == "dev"
|
|
|
52
52
|
Requires-Dist: wheel; extra == "dev"
|
|
53
53
|
Requires-Dist: sphinx>=6.0.0; extra == "dev"
|
|
54
54
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
|
|
55
|
-
Requires-Dist: towncrier<
|
|
55
|
+
Requires-Dist: towncrier<25,>=24; extra == "dev"
|
|
56
|
+
Requires-Dist: p2pclient==0.2.0; extra == "dev"
|
|
56
57
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
57
58
|
Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
|
|
58
59
|
Requires-Dist: pytest-trio>=0.5.2; extra == "dev"
|
|
@@ -60,15 +61,35 @@ Requires-Dist: factory-boy<3.0.0,>=2.12.0; extra == "dev"
|
|
|
60
61
|
Provides-Extra: docs
|
|
61
62
|
Requires-Dist: sphinx>=6.0.0; extra == "docs"
|
|
62
63
|
Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
|
|
63
|
-
Requires-Dist: towncrier<
|
|
64
|
+
Requires-Dist: towncrier<25,>=24; extra == "docs"
|
|
64
65
|
Provides-Extra: test
|
|
66
|
+
Requires-Dist: p2pclient==0.2.0; extra == "test"
|
|
65
67
|
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
66
68
|
Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
|
|
67
69
|
Requires-Dist: pytest-trio>=0.5.2; extra == "test"
|
|
68
70
|
Requires-Dist: factory-boy<3.0.0,>=2.12.0; extra == "test"
|
|
71
|
+
Dynamic: author
|
|
72
|
+
Dynamic: author-email
|
|
73
|
+
Dynamic: classifier
|
|
74
|
+
Dynamic: description
|
|
75
|
+
Dynamic: description-content-type
|
|
76
|
+
Dynamic: home-page
|
|
77
|
+
Dynamic: keywords
|
|
78
|
+
Dynamic: license
|
|
79
|
+
Dynamic: platform
|
|
80
|
+
Dynamic: provides-extra
|
|
81
|
+
Dynamic: requires-dist
|
|
82
|
+
Dynamic: requires-python
|
|
83
|
+
Dynamic: summary
|
|
69
84
|
|
|
70
85
|
# py-libp2p
|
|
71
86
|
|
|
87
|
+
<h1 align="center">
|
|
88
|
+
<a href="https://libp2p.io/"><img width="250" src="https://github.com/libp2p/py-libp2p/blob/main/assets/py-libp2p-logo.png?raw=true" alt="py-libp2p hex logo" /></a>
|
|
89
|
+
</h1>
|
|
90
|
+
|
|
91
|
+
<h3 align="center">The Python implementation of the libp2p networking stack.</h3>
|
|
92
|
+
|
|
72
93
|
[](https://gitter.im/py-libp2p/Lobby)
|
|
73
94
|
[](https://circleci.com/gh/libp2p/py-libp2p)
|
|
74
95
|
[](https://badge.fury.io/py/libp2p)
|
|
@@ -78,16 +99,7 @@ Requires-Dist: factory-boy<3.0.0,>=2.12.0; extra == "test"
|
|
|
78
99
|
[](https://riot.permaweb.io/#/room/#libp2p:permaweb.io)
|
|
79
100
|
[](https://discord.gg/66KBrm2)
|
|
80
101
|
|
|
81
|
-
|
|
82
|
-
<a href="https://libp2p.io/"><img width="250" src="https://github.com/libp2p/py-libp2p/blob/main/assets/py-libp2p-logo.png?raw=true" alt="py-libp2p hex logo" /></a>
|
|
83
|
-
</h1>
|
|
84
|
-
|
|
85
|
-
## WARNING
|
|
86
|
-
|
|
87
|
-
py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
|
|
88
|
-
Right now, `tests_interop` are turned off for CI, and a number of `tests` are failing. WIP.
|
|
89
|
-
|
|
90
|
-
The Python implementation of the libp2p networking stack
|
|
102
|
+
> ⚠️ **Warning:** py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
|
|
91
103
|
|
|
92
104
|
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).
|
|
93
105
|
|
|
@@ -95,101 +107,100 @@ Read more in the [documentation on ReadTheDocs](https://py-libp2p.readthedocs.io
|
|
|
95
107
|
|
|
96
108
|
Currently maintained by [@pacrob](https://github.com/pacrob) and [@dhuseby](https://github.com/dhuseby), looking for assistance!
|
|
97
109
|
|
|
98
|
-
Note that tests/core/test_libp2p/test_libp2p.py contains an end-to-end messaging test between two libp2p hosts, which is the bulk of our proof of concept.
|
|
99
|
-
|
|
100
110
|
## Feature Breakdown
|
|
101
111
|
|
|
102
|
-
py-libp2p aims for conformity with [the standard libp2p modules](https://
|
|
112
|
+
py-libp2p aims for conformity with [the standard libp2p modules](https://libp2p.io/implementations/). Below is a breakdown of the modules we have developed, are developing, and may develop in the future.
|
|
103
113
|
|
|
104
|
-
> Legend:
|
|
114
|
+
> Legend: ✅: Done 🛠️: In Progress 🚫: Missing ❌: Not planned
|
|
105
115
|
|
|
106
116
|
| libp2p Node | Status |
|
|
107
117
|
| ------------ | :-----------: |
|
|
108
|
-
| **`libp2p`** |
|
|
118
|
+
| **`libp2p`** | ✅ |
|
|
109
119
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
| **`
|
|
120
|
+
| Core Protocols | Status |
|
|
121
|
+
| -------------- | :-----------: |
|
|
122
|
+
| **`Ping`** | ✅ |
|
|
123
|
+
| **`Identify`** | ✅ |
|
|
113
124
|
|
|
114
125
|
| Transport Protocols | Status |
|
|
115
126
|
| ------------------- | :-----------: |
|
|
116
|
-
| **`TCP`** |
|
|
117
|
-
| **`
|
|
118
|
-
| **`
|
|
119
|
-
| **`
|
|
120
|
-
| **`
|
|
121
|
-
| **`
|
|
122
|
-
| **`
|
|
123
|
-
| **`
|
|
124
|
-
| **`
|
|
125
|
-
| **`
|
|
126
|
-
| **`
|
|
127
|
-
| **`
|
|
128
|
-
| **`
|
|
127
|
+
| **`TCP`** | ✅|
|
|
128
|
+
| **`QUIC`** | 🛠️ |
|
|
129
|
+
| **`UDP`** | 🚫 |
|
|
130
|
+
| **`WebSockets`** | ❌ |
|
|
131
|
+
| **`UTP`** | ❌ |
|
|
132
|
+
| **`WebRTC`** | ❌ |
|
|
133
|
+
| **`SCTP`** | ❌ |
|
|
134
|
+
| **`Tor`** | ❌ |
|
|
135
|
+
| **`i2p`** | ❌ |
|
|
136
|
+
| **`cjdns`** | ❌ |
|
|
137
|
+
| **`Bluetooth LE`** | ❌ |
|
|
138
|
+
| **`Audio TP`** | ❌ |
|
|
139
|
+
| **`Zerotier`** | ❌ |
|
|
129
140
|
|
|
130
141
|
| Stream Muxers | Status |
|
|
131
142
|
| ---------------- | :-----------: |
|
|
132
|
-
| **`multiplex`** |
|
|
133
|
-
| **`yamux`** |
|
|
134
|
-
| **`benchmarks`** |
|
|
135
|
-
| **`muxado`** |
|
|
136
|
-
| **`spdystream`** |
|
|
137
|
-
| **`spdy`** |
|
|
138
|
-
| **`http2`** |
|
|
139
|
-
| **`QUIC`** |
|
|
143
|
+
| **`multiplex`** | ✅ |
|
|
144
|
+
| **`yamux`** | 🚫 |
|
|
145
|
+
| **`benchmarks`** | ❌ |
|
|
146
|
+
| **`muxado`** | ❌ |
|
|
147
|
+
| **`spdystream`** | ❌ |
|
|
148
|
+
| **`spdy`** | ❌ |
|
|
149
|
+
| **`http2`** | ❌ |
|
|
150
|
+
| **`QUIC`** | ❌ |
|
|
140
151
|
|
|
141
152
|
| Protocol Muxers | Status |
|
|
142
153
|
| ----------------- | :-----------: |
|
|
143
|
-
| **`multiselect`** |
|
|
154
|
+
| **`multiselect`** | ✅ |
|
|
144
155
|
|
|
145
156
|
| Switch (Swarm) | Status |
|
|
146
157
|
| ------------------ | :-----------: |
|
|
147
|
-
| **`Switch`** |
|
|
148
|
-
| **`Dialer stack`** |
|
|
158
|
+
| **`Switch`** | ✅ |
|
|
159
|
+
| **`Dialer stack`** | ✅ |
|
|
149
160
|
|
|
150
161
|
| Peer Discovery | Status |
|
|
151
162
|
| -------------------- | :--------: |
|
|
152
|
-
| **`bootstrap list`** |
|
|
153
|
-
| **`Kademlia DHT`** |
|
|
154
|
-
| **`mDNS`** |
|
|
155
|
-
| **`PEX`** |
|
|
156
|
-
| **`DNS`** |
|
|
163
|
+
| **`bootstrap list`** | 🚫 |
|
|
164
|
+
| **`Kademlia DHT`** | ❌ |
|
|
165
|
+
| **`mDNS`** | ❌ |
|
|
166
|
+
| **`PEX`** | ❌ |
|
|
167
|
+
| **`DNS`** | ❌ |
|
|
157
168
|
|
|
158
169
|
| Content Routing | Status |
|
|
159
170
|
| ------------------ | :-----------: |
|
|
160
|
-
| **`Kademlia DHT`** |
|
|
161
|
-
| **`floodsub`** |
|
|
162
|
-
| **`gossipsub`** |
|
|
163
|
-
| **`PHT`** |
|
|
171
|
+
| **`Kademlia DHT`** | ❌ |
|
|
172
|
+
| **`floodsub`** | ✅ |
|
|
173
|
+
| **`gossipsub`** | ✅ |
|
|
174
|
+
| **`PHT`** | ❌ |
|
|
164
175
|
|
|
165
176
|
| Peer Routing | Status |
|
|
166
177
|
| ------------------ | :-----------: |
|
|
167
|
-
| **`Kademlia DHT`** |
|
|
168
|
-
| **`floodsub`** |
|
|
169
|
-
| **`gossipsub`** |
|
|
170
|
-
| **`PHT`** |
|
|
178
|
+
| **`Kademlia DHT`** | ❌ |
|
|
179
|
+
| **`floodsub`** | ✅|
|
|
180
|
+
| **`gossipsub`** | ✅ |
|
|
181
|
+
| **`PHT`** | ❌ |
|
|
171
182
|
|
|
172
183
|
| NAT Traversal | Status |
|
|
173
184
|
| ------------------------ | :--------: |
|
|
174
|
-
| **`nat-pmp`** |
|
|
175
|
-
| **`upnp`** |
|
|
176
|
-
| **`ext addr discovery`** |
|
|
177
|
-
| **`STUN-like`** |
|
|
178
|
-
| **`line-switch relay`** |
|
|
179
|
-
| **`pkt-switch relay`** |
|
|
185
|
+
| **`nat-pmp`** | ❌ |
|
|
186
|
+
| **`upnp`** | ❌ |
|
|
187
|
+
| **`ext addr discovery`** | ❌ |
|
|
188
|
+
| **`STUN-like`** | ❌ |
|
|
189
|
+
| **`line-switch relay`** | ❌ |
|
|
190
|
+
| **`pkt-switch relay`** | ❌ |
|
|
180
191
|
|
|
181
192
|
| Exchange | Status |
|
|
182
193
|
| ---------------- | :--------: |
|
|
183
|
-
| **`HTTP`** |
|
|
184
|
-
| **`Bitswap`** |
|
|
185
|
-
| **`Bittorrent`** |
|
|
194
|
+
| **`HTTP`** | ❌ |
|
|
195
|
+
| **`Bitswap`** | ❌ |
|
|
196
|
+
| **`Bittorrent`** | ❌ |
|
|
186
197
|
|
|
187
198
|
| Consensus | Status |
|
|
188
199
|
| -------------- | :--------: |
|
|
189
|
-
| **`Paxos`** |
|
|
190
|
-
| **`Raft`** |
|
|
191
|
-
| **`PBTF`** |
|
|
192
|
-
| **`Nakamoto`** |
|
|
200
|
+
| **`Paxos`** | ❌ |
|
|
201
|
+
| **`Raft`** | ❌ |
|
|
202
|
+
| **`PBTF`** | ❌ |
|
|
203
|
+
| **`Nakamoto`** | ❌ |
|
|
193
204
|
|
|
194
205
|
## Explanation of Basic Two Node Communication
|
|
195
206
|
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# py-libp2p
|
|
2
2
|
|
|
3
|
+
<h1 align="center">
|
|
4
|
+
<a href="https://libp2p.io/"><img width="250" src="https://github.com/libp2p/py-libp2p/blob/main/assets/py-libp2p-logo.png?raw=true" alt="py-libp2p hex logo" /></a>
|
|
5
|
+
</h1>
|
|
6
|
+
|
|
7
|
+
<h3 align="center">The Python implementation of the libp2p networking stack.</h3>
|
|
8
|
+
|
|
3
9
|
[](https://gitter.im/py-libp2p/Lobby)
|
|
4
10
|
[](https://circleci.com/gh/libp2p/py-libp2p)
|
|
5
11
|
[](https://badge.fury.io/py/libp2p)
|
|
@@ -9,16 +15,7 @@
|
|
|
9
15
|
[](https://riot.permaweb.io/#/room/#libp2p:permaweb.io)
|
|
10
16
|
[](https://discord.gg/66KBrm2)
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
<a href="https://libp2p.io/"><img width="250" src="https://github.com/libp2p/py-libp2p/blob/main/assets/py-libp2p-logo.png?raw=true" alt="py-libp2p hex logo" /></a>
|
|
14
|
-
</h1>
|
|
15
|
-
|
|
16
|
-
## WARNING
|
|
17
|
-
|
|
18
|
-
py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
|
|
19
|
-
Right now, `tests_interop` are turned off for CI, and a number of `tests` are failing. WIP.
|
|
20
|
-
|
|
21
|
-
The Python implementation of the libp2p networking stack
|
|
18
|
+
> ⚠️ **Warning:** py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
|
|
22
19
|
|
|
23
20
|
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).
|
|
24
21
|
|
|
@@ -26,101 +23,100 @@ Read more in the [documentation on ReadTheDocs](https://py-libp2p.readthedocs.io
|
|
|
26
23
|
|
|
27
24
|
Currently maintained by [@pacrob](https://github.com/pacrob) and [@dhuseby](https://github.com/dhuseby), looking for assistance!
|
|
28
25
|
|
|
29
|
-
Note that tests/core/test_libp2p/test_libp2p.py contains an end-to-end messaging test between two libp2p hosts, which is the bulk of our proof of concept.
|
|
30
|
-
|
|
31
26
|
## Feature Breakdown
|
|
32
27
|
|
|
33
|
-
py-libp2p aims for conformity with [the standard libp2p modules](https://
|
|
28
|
+
py-libp2p aims for conformity with [the standard libp2p modules](https://libp2p.io/implementations/). Below is a breakdown of the modules we have developed, are developing, and may develop in the future.
|
|
34
29
|
|
|
35
|
-
> Legend:
|
|
30
|
+
> Legend: ✅: Done 🛠️: In Progress 🚫: Missing ❌: Not planned
|
|
36
31
|
|
|
37
32
|
| libp2p Node | Status |
|
|
38
33
|
| ------------ | :-----------: |
|
|
39
|
-
| **`libp2p`** |
|
|
34
|
+
| **`libp2p`** | ✅ |
|
|
40
35
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| **`
|
|
36
|
+
| Core Protocols | Status |
|
|
37
|
+
| -------------- | :-----------: |
|
|
38
|
+
| **`Ping`** | ✅ |
|
|
39
|
+
| **`Identify`** | ✅ |
|
|
44
40
|
|
|
45
41
|
| Transport Protocols | Status |
|
|
46
42
|
| ------------------- | :-----------: |
|
|
47
|
-
| **`TCP`** |
|
|
48
|
-
| **`
|
|
49
|
-
| **`
|
|
50
|
-
| **`
|
|
51
|
-
| **`
|
|
52
|
-
| **`
|
|
53
|
-
| **`
|
|
54
|
-
| **`
|
|
55
|
-
| **`
|
|
56
|
-
| **`
|
|
57
|
-
| **`
|
|
58
|
-
| **`
|
|
59
|
-
| **`
|
|
43
|
+
| **`TCP`** | ✅|
|
|
44
|
+
| **`QUIC`** | 🛠️ |
|
|
45
|
+
| **`UDP`** | 🚫 |
|
|
46
|
+
| **`WebSockets`** | ❌ |
|
|
47
|
+
| **`UTP`** | ❌ |
|
|
48
|
+
| **`WebRTC`** | ❌ |
|
|
49
|
+
| **`SCTP`** | ❌ |
|
|
50
|
+
| **`Tor`** | ❌ |
|
|
51
|
+
| **`i2p`** | ❌ |
|
|
52
|
+
| **`cjdns`** | ❌ |
|
|
53
|
+
| **`Bluetooth LE`** | ❌ |
|
|
54
|
+
| **`Audio TP`** | ❌ |
|
|
55
|
+
| **`Zerotier`** | ❌ |
|
|
60
56
|
|
|
61
57
|
| Stream Muxers | Status |
|
|
62
58
|
| ---------------- | :-----------: |
|
|
63
|
-
| **`multiplex`** |
|
|
64
|
-
| **`yamux`** |
|
|
65
|
-
| **`benchmarks`** |
|
|
66
|
-
| **`muxado`** |
|
|
67
|
-
| **`spdystream`** |
|
|
68
|
-
| **`spdy`** |
|
|
69
|
-
| **`http2`** |
|
|
70
|
-
| **`QUIC`** |
|
|
59
|
+
| **`multiplex`** | ✅ |
|
|
60
|
+
| **`yamux`** | 🚫 |
|
|
61
|
+
| **`benchmarks`** | ❌ |
|
|
62
|
+
| **`muxado`** | ❌ |
|
|
63
|
+
| **`spdystream`** | ❌ |
|
|
64
|
+
| **`spdy`** | ❌ |
|
|
65
|
+
| **`http2`** | ❌ |
|
|
66
|
+
| **`QUIC`** | ❌ |
|
|
71
67
|
|
|
72
68
|
| Protocol Muxers | Status |
|
|
73
69
|
| ----------------- | :-----------: |
|
|
74
|
-
| **`multiselect`** |
|
|
70
|
+
| **`multiselect`** | ✅ |
|
|
75
71
|
|
|
76
72
|
| Switch (Swarm) | Status |
|
|
77
73
|
| ------------------ | :-----------: |
|
|
78
|
-
| **`Switch`** |
|
|
79
|
-
| **`Dialer stack`** |
|
|
74
|
+
| **`Switch`** | ✅ |
|
|
75
|
+
| **`Dialer stack`** | ✅ |
|
|
80
76
|
|
|
81
77
|
| Peer Discovery | Status |
|
|
82
78
|
| -------------------- | :--------: |
|
|
83
|
-
| **`bootstrap list`** |
|
|
84
|
-
| **`Kademlia DHT`** |
|
|
85
|
-
| **`mDNS`** |
|
|
86
|
-
| **`PEX`** |
|
|
87
|
-
| **`DNS`** |
|
|
79
|
+
| **`bootstrap list`** | 🚫 |
|
|
80
|
+
| **`Kademlia DHT`** | ❌ |
|
|
81
|
+
| **`mDNS`** | ❌ |
|
|
82
|
+
| **`PEX`** | ❌ |
|
|
83
|
+
| **`DNS`** | ❌ |
|
|
88
84
|
|
|
89
85
|
| Content Routing | Status |
|
|
90
86
|
| ------------------ | :-----------: |
|
|
91
|
-
| **`Kademlia DHT`** |
|
|
92
|
-
| **`floodsub`** |
|
|
93
|
-
| **`gossipsub`** |
|
|
94
|
-
| **`PHT`** |
|
|
87
|
+
| **`Kademlia DHT`** | ❌ |
|
|
88
|
+
| **`floodsub`** | ✅ |
|
|
89
|
+
| **`gossipsub`** | ✅ |
|
|
90
|
+
| **`PHT`** | ❌ |
|
|
95
91
|
|
|
96
92
|
| Peer Routing | Status |
|
|
97
93
|
| ------------------ | :-----------: |
|
|
98
|
-
| **`Kademlia DHT`** |
|
|
99
|
-
| **`floodsub`** |
|
|
100
|
-
| **`gossipsub`** |
|
|
101
|
-
| **`PHT`** |
|
|
94
|
+
| **`Kademlia DHT`** | ❌ |
|
|
95
|
+
| **`floodsub`** | ✅|
|
|
96
|
+
| **`gossipsub`** | ✅ |
|
|
97
|
+
| **`PHT`** | ❌ |
|
|
102
98
|
|
|
103
99
|
| NAT Traversal | Status |
|
|
104
100
|
| ------------------------ | :--------: |
|
|
105
|
-
| **`nat-pmp`** |
|
|
106
|
-
| **`upnp`** |
|
|
107
|
-
| **`ext addr discovery`** |
|
|
108
|
-
| **`STUN-like`** |
|
|
109
|
-
| **`line-switch relay`** |
|
|
110
|
-
| **`pkt-switch relay`** |
|
|
101
|
+
| **`nat-pmp`** | ❌ |
|
|
102
|
+
| **`upnp`** | ❌ |
|
|
103
|
+
| **`ext addr discovery`** | ❌ |
|
|
104
|
+
| **`STUN-like`** | ❌ |
|
|
105
|
+
| **`line-switch relay`** | ❌ |
|
|
106
|
+
| **`pkt-switch relay`** | ❌ |
|
|
111
107
|
|
|
112
108
|
| Exchange | Status |
|
|
113
109
|
| ---------------- | :--------: |
|
|
114
|
-
| **`HTTP`** |
|
|
115
|
-
| **`Bitswap`** |
|
|
116
|
-
| **`Bittorrent`** |
|
|
110
|
+
| **`HTTP`** | ❌ |
|
|
111
|
+
| **`Bitswap`** | ❌ |
|
|
112
|
+
| **`Bittorrent`** | ❌ |
|
|
117
113
|
|
|
118
114
|
| Consensus | Status |
|
|
119
115
|
| -------------- | :--------: |
|
|
120
|
-
| **`Paxos`** |
|
|
121
|
-
| **`Raft`** |
|
|
122
|
-
| **`PBTF`** |
|
|
123
|
-
| **`Nakamoto`** |
|
|
116
|
+
| **`Paxos`** | ❌ |
|
|
117
|
+
| **`Raft`** | ❌ |
|
|
118
|
+
| **`PBTF`** | ❌ |
|
|
119
|
+
| **`Nakamoto`** | ❌ |
|
|
124
120
|
|
|
125
121
|
## Explanation of Basic Two Node Communication
|
|
126
122
|
|
|
@@ -7,15 +7,15 @@ import trio
|
|
|
7
7
|
from libp2p import (
|
|
8
8
|
new_host,
|
|
9
9
|
)
|
|
10
|
+
from libp2p.custom_types import (
|
|
11
|
+
TProtocol,
|
|
12
|
+
)
|
|
10
13
|
from libp2p.network.stream.net_stream_interface import (
|
|
11
14
|
INetStream,
|
|
12
15
|
)
|
|
13
16
|
from libp2p.peer.peerinfo import (
|
|
14
17
|
info_from_p2p_addr,
|
|
15
18
|
)
|
|
16
|
-
from libp2p.typing import (
|
|
17
|
-
TProtocol,
|
|
18
|
-
)
|
|
19
19
|
|
|
20
20
|
PROTOCOL_ID = TProtocol("/chat/1.0.0")
|
|
21
21
|
MAX_READ_LEN = 2**32 - 1
|
|
@@ -54,7 +54,7 @@ async def run(port: int, destination: str) -> None:
|
|
|
54
54
|
|
|
55
55
|
print(
|
|
56
56
|
"Run this from the same folder in another console:\n\n"
|
|
57
|
-
f"
|
|
57
|
+
f"chat-demo -p {int(port) + 1} "
|
|
58
58
|
f"-d /ip4/{localhost_ip}/tcp/{port}/p2p/{host.get_id().pretty()}\n"
|
|
59
59
|
)
|
|
60
60
|
print("Waiting for incoming connection...")
|
|
@@ -9,15 +9,15 @@ from libp2p import (
|
|
|
9
9
|
from libp2p.crypto.secp256k1 import (
|
|
10
10
|
create_new_key_pair,
|
|
11
11
|
)
|
|
12
|
+
from libp2p.custom_types import (
|
|
13
|
+
TProtocol,
|
|
14
|
+
)
|
|
12
15
|
from libp2p.network.stream.net_stream_interface import (
|
|
13
16
|
INetStream,
|
|
14
17
|
)
|
|
15
18
|
from libp2p.peer.peerinfo import (
|
|
16
19
|
info_from_p2p_addr,
|
|
17
20
|
)
|
|
18
|
-
from libp2p.typing import (
|
|
19
|
-
TProtocol,
|
|
20
|
-
)
|
|
21
21
|
|
|
22
22
|
PROTOCOL_ID = TProtocol("/echo/1.0.0")
|
|
23
23
|
|
|
@@ -53,7 +53,7 @@ async def run(port: int, destination: str, seed: int = None) -> None:
|
|
|
53
53
|
|
|
54
54
|
print(
|
|
55
55
|
"Run this from the same folder in another console:\n\n"
|
|
56
|
-
f"
|
|
56
|
+
f"echo-demo -p {int(port) + 1} "
|
|
57
57
|
f"-d /ip4/{localhost_ip}/tcp/{port}/p2p/{host.get_id().pretty()}\n"
|
|
58
58
|
)
|
|
59
59
|
print("Waiting for incoming connections...")
|
|
@@ -6,15 +6,15 @@ import trio
|
|
|
6
6
|
from libp2p import (
|
|
7
7
|
new_host,
|
|
8
8
|
)
|
|
9
|
+
from libp2p.custom_types import (
|
|
10
|
+
TProtocol,
|
|
11
|
+
)
|
|
9
12
|
from libp2p.network.stream.net_stream_interface import (
|
|
10
13
|
INetStream,
|
|
11
14
|
)
|
|
12
15
|
from libp2p.peer.peerinfo import (
|
|
13
16
|
info_from_p2p_addr,
|
|
14
17
|
)
|
|
15
|
-
from libp2p.typing import (
|
|
16
|
-
TProtocol,
|
|
17
|
-
)
|
|
18
18
|
|
|
19
19
|
PING_PROTOCOL_ID = TProtocol("/ipfs/ping/1.0.0")
|
|
20
20
|
PING_LENGTH = 32
|
|
@@ -34,6 +34,7 @@ async def handle_ping(stream: INetStream) -> None:
|
|
|
34
34
|
|
|
35
35
|
except Exception:
|
|
36
36
|
await stream.reset()
|
|
37
|
+
break
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
async def send_ping(stream: INetStream) -> None:
|
|
@@ -64,7 +65,7 @@ async def run(port: int, destination: str) -> None:
|
|
|
64
65
|
|
|
65
66
|
print(
|
|
66
67
|
"Run this from the same folder in another console:\n\n"
|
|
67
|
-
f"
|
|
68
|
+
f"ping-demo -p {int(port) + 1} "
|
|
68
69
|
f"-d /ip4/{localhost_ip}/tcp/{port}/p2p/{host.get_id().pretty()}\n"
|
|
69
70
|
)
|
|
70
71
|
print("Waiting for incoming connection...")
|
|
@@ -6,6 +6,9 @@ from libp2p.crypto.keys import (
|
|
|
6
6
|
from libp2p.crypto.rsa import (
|
|
7
7
|
create_new_key_pair,
|
|
8
8
|
)
|
|
9
|
+
from libp2p.custom_types import (
|
|
10
|
+
TProtocol,
|
|
11
|
+
)
|
|
9
12
|
from libp2p.host.basic_host import (
|
|
10
13
|
BasicHost,
|
|
11
14
|
)
|
|
@@ -52,9 +55,6 @@ from libp2p.transport.typing import (
|
|
|
52
55
|
from libp2p.transport.upgrader import (
|
|
53
56
|
TransportUpgrader,
|
|
54
57
|
)
|
|
55
|
-
from libp2p.typing import (
|
|
56
|
-
TProtocol,
|
|
57
|
-
)
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
def generate_new_rsa_identity() -> KeyPair:
|
|
@@ -2,9 +2,6 @@ from dataclasses import (
|
|
|
2
2
|
dataclass,
|
|
3
3
|
)
|
|
4
4
|
import hmac
|
|
5
|
-
from typing import (
|
|
6
|
-
Tuple,
|
|
7
|
-
)
|
|
8
5
|
|
|
9
6
|
from Crypto.Cipher import (
|
|
10
7
|
AES,
|
|
@@ -66,7 +63,7 @@ class MacAndCipher:
|
|
|
66
63
|
|
|
67
64
|
def initialize_pair(
|
|
68
65
|
cipher_type: str, hash_type: str, secret: bytes
|
|
69
|
-
) ->
|
|
66
|
+
) -> tuple[EncryptionParameters, EncryptionParameters]:
|
|
70
67
|
"""
|
|
71
68
|
Return a pair of ``Keys`` for use in securing a communications channel
|
|
72
69
|
with authenticated encryption derived from the ``secret`` and using the
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from typing import (
|
|
2
2
|
Callable,
|
|
3
|
-
Tuple,
|
|
4
3
|
cast,
|
|
5
4
|
)
|
|
6
5
|
|
|
@@ -22,7 +21,7 @@ SharedKeyGenerator = Callable[[bytes], bytes]
|
|
|
22
21
|
int_bytelen = util.int_bytelen
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
def create_ephemeral_key_pair(curve_type: str) ->
|
|
24
|
+
def create_ephemeral_key_pair(curve_type: str) -> tuple[PublicKey, SharedKeyGenerator]:
|
|
26
25
|
"""Facilitates ECDH key exchange."""
|
|
27
26
|
if curve_type != "P-256":
|
|
28
27
|
raise NotImplementedError()
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
from collections.abc import (
|
|
2
|
+
AsyncIterator,
|
|
3
|
+
Sequence,
|
|
4
|
+
)
|
|
1
5
|
from contextlib import (
|
|
2
6
|
asynccontextmanager,
|
|
3
7
|
)
|
|
4
8
|
import logging
|
|
5
9
|
from typing import (
|
|
6
10
|
TYPE_CHECKING,
|
|
7
|
-
AsyncIterator,
|
|
8
|
-
List,
|
|
9
|
-
Sequence,
|
|
10
11
|
)
|
|
11
12
|
|
|
12
13
|
import multiaddr
|
|
@@ -15,6 +16,10 @@ from libp2p.crypto.keys import (
|
|
|
15
16
|
PrivateKey,
|
|
16
17
|
PublicKey,
|
|
17
18
|
)
|
|
19
|
+
from libp2p.custom_types import (
|
|
20
|
+
StreamHandlerFn,
|
|
21
|
+
TProtocol,
|
|
22
|
+
)
|
|
18
23
|
from libp2p.host.defaults import (
|
|
19
24
|
get_default_protocols,
|
|
20
25
|
)
|
|
@@ -52,10 +57,6 @@ from libp2p.protocol_muxer.multiselect_communicator import (
|
|
|
52
57
|
from libp2p.tools.async_service import (
|
|
53
58
|
background_trio_service,
|
|
54
59
|
)
|
|
55
|
-
from libp2p.typing import (
|
|
56
|
-
StreamHandlerFn,
|
|
57
|
-
TProtocol,
|
|
58
|
-
)
|
|
59
60
|
|
|
60
61
|
from .host_interface import (
|
|
61
62
|
IHost,
|
|
@@ -132,20 +133,20 @@ class BasicHost(IHost):
|
|
|
132
133
|
"""
|
|
133
134
|
return self.multiselect
|
|
134
135
|
|
|
135
|
-
def get_addrs(self) ->
|
|
136
|
+
def get_addrs(self) -> list[multiaddr.Multiaddr]:
|
|
136
137
|
"""
|
|
137
138
|
:return: all the multiaddr addresses this host is listening to
|
|
138
139
|
"""
|
|
139
140
|
# TODO: We don't need "/p2p/{peer_id}" postfix actually.
|
|
140
141
|
p2p_part = multiaddr.Multiaddr(f"/p2p/{self.get_id()!s}")
|
|
141
142
|
|
|
142
|
-
addrs:
|
|
143
|
+
addrs: list[multiaddr.Multiaddr] = []
|
|
143
144
|
for transport in self._network.listeners.values():
|
|
144
145
|
for addr in transport.get_addrs():
|
|
145
146
|
addrs.append(addr.encapsulate(p2p_part))
|
|
146
147
|
return addrs
|
|
147
148
|
|
|
148
|
-
def get_connected_peers(self) ->
|
|
149
|
+
def get_connected_peers(self) -> list[ID]:
|
|
149
150
|
"""
|
|
150
151
|
:return: all the ids of peers this host is currently connected to
|
|
151
152
|
"""
|