latest.ipv8.peerdiscovery.discovery
Module Contents
Classes
Strategy for discovering peers in a network. |
|
Walk randomly through the network. |
|
Walk through the network by using edges. |
Attributes
- latest.ipv8.peerdiscovery.discovery._OT
- class latest.ipv8.peerdiscovery.discovery.DiscoveryStrategy(overlay: _OT)
Bases:
Generic
[_OT
]Strategy for discovering peers in a network.
- class latest.ipv8.peerdiscovery.discovery.RandomWalk(overlay: latest.ipv8.types.Overlay, timeout: float = 3.0, window_size: int = 5, reset_chance: int = 50, target_interval: int = 0)
Bases:
DiscoveryStrategy
[latest.ipv8.types.Overlay
]Walk randomly through the network.
- class latest.ipv8.peerdiscovery.discovery.EdgeWalk(overlay: latest.ipv8.types.Overlay, edge_length: int = 4, neighborhood_size: int = 6, edge_timeout: float = 3.0)
Bases:
DiscoveryStrategy
[latest.ipv8.types.Overlay
]Walk through the network by using edges.
This will perform a depth-first search in the network starting from your direct neighborhood. When a certain depth is reached, we teleport home and start again from our neighborhood.