Expand description

Data types representing the structure of spacetime and the various ways space and time can be quantized.

Kitsune deals with spacetime coordinates on three different levels:

Absolute coordinates

At the absolute level, space coordinates are represented by u32 (via DhtLocation), and time coordinates by i64 (via Timestamp). The timestamp and DHT location of each op is measured in absolute coordinates, as well as the DHT locations of agents

Quantized coordinates

Some data types represent quantized space/time. The Topology for a network determines the quantum size for both the time and space dimensions, meaning that any absolute coordinate will always be a multiple of this quantum size. Hence, quantized coordinates are expressed in terms of multiples of the quantum size.

SpaceQuantum and TimeQuantum express quantized coordinates. They refer to a specific quantum-sized portion of space/time.

Note that any transformation between Absolute and Quantized coordinates requires the information contained in the Topology of the network.

Segment coordinates (or, Exponential coordinates)

The spacetime we are interested in has dimensions that are not only quantized, but are also hierarchically organized into non-overlapping segments. When expressing segments of space larger than a single quantum, we only ever talk about groupings of 2, 4, 8, 16, etc. quanta at a time, and these groupings are always aligned so that no two segments of a given size ever overlap. Moreover, any two segments of different sizes either overlap completely (one is a strict superset of the other), or they don’t overlap at all (they are disjoint sets).

Segment coordinates are expressed in terms of:

  • a power (exponent of 2) which determines the length of the segment expressed as a Quantized coordinate
  • an offset, which is a multiple of the length of this segment to determine the “left” edge’s distance from the origin as a Quantized coordinate

You must still convert from these Quantized coordinates to get to the actual Absolute coordinates.

The pairing of any SpaceSegment with any TimeSegment forms a Region, a bounded rectangle of spacetime.

Structs

  • 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.
  • 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
  • Topology defines the structure of spacetime, in particular how space and time are quantized.

Constants

Traits

  • 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:
  • A quantum in the physical sense: the smallest possible amount of something. Here, we are talking about Time and Space quanta.

Type Aliases