| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Independent verification toolkit for ProofCodec proof bundles.
ProofCodec compresses deterministic policy tables (WAF rules, DNS blocklists, routing tables, rate-limit tiers) with mathematical proof of correctness. This MIT-licensed package lets you independently verify those claims — no trust required.
| Domain | Use Case | Positions | ratio_B | Compression | Verified |
|---|---|---|---|---|---|
| IP-REGION | /24 routing tables | 16.7M | 0.335 | 3.0x | Lossless |
| CA-REACH | Rule 110 reachability | 1.0M | 0.242 | 4.1x | Lossless |
| RATE-LIMIT | API gateway tiers | 33.5M | 0.646 | 1.5x | Lossless |
| Chess (21 endgames) | Endgame tablebases | 277M+ | 0.138 avg | 7.2x avg | Exhaustive |
| ADD-CARRY (12-bit) | Binary addition | 16.7M | 0.743 | 1.3x | Lossless |
Full results in BENCHMARK.csv
This package contains no encoding logic. The ProofCodec encoder is proprietary and available via commercial license. This separation is intentional: you can verify every claim we make without needing to trust our software.
pip install proofcodec-verifyFor chess endgame verification (optional):
pip install proofcodec-verify[chess]# IP-REGION: 16.7M /24 blocks across 8 geographic regions
# Verify the Huffman baseline that ProofCodec beats
proofcodec-verify baselines 0 0 0 --counts 2096853,2095619,2097152,2096014,2095987,2095834,2098022,2097735 --model-bits 16883617proofcodec-verify bundle path/to/ip_region_proof/Proof Bundle Verification: VERIFIED ================================================== Endgame: ip_region_v24 Version: v18.2 Created: Hash Verification: Model hash: PASS (not distributed) Residual hash: PASS Manifest hash: PASS Equivalence: Status: 27,392 mismatches Total positions: 16,777,216 Result: VERIFIED
proofcodec-verify decode path/to/residual.v18Pre-built proof bundles are available on GitHub Releases:
# Download and verify a bundle
gh release download v0.1.0 -R ProofCodec/proofcodec-verify -p 'ca_reach_proof.tar.gz'
mkdir ca_reach_proof && tar xzf ca_reach_proof.tar.gz -C ca_reach_proof/
proofcodec-verify bundle ca_reach_proof/Available bundles: ip_region_proof, rate_limit_proof, ca_reach_proof, add_carry_n12_proof, kqvk_proof
from proofcodec_verify import (
V18ResidualFile,
compute_all_baselines,
verify_bundle,
ProofBundle,
format_verification_report,
)
# Decode residual file
residual = V18ResidualFile.from_file("residual.v18")
print(residual.summary())
# Build lookup cache for O(1) position queries
cache = residual.build_lookup_cache()
# Compute baselines
baselines = compute_all_baselines({-1: 200896, 0: 23048, 1: 144508})
print(f"Huffman baseline: {baselines.bits_B0:,} bits")
print(f"ratio_B with 219 model bits: {baselines.ratio_B(219):.6f}")
# Verify bundle
result = verify_bundle("path/to/bundle")
bundle = ProofBundle.load("path/to/bundle")
print(format_verification_report(result, bundle.manifest))A full JS port of the decode-only codec is available in js/:
cd js && npm install && npm testimport { FlatTree, parseResidualFile, buildLookupCache } from '@proofcodec/verify';
// Tree inference
const tree = new FlatTree(modelJson);
const label = tree.predict(features);
// Residual decoding
const file = parseResidualFile(residualBuffer);
const cache = buildLookupCache(file);A Rust-based WASM decoder for residual files is available in wasm/:
cd wasm && bash build.sh # Produces proofcodec_verify.wasm (~39 KB)const { instance } = await WebAssembly.instantiate(wasmBytes);
const { alloc, load_residual, lookup } = instance.exports;
// Load .v18 file into WASM memory
const ptr = alloc(residualBytes.length);
new Uint8Array(instance.exports.memory.buffer).set(residualBytes, ptr);
load_residual(ptr, residualBytes.length);
// Query corrections (tree inference stays in JS)
const correction = lookup(leafId, blockId, idxInBlock);
// correction === -128 means no correction; otherwise it's the labelThe v18 binary residual format uses:
Full specification: CODEC_SPEC.md (CC-BY-4.0)
ProofCodec proof bundles are self-verifying:
The decision tree model is not distributed in public proof bundles to protect intellectual property. Verification confirms manifest integrity and residual correctness without requiring the model — the published hashes and residual data are sufficient to validate all compression claims.
MIT — verify freely, no strings attached.
| Back | FazBrowse Home | New Git URL |