Crate kitsune_p2p_dht_arc
source · [−]Structs
This represents the range of values covered by an arc
Represents how much of a dht arc is held center_loc is where the hash is. The center_loc is the center of the arc The half length is the length of items held from the center in both directions half_length 0 means nothing is held half_length 1 means just the center_loc is held half_length n where n > 1 will hold those positions out half_length u32::MAX / 2 + 1 covers all positions on either side of center_loc. Imagine an bidirectional array:
When sampling a section of the arc we can
collect all the other peer DhtArc
s into a
DhtBucket.
All the peer arcs arc contained within the buckets filter arc.
The filter is this peer’s “view” into their section of the dht arc.
Type for representing a location that can wrap around a u32 dht arc
The average density of peers at a location in the u32 space.
Enums
An alternate implementation of ArcRange
Constants
The maximum you can hold either side of the hash location is half the circle. This is half of the furthest index you can hold 1 is added for rounding 1 more is added to represent the middle point of an odd length array
The minimum number of peers before sharding can begin. This factors in the expected uptime to reach the redundancy target.
The minimum number of peers we can consider acceptable to see in our arc during testing.