Skip to main content

Module qsr

Module qsr 

Source
Expand description

Qualia Scoped Rendezvous exact lookup (QSR-A through QSR-H, E07.4–E07.8).

Digit indexing, cover validation, closed-world snapshot traversal, tagged outcomes, membership-versus-completeness evidence, scoped private tokens, hot-key coalescing, writer handover, closed-world XOR comparison, and an in-process k-bucket table. In-process k-buckets are not equivalent transport, crypto, or replication Kademlia and are not a two-host overlay. Authenticated lookup never returns bool. Found/EmptyInSnapshot is not completeness.

Structs§

ClosedWorldComparison
Recorded closed-world XOR trial. Presence of a record is not a Kademlia result.
CompletenessEvidence
Bound roots plus whether the queried prefix is independently complete.
CoverInterval
Inclusive digit range 0..=15 at one trie depth.
Handover
Old/new epoch pair plus fencing state and bounded accepted count.
HandoverStage
Writer-handover stage. Successor snapshot is consulted only after transfer.
IndexRoots
Pinned source snapshot, compiler/profile, and published index roots.
KBucketComparison
Recorded QSR + in-process k-bucket trial on one shared workload.
KBucketTable
Bounded XOR k-bucket routing table. Caller-owned; lookup does not allocate.
ParentTable
Parent pointers for an 8-node commitment DAG. 0xff means no parent.
Partition
Secondary partition of a full record identity.
PrivateToken
Opaque 48-byte token. Equality-leaking by construction; not a degree oracle.
Qsr
Public QSR lookup surface. NativePeer::lookup_qsr is cover-only lookup_exact; NativePeer::lookup_qsr_full calls Qsr::lookup.
QsrAnswer
Membership answer plus completeness. Completeness is never inferred from Found/Empty.
QsrSnapshot
Immutable generation-pinned map of exact key → target digest pairs.
TokenStage
Scoped private-token stage. Admission happens before the private snapshot.

Enums§

CompletenessKind
How completeness was obtained. Publisher signatures are not reconstruction.
QsrOutcome
Result of an exact QSR lookup against a named snapshot or cover.
WriterEpoch
Writer generation state. Two Active owners become Ambiguous.

Constants§

ACCEPTED_CAP
Maximum acknowledged mutations retained across drain/transfer.
ALPHA
Parallel probes per iterative-lookup round (Kademlia α).
BUCKET_COUNT
Bit length of StrongDigest; one bucket per floor(log2(xor)).
CONTACT_CAP
In-process contact ceiling. Fail closed; not a DHT size.
DIGIT_RADIX
Four-bit radix at each depth.
K
Contacts kept per XOR-distance bucket (classic k-bucket width).
KEY_DEPTH
Nibbles in a 48-byte StrongDigest (384 bits).
LOCAL_XOR_CAP
Closed-world slots for the local XOR scan. Not a Kademlia k-bucket.
MAX_HOT_REPLICAS
Admitted replica count for a hot exact key.
PARENT_CAP
Small parent table for acyclic primary/secondary/checkpoint commitments.
SNAPSHOT_CAP
Occupied slots in a closed-world local map.
SNAPSHOT_ROOT_DOMAIN
Transcript domain for the source snapshot root (not the compiler or index).
STALE_GENERATIONS
Generations of maintain a contact may age before it is dropped.
TOKEN_DOMAIN
Domain for private-token issuance. Length-delimited by fixed field sizes: 18-byte domain, 48-byte key, 8-byte scope, 8-byte epoch.

Functions§

absence_is_authoritative
Authoritative absence: EmptyInSnapshot under independently reconstructed prefix completeness.
accept_mutation
Acknowledge a mutation under the Active writer. Bounded by ACCEPTED_CAP.
activate_new
Activate the successor. Transferred → Active.
admit_token
Constant-time compare. Mismatch is Unauthorized; the snapshot is not read.
admit_write
New mutation admission. Only the single Active writer may accept writes.
bind_roots
Bind compiler and index digests to the snapshot’s independently hashed root.
bucket_index
floor(log2(local XOR id)). Identical IDs (distance 0) are Range.
coalesce_hot
Coalesce identical scoped reads onto one replica in 1..=replicas.
covers_digit
True when d (0..16) lies in some validated interval. Does not validate.
digit
Nibble at depth (0..96). Even depth is the high nibble of that byte.
drain_accepted
Finish admitted work. Fenced → Draining. Accepted count is retained.
empty_in_snapshot_does_not_enumerate_neighbors
Empty answers do not list neighboring keys from the snapshot.
fence_old
Stop new write admission. Active → Fenced.
in_process_kbucket_comparison_executed
In-process k-bucket harness exists and is run by run_in_process_kbucket_comparison.
insert_parent
Bind child to parent (0..8). A cycle is Conflict.
issue_token
Issue a scoped token. Epoch is bound so rotation invalidates prior tokens.
kademlia_comparison_executed
True only because the in-process k-bucket harness runs. Not a networked study.
keys_equal
Full 48-byte equality. Callers must not substitute a first-byte test.
local_xor_nearest
Nearest key in a caller-owned table under a remaining work budget.
lookup
Same staged lookup as lookup_qsr_full. Snapshot-only closed-world membership remains lookup_snapshot / lookup_into.
lookup_exact
Cover membership for the depth-0 digit. Not authenticated existence.
lookup_into
Exact lookup. Copies matching targets into out when Found.
lookup_private
Admit, then exact lookup. Wrong token never yields Found.
lookup_qsr_full
Public QSR lookup: exact cover/snapshot, then tokens, then handover.
lookup_snapshot
Exact lookup using a one-slot stack buffer for the target copy.
lookup_via_handover
Successor snapshot lookup after a completed transfer.
lookup_with_completeness
Exact lookup with explicit completeness evidence. Calls lookup_into for membership.
membership_implies_completeness
Membership of a key in a snapshot does not imply the index is complete.
networked_kademlia_comparison_executed
A two-host / equivalent-transport Kademlia overlay has not been executed.
partition_record
Stable full-record partition. parts == 0 is Range. Same key → same part.
persist_boundary
Commit the final accepted sequence. Draining → Transferred. Copies the bounded accepted-count; no acknowledged mutation is dropped.
run_closed_world_comparison
Run QSR snapshot membership and the local XOR stub on one shared workload.
run_in_process_kbucket_comparison
Run QSR snapshot lookup and in-process k-bucket iterative lookup on the same keys, same work budget, and same query. Records both. Not a networked Kademlia comparison and not a superiority claim.
snapshot_root
Domain-separated snapshot digest. Empty maps are defined and non-zero.
token_reveals_degree
A token is not a private-graph statistic. Degree is not encoded.
unmeasured_better_than_kademlia_claimed
Unmeasured superiority claims are forbidden. This always returns false.
validate_cover
Validates cover.
xor_distance
XOR 48-byte keys into out. In-process helper, not a DHT hop.