A decentralized routing model combining gossip-based membership convergence, extremal coordinate embedding, and XOR-based direct routing.
CECR is a hybrid routing system designed for peer-to-peer networks that:
- Avoids full-mesh connectivity
- Maintains stable routing under churn
- Requires no central authority
- Converges using gossip alone
It combines three mechanisms:
- Membership Convergence via gossip
- Extremal Coordinate Embedding using global min/max
- Hybrid Routing using:
- normalized coordinate proximity
- XOR distance (Kademlia-style)
Let the global peer set be:
S = { id₁, id₂, ..., idₙ }
Where each id is a fixed-width identifier (e.g. SHA-1 hash).
Define:
m = min(S) M = max(S) N = |S|
Constraints:
M > m
N ≥ 2
Each peer is mapped into a normalized 1D coordinate space:
p(i) = (i - m) / (M - m)
Range:
0 ≤ p(i) ≤ 1
Distance between peers:
d_ratio(i, j) = |p(i) - p(j)| = |i - j| / (M - m)
Define XOR distance:
d_xor(i, j) = i XOR j
Routing decision:
next_hop = argmin_k (k XOR target)
Peer set:
S = set of peer IDs
Canonical hash:
H(S) = Hash(sort(S))
Peers converge to:
m = min(S)
M = max(S)
N = |S|
Fan-out:
f(N) = ceil(log2(N))
Between membership changes:
p(i) is constant
Only changes when:
- new global min/max joins
- existing min/max leaves
Using stale extrema:
p̃(i) = (i - m̃) / (M̃ - m̃)
Error is bounded and small:
|p̃(i) - p(i)| ≤ ε
Local routing:
minimize d_ratio(i, target)
Global routing:
minimize d_xor(i, target)
- Decentralized
- Convergent
- Stable
- Scalable (O(log N))
- Fault tolerant
CECR creates a shared coordinate system over a dynamic peer set while preserving routing correctness via XOR distance.