3.0.ipv8.messaging.anonymization.caches ======================================= .. py:module:: 3.0.ipv8.messaging.anonymization.caches Classes ------- .. autoapisummary:: 3.0.ipv8.messaging.anonymization.caches.CreateRequestCache 3.0.ipv8.messaging.anonymization.caches.CreatedRequestCache 3.0.ipv8.messaging.anonymization.caches.RetryRequestCache 3.0.ipv8.messaging.anonymization.caches.PingRequestCache 3.0.ipv8.messaging.anonymization.caches.IPRequestCache 3.0.ipv8.messaging.anonymization.caches.RPRequestCache 3.0.ipv8.messaging.anonymization.caches.PeersRequestCache 3.0.ipv8.messaging.anonymization.caches.E2ERequestCache 3.0.ipv8.messaging.anonymization.caches.LinkRequestCache 3.0.ipv8.messaging.anonymization.caches.TestRequestCache Module Contents --------------- .. py:class:: CreateRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, identifier: int, to_circuit_id: int, from_circuit_id: int, peer: 3.0.ipv8.types.Peer, to_peer: 3.0.ipv8.types.Peer) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Used to track outstanding create messages. .. py:attribute:: name :value: 'create' .. py:attribute:: community .. py:attribute:: extend_identifier .. py:attribute:: to_circuit_id .. py:attribute:: from_circuit_id .. py:attribute:: peer .. py:attribute:: to_peer .. py:method:: on_timeout() -> None We don't need to do anything on timeout. .. py:class:: CreatedRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, circuit_id: int, candidate: 3.0.ipv8.types.Peer, candidates: dict[bytes, 3.0.ipv8.types.Peer], timeout: float) Bases: :py:obj:`3.0.ipv8.requestcache.NumberCacheWithName` Used to track outstanding created messages. .. py:attribute:: name :value: 'created' .. py:attribute:: circuit_id .. py:attribute:: candidate .. py:attribute:: candidates .. py:attribute:: timeout .. py:property:: timeout_delay :type: float The configurable timeout that was set. .. py:method:: on_timeout() -> None We don't need to do anything on timeout. .. py:class:: RetryRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: 3.0.ipv8.messaging.anonymization.tunnel.Circuit, candidates: list[bytes] | list[3.0.ipv8.types.Peer], max_tries: int, retry_func: Callable[[3.0.ipv8.messaging.anonymization.tunnel.Circuit, list[bytes], int], None] | Callable[[3.0.ipv8.messaging.anonymization.tunnel.Circuit, list[3.0.ipv8.types.Peer], int], None], timeout: float) Bases: :py:obj:`3.0.ipv8.requestcache.NumberCacheWithName` Used to track adding additional hops to the circuit. .. py:attribute:: name :value: 'retry' .. py:attribute:: community .. py:attribute:: circuit .. py:attribute:: packet_identifier .. py:attribute:: candidates .. py:attribute:: max_tries .. py:attribute:: retry_func .. py:attribute:: timeout .. py:attribute:: logger .. py:property:: timeout_delay :type: float The configurable timeout that was set. .. py:method:: on_timeout() -> None Retry until we run out of candidates. Otherwise, remove the circuit. .. py:class:: PingRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Manage a ping to a peer. .. py:attribute:: name :value: 'ping' .. py:method:: on_timeout() -> None We don't need to do anything on timeout. .. py:class:: IPRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: 3.0.ipv8.messaging.anonymization.tunnel.Circuit) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Manage introduction point establishment. .. py:attribute:: name :value: 'establish-intro' .. py:attribute:: logger .. py:attribute:: circuit .. py:attribute:: community .. py:method:: on_timeout() -> None We remove the circuit if we can't establish an introduction point. .. py:class:: RPRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, rp: 3.0.ipv8.messaging.anonymization.tunnel.RendezvousPoint) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Manage rendezvous point establishment. .. py:attribute:: name :value: 'establish-rendezvous' .. py:attribute:: logger .. py:attribute:: community .. py:attribute:: rp .. py:method:: on_timeout() -> None We remove the circuit if we can't establish a rendezvous point. .. py:class:: PeersRequestCache(community: 3.0.ipv8.messaging.anonymization.hidden_services.HiddenTunnelCommunity, circuit: 3.0.ipv8.messaging.anonymization.tunnel.Circuit, info_hash: bytes, target: 3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint | None) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Request peers for the given swarm (info hash). .. py:attribute:: name :value: 'peers-request' .. py:attribute:: community .. py:attribute:: circuit .. py:attribute:: info_hash .. py:attribute:: target .. py:attribute:: future :type: asyncio.Future[list[3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint]] .. py:method:: on_timeout() -> None We remove the introduction point if we don't get a response. .. py:class:: E2ERequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, info_hash: bytes, hop: 3.0.ipv8.messaging.anonymization.tunnel.Hop, intro_point: 3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Cache to track e2e circuit creation. .. py:attribute:: name :value: 'e2e-request' .. py:attribute:: info_hash .. py:attribute:: hop .. py:attribute:: intro_point .. py:method:: on_timeout() -> None We don't need to do anything on timeout. .. py:class:: LinkRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: 3.0.ipv8.messaging.anonymization.tunnel.Circuit, info_hash: bytes, hs_session_keys: 3.0.ipv8.messaging.anonymization.crypto.SessionKeys) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Cache to track circuit linking. .. py:attribute:: name :value: 'link-request' .. py:attribute:: circuit .. py:attribute:: info_hash .. py:attribute:: hs_session_keys .. py:method:: on_timeout() -> None We don't need to do anything on timeout. .. py:class:: TestRequestCache(community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: 3.0.ipv8.messaging.anonymization.tunnel.Circuit) Bases: :py:obj:`3.0.ipv8.requestcache.RandomNumberCacheWithName` Cache to track circuit speed tests. .. py:attribute:: name :value: 'test-request' .. py:attribute:: circuit .. py:attribute:: ts .. py:attribute:: future :type: asyncio.Future[tuple[bytes, float]] .. py:method:: on_timeout() -> None We don't need to do anything on timeout.