latest.ipv8.messaging.anonymization.caches

Module Contents

Classes

CreateRequestCache

Used to track outstanding create messages.

CreatedRequestCache

Used to track outstanding created messages.

RetryRequestCache

Used to track adding additional hops to the circuit.

PingRequestCache

Manage a ping to a peer.

IPRequestCache

Manage introduction point establishment.

RPRequestCache

Manage rendezvous point establishment.

PeersRequestCache

Request peers for the given swarm (info hash).

E2ERequestCache

Cache to track e2e circuit creation.

LinkRequestCache

Cache to track circuit linking.

TestRequestCache

Cache to track circuit speed tests.

class latest.ipv8.messaging.anonymization.caches.CreateRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, identifier: int, to_circuit_id: int, from_circuit_id: int, peer: latest.ipv8.types.Peer, to_peer: latest.ipv8.types.Peer)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Used to track outstanding create messages.

name = 'create'
on_timeout() None

We don’t need to do anything on timeout.

class latest.ipv8.messaging.anonymization.caches.CreatedRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, circuit_id: int, candidate: latest.ipv8.types.Peer, candidates: dict[bytes, latest.ipv8.types.Peer], timeout: float)

Bases: latest.ipv8.requestcache.NumberCacheWithName

Used to track outstanding created messages.

property timeout_delay: float

The configurable timeout that was set.

name = 'created'
on_timeout() None

We don’t need to do anything on timeout.

class latest.ipv8.messaging.anonymization.caches.RetryRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: latest.ipv8.messaging.anonymization.tunnel.Circuit, candidates: list[bytes] | list[latest.ipv8.types.Peer], max_tries: int, retry_func: Callable[[latest.ipv8.messaging.anonymization.tunnel.Circuit, list[bytes], int], None] | Callable[[latest.ipv8.messaging.anonymization.tunnel.Circuit, list[latest.ipv8.types.Peer], int], None], timeout: float)

Bases: latest.ipv8.requestcache.NumberCacheWithName

Used to track adding additional hops to the circuit.

property timeout_delay: float

The configurable timeout that was set.

name = 'retry'
on_timeout() None

Retry until we run out of candidates. Otherwise, remove the circuit.

class latest.ipv8.messaging.anonymization.caches.PingRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Manage a ping to a peer.

name = 'ping'
on_timeout() None

We don’t need to do anything on timeout.

class latest.ipv8.messaging.anonymization.caches.IPRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: latest.ipv8.messaging.anonymization.tunnel.Circuit)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Manage introduction point establishment.

name = 'establish-intro'
on_timeout() None

We remove the circuit if we can’t establish an introduction point.

class latest.ipv8.messaging.anonymization.caches.RPRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, rp: latest.ipv8.messaging.anonymization.tunnel.RendezvousPoint)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Manage rendezvous point establishment.

name = 'establish-rendezvous'
on_timeout() None

We remove the circuit if we can’t establish a rendezvous point.

class latest.ipv8.messaging.anonymization.caches.PeersRequestCache(community: latest.ipv8.messaging.anonymization.hidden_services.HiddenTunnelCommunity, circuit: latest.ipv8.messaging.anonymization.tunnel.Circuit, info_hash: bytes, target: latest.ipv8.messaging.anonymization.tunnel.IntroductionPoint | None)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Request peers for the given swarm (info hash).

name = 'peers-request'
on_timeout() None

We remove the introduction point if we don’t get a response.

class latest.ipv8.messaging.anonymization.caches.E2ERequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, info_hash: bytes, hop: latest.ipv8.messaging.anonymization.tunnel.Hop, intro_point: latest.ipv8.messaging.anonymization.tunnel.IntroductionPoint)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Cache to track e2e circuit creation.

name = 'e2e-request'
on_timeout() None

We don’t need to do anything on timeout.

class latest.ipv8.messaging.anonymization.caches.LinkRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: latest.ipv8.messaging.anonymization.tunnel.Circuit, info_hash: bytes, hs_session_keys: latest.ipv8.messaging.anonymization.crypto.SessionKeys)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Cache to track circuit linking.

name = 'link-request'
on_timeout() None

We don’t need to do anything on timeout.

class latest.ipv8.messaging.anonymization.caches.TestRequestCache(community: latest.ipv8.messaging.anonymization.community.TunnelCommunity, circuit: latest.ipv8.messaging.anonymization.tunnel.Circuit)

Bases: latest.ipv8.requestcache.RandomNumberCacheWithName

Cache to track circuit speed tests.

name = 'test-request'
on_timeout() None

We don’t need to do anything on timeout.