orthogonal-cuckoo-filter-mesh

Crates.ioorthogonal-cuckoo-filter-mesh
lib.rsorthogonal-cuckoo-filter-mesh
version0.1.0
created_at2025-12-27 12:18:50.07656+00
updated_at2025-12-27 12:18:50.07656+00
descriptionA distributed consensus layer for uncorrelated false positives using orthogonal cuckoo filters.
homepage
repositoryhttps://github.com/transilluminate/expandable-cuckoo
max_upload_size
id2007124
size19,176
Adrian Robinson (transilluminate)

documentation

README

Filter Mesh (Orthogonal Cuckoo)

A distributed consensus layer built on top of expandable-cuckoo-filter.

The Power of Orthogonality

In standard probabilistic systems, if one node has a false positive (FP) for an item, other nodes are likely to have the same FP if they use the same hashing strategy.

This system is different. By using unique seeds per peer, false positives become uncorrelated. This allows for exponential reduction in global FP rates through simple consensus.

  • 1 Filter: ~3% FP rate.
  • 3 Filters: ~0.0027% FP rate.
  • 5 Filters: ~1e-8 FP rate (1 in 100 million).

Features

  • Robust Contains: Only returns true if all peers in the mesh agree the item is present.
  • Heterogeneous Support: Peers can have different initial capacities and expansion levels—the mesh remains robust and orthogonal.
  • Dynamic Mesh: Add or remove peer filters on the fly.

Usage

use orthogonal_cuckoo_filter_mesh::OrthogonalCuckooFilterMesh;
use expandable_cuckoo_filter::ExpandableCuckooFilter;

let mesh = OrthogonalCuckooFilterMesh::new();

// Add peers
let f1 = ExpandableCuckooFilter::new("peer-a", 1000);
f1.insert("shared-secret");
mesh.add_peer(f1);

let f2 = ExpandableCuckooFilter::new("peer-b", 1000);
f2.insert("shared-secret");
mesh.add_peer(f2);

// Robust consensus check
assert!(mesh.robust_contains("shared-secret"));

// An item present in peer-a but NOT peer-b will return false
assert!(!mesh.robust_contains("unique-to-a"));

Utility

This system is ideal for distributed gossip protocols, global membership checks, or any scenario where you need to verify data presence across a network with extreme confidence while keeping the transmitted filter sizes small.

Commit count: 0

cargo fmt