Expand description

Common exports

Structs§

  • The hash of an Agent
  • A quantized DHT arc.
  • A collection of ArqBounds. All bounds are guaranteed to be quantized to the same power (the lowest common power).
  • “Arq Resizing Strategy”. Defines all parameters necessary to run the arq resizing algorithm.
  • Defines the quantization of a dimension of spacetime.
  • Node-specific parameters for gossip. While the Topology must be the same for every node in a network, each node is free to choose its own GossipParams.
  • Type for representing a location that can wrap around a u32 dht arc
  • Configure settings for arc storage.
  • The hash of an Op
  • The Quantized PeerView
  • Statistics about the power levels of all arqs in a view. Used to make inferences about what your neighbors are up to.
  • The coordinates defining the Region, along with the calculated RegionData
  • A region specified in absolute coords, rather than quantum coords. This type should only be used in the host, which deals in absolute coords. Kitsune itself should only use RegionCoords to ensure proper quantum alignment.
  • A compact representation of a set of RegionCoords. The TelescopingTimes generates all relevant TimeSegments, and the SpaceSegments are implied by the [ArqBoundsSet].
  • The cross product of a space segment and at time segment forms a Region. Hence, these two segments are the coordinates which define a Region of spacetime.
  • The pertinent data that we care about for each Region. This is what gets sent over gossip so that nodes can discover which Regions are different between them.
  • Tuple-based representation of RegionData, used for sending more compact wire messages
  • The hash of a Region, which is the XOR of all OpHashes contained in this region.
  • Implementation for the compact LTCS region set format which gets sent over the wire. The coordinates for the regions are specified by a few values. The data to match the coordinates are specified in a 2D vector which must correspond to the generated coordinates.
  • Any interval in space or time is represented by a node in a tree, so our way of describing intervals uses tree coordinates as well: The length of an interval is 2^(power), and the position of its left edge is at (offset * length).
  • An Offset in space.
  • Represents some particular quantum area of space. The actual DhtLocation that this coordinate corresponds to depends upon the space quantum size specified in the Topology
  • A SpaceQuantum and a TimeQuantum form a quantum of spacetime
  • A type which generates a sequence of exponentially expanding TimeSegments, with the smallest possible segment covering the most recent time, and larger segments as we go further back in time.
  • An Offset in time.
  • Represents some particular quantum area of time . The actual Timestamp that this coordinate corresponds to depends upon the time quantum size specified in the Topology
  • A microsecond-precision UTC timestamp for use in Holochain’s actions.
  • Topology defines the structure of spacetime, in particular how space and time are quantized.
  • A summary of what happened while updating an Arq

Enums§

  • Instructions to clamp all arqs to a certain size, regardless of network conditions. This allows the user to either be the ultimate freeloader, or the ultimate benefactor.
  • A Strategy for generating PeerViews. The enum allows us to add new strategies over time.
  • A “view” of the peers in a neighborhood. The view consists of a few observations about the distribution of peers within a particular arc, used to make inferences about the rest of the (out-of-view) DHT, ultimately enabling the calculation of the target arc size for the agent who has this View.
  • The generic definition of a set of Regions. The current representation is very specific to our current algorithm, but this is an enum to make room for a more generic representation, e.g. a simple Vec<Region>, if we want a more intricate algorithm later.

Constants§

  • The constant size in bytes of a region, used for calculating bandwidth usage during gossip. All regions require the same number of bytes.
  • Quantum time used in the standard topology

Traits§

  • All methods involved in accessing the op store, to be implemented by the host.
  • All methods involved in accessing the peer store, to be implemented by the host.
  • Represents the start point or “left edge” of an Arq.
  • Represents all methods implemented by the host.
  • Represents all methods implemented by the host.
  • An Offset represents the position of the left edge of some Segment. Offsets must be paired with a power to map to quantum coordinates. The absolute DhtLocation of the offset is determined by the “power” of its context, and topology of the space, by:
  • Everything that Kitsune needs to know about an Op. Intended to be implemented by the host.
  • A quantum in the physical sense: the smallest possible amount of something. Here, we are talking about Time and Space quanta.
  • The constraints necessary for any RegionData

Functions§

  • The actual coverage provided by these peers. Assumes that this is the entire view of the DHT, all peers are accounted for here.
  • Given a center and a length, give Arq which matches most closely given the provided strategy
  • Take bitwise XOR of each element of both arrays
  • Get a fake hash, for testing only.
  • Get the 32 byte slice of a larger slice representing hash data
  • Calculate whether a given combination of power and count corresponds to full DHT coverage.
  • Convenience method for taking the power of 2 in u32
  • Convenience method for taking the power of 2 in f64
  • Calculate the unique pairing of power and count implied by a given length and max number of chunks. Gives the nearest value that satisfies the constraints, but may not be exact.
  • Calculate the highest power and lowest count such that the given length is represented exactly. If the length is not representable even at the quantum level (power==0), return None.
  • Print ascii for arq bounds
  • Print a collection of arqs
  • Take bitwise XOR of each element of both slices

Type Aliases§