Independent verification toolkit for ProofCodec proof bundles
Project description
proofcodec-verify
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.
What This Package Does
- Decode ProofCodec v18 binary residual files
- Verify proof bundle integrity (hash checks, manifest validation)
- Compute baselines (Huffman, entropy, fixed-width) to validate compression ratios
- Inspect bundle contents without needing the proprietary encoder
What This Package Does NOT Do
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.
Install
pip install proofcodec-verify
For chess endgame verification (optional):
pip install proofcodec-verify[chess]
Quick Start
Verify a Proof Bundle
proofcodec-verify bundle path/to/kqvk_proof/
Proof Bundle Verification: VERIFIED
==================================================
Endgame: KQvK
Version: v15
Created: 2026-02-15T12:00:00Z
Hash Verification:
Model hash: PASS
Residual hash: PASS
Manifest hash: PASS
Equivalence:
Status: EXACT
Total positions: 368,452
Residual entries: 0
Result: VERIFIED
Decode a Residual File
proofcodec-verify decode results/v20/KQvKR/residual.v18
Verify Compression Claims
# KQvK: 200,896 losses, 23,048 draws, 144,508 wins
proofcodec-verify baselines 144508 23048 200896 --model-bits 219
ProofCodec Baseline Computation
==================================================
Positions: 368,452 (W=144,508, D=23,048, L=200,896)
Baselines:
A (2-bit fixed): 736,904 bits (2.000 bpp)
B0 (Huffman): 536,008 bits (1.455 bpp)
Model bits: 219
ratio_B: 0.000409
Beats Huffman: YES
Python API
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))
Codec Format
The v18 binary residual format uses:
- 3 index encodings per block (MDL-selected): DELTA_GAPS, ENUM_RANK, BITMAP
- Conditional 1-bit labels: corrections need only 1 bit (2 remaining classes)
- Leaf-local blocking: each decision tree leaf is a separate context
- CRC32 integrity: per-leaf record stream verification
Full specification: CODEC_SPEC.md (CC-BY-4.0)
How Verification Works
ProofCodec proof bundles are self-verifying:
- The decision tree predicts Win/Draw/Loss for every position
- The residual file corrects every mismatch between tree and ground truth
- The manifest contains SHA-256 hashes of both artifacts
proofcodec-verifychecks hashes, decodes the residual, and validates metrics
This means you can verify compression claims without access to the encoder, the training data, or any proprietary software.
License
MIT — verify freely, no strings attached.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proofcodec_verify-0.1.0.tar.gz.
File metadata
- Download URL: proofcodec_verify-0.1.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b44d5de4bcae0e1dc5db2ec89b25dd2b5cc859d681222f473849135f8ea9088b
|
|
| MD5 |
2be225d863cd95883a68e3332d2a4d0b
|
|
| BLAKE2b-256 |
1d0e69070a9e64669dba1b5483100afae9006fff73b6d480369eade11558b25d
|
Provenance
The following attestation bundles were made for proofcodec_verify-0.1.0.tar.gz:
Publisher:
publish.yml on ProofCodec/proofcodec-verify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proofcodec_verify-0.1.0.tar.gz -
Subject digest:
b44d5de4bcae0e1dc5db2ec89b25dd2b5cc859d681222f473849135f8ea9088b - Sigstore transparency entry: 1017856076
- Sigstore integration time:
-
Permalink:
ProofCodec/proofcodec-verify@b90209ee3e6e18b4f96ab947db43309cb357b102 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ProofCodec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b90209ee3e6e18b4f96ab947db43309cb357b102 -
Trigger Event:
push
-
Statement type:
File details
Details for the file proofcodec_verify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: proofcodec_verify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7932774c7c62ec7cba92de1ab9cf72ced62036d3ed1b392b28c9ad2ad4c9734
|
|
| MD5 |
50da26652ba86d43a374f920ce58aeb9
|
|
| BLAKE2b-256 |
2de886b151df8232d2e6b0274b1f478c2439392a302bb69738129f45bb826049
|
Provenance
The following attestation bundles were made for proofcodec_verify-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ProofCodec/proofcodec-verify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proofcodec_verify-0.1.0-py3-none-any.whl -
Subject digest:
c7932774c7c62ec7cba92de1ab9cf72ced62036d3ed1b392b28c9ad2ad4c9734 - Sigstore transparency entry: 1017856085
- Sigstore integration time:
-
Permalink:
ProofCodec/proofcodec-verify@b90209ee3e6e18b4f96ab947db43309cb357b102 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ProofCodec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b90209ee3e6e18b4f96ab947db43309cb357b102 -
Trigger Event:
push
-
Statement type: