Initialize repository snapshot
This commit is contained in:
81
testvectors/proofbundle/README.md
Normal file
81
testvectors/proofbundle/README.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# VaultMesh ProofBundle Conformance Test Pack
|
||||
|
||||
This directory contains **example ProofBundle JSON files** used to validate
|
||||
implementations of the `vm_verify_proofbundle.py` verifier.
|
||||
|
||||
It is designed for **air-gapped, offline verification**: you can unpack this
|
||||
folder on a laptop with Python installed and run the tests locally.
|
||||
|
||||
## 1. Contents
|
||||
|
||||
- `proofbundle-valid.json`
|
||||
A known-good ProofBundle with a contiguous hash chain.
|
||||
The verifier MUST report success.
|
||||
|
||||
- `proofbundle-tampered-body.json`
|
||||
A bundle where the body of one receipt was modified **without**
|
||||
updating its `root_hash`.
|
||||
The verifier MUST detect a hash mismatch.
|
||||
|
||||
- `proofbundle-tampered-root.json`
|
||||
A bundle where a receipt's `root_hash` is incorrect.
|
||||
The verifier MUST detect a hash mismatch.
|
||||
|
||||
- `proofbundle-broken-chain.json`
|
||||
A bundle where a `previous_hash` does not match the prior receipt's
|
||||
`root_hash`.
|
||||
The verifier MUST report a broken chain.
|
||||
|
||||
## 2. Prerequisites
|
||||
|
||||
- Python **3.10+**
|
||||
- The `blake3` package:
|
||||
|
||||
```bash
|
||||
pip install blake3
|
||||
```
|
||||
|
||||
- The verifier script on your machine:
|
||||
|
||||
```
|
||||
vm_verify_proofbundle.py
|
||||
```
|
||||
|
||||
(From the VaultMesh distribution under `burocrat/app/tools/`.)
|
||||
|
||||
## 3. How to run
|
||||
|
||||
From this directory:
|
||||
|
||||
```bash
|
||||
python3 vm_verify_proofbundle.py proofbundle-valid.json
|
||||
python3 vm_verify_proofbundle.py proofbundle-tampered-body.json
|
||||
python3 vm_verify_proofbundle.py proofbundle-tampered-root.json
|
||||
python3 vm_verify_proofbundle.py proofbundle-broken-chain.json
|
||||
```
|
||||
|
||||
## 4. Expected results
|
||||
|
||||
| File | Expected Exit | Expected Outcome |
|
||||
|------|---------------|------------------|
|
||||
| `proofbundle-valid.json` | 0 | OK - chain is contiguous and valid |
|
||||
| `proofbundle-tampered-body.json` | 1 | HASH_MISMATCH detected |
|
||||
| `proofbundle-tampered-root.json` | 1 | HASH_MISMATCH detected |
|
||||
| `proofbundle-broken-chain.json` | 1 | BROKEN_CHAIN or equivalent error |
|
||||
|
||||
Exact wording of error messages MAY vary across implementations, but:
|
||||
|
||||
- Any hash mismatch MUST cause a non-zero exit code.
|
||||
- Any broken chain MUST cause a non-zero exit code.
|
||||
|
||||
## 5. Specification Reference
|
||||
|
||||
For the formal, normative definition of ProofBundle and verification rules, see:
|
||||
|
||||
- `VAULTMESH-PROOFBUNDLE-SPEC.md` (Conformance Tests section)
|
||||
- `VAULTMESH-STANDARDS-INDEX.md` (for version matrix and related artifacts)
|
||||
|
||||
---
|
||||
|
||||
_VaultMesh ProofBundle Conformance Test Pack v1.0_
|
||||
_Sovereign Infrastructure for the Digital Age_
|
||||
Reference in New Issue
Block a user