UUIDv7
The time-ordered UUID version (RFC 9562) of Truestamp's record ids, items, blocks, teams and users among them, with four exceptions such as an API key's random UUIDv4; its leading 48-bit millisecond time sorts values by generation time.
Overview
UUIDv7 is the identifier format for Truestamp’s records, with four exceptions: an API key, whose id is a random UUIDv4; a sign-in token, keyed by its JWT id; and a knowledge-base concept and each of its sections, keyed by their path. The UUIDv7 records are items, blocks, teams, users, entropy observations, and the rest. UUIDv7 is the time-ordered UUID variant standardized in RFC 9562, written in the familiar 36-character hyphenated form (for example 018e90d8-06e8-7f9f-bfd7-6730ba98a51b), with a 48-bit millisecond timestamp at the front so values sort lexicographically in generation order; generation keeps IDs monotonic even within the same millisecond. An id is stored as its raw 16 bytes in a Postgres uuid column. An item also has an item code, a short name computed from its item hash, which is not a second id. See UUIDv7 identifiers.
Citations
- RFC 9562: Universally Unique IDentifiers (UUIDs). Defines UUIDv7, the time-ordered UUID variant.