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_
|
||||
80
testvectors/proofbundle/proofbundle-broken-chain.json
Normal file
80
testvectors/proofbundle/proofbundle-broken-chain.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"actor": {
|
||||
"did": "did:vm:human:test",
|
||||
"display_name": "Test User",
|
||||
"role": "auditor"
|
||||
},
|
||||
"bundle_id": "pb-test-broken-chain",
|
||||
"chain": {
|
||||
"end": {
|
||||
"root_hash": "blake3:66a2cca1d65c2fa7f89b6b7e4763dc1c8d4a248ed619882e8c8ad3077ae73363",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
},
|
||||
"length": 3,
|
||||
"ok": true,
|
||||
"receipts": [
|
||||
{
|
||||
"previous_hash": null,
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:badcafebadcafebadcafebadcafebad0",
|
||||
"root_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"timestamp": "2025-12-06T15:00:00.000Z",
|
||||
"type": "test_event_2"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"root_hash": "blake3:66a2cca1d65c2fa7f89b6b7e4763dc1c8d4a248ed619882e8c8ad3077ae73363",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
}
|
||||
],
|
||||
"start": {
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
}
|
||||
},
|
||||
"document": {
|
||||
"category": "Testing",
|
||||
"doc_id": "Test Document",
|
||||
"filename": "test.docx"
|
||||
},
|
||||
"generated_at": "2025-12-06T17:00:00.000Z",
|
||||
"guardian_anchor": {
|
||||
"anchor_by": "did:vm:guardian:test",
|
||||
"anchor_epoch": null,
|
||||
"anchor_id": "anchor-test",
|
||||
"anchor_timestamp": null,
|
||||
"root_hash": null,
|
||||
"scroll_roots": {}
|
||||
},
|
||||
"meta": {
|
||||
"node": "test",
|
||||
"requested_by_session": "test-session",
|
||||
"requested_by_user": "test@example.com"
|
||||
},
|
||||
"portal": {
|
||||
"did": "did:vm:portal:test",
|
||||
"instance": "test"
|
||||
},
|
||||
"proofchain": {
|
||||
"btc": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"eth": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"ots": {
|
||||
"status": "not_anchored",
|
||||
"timestamp_url": null
|
||||
}
|
||||
},
|
||||
"schema_version": "1.0.0"
|
||||
}
|
||||
80
testvectors/proofbundle/proofbundle-tampered-body.json
Normal file
80
testvectors/proofbundle/proofbundle-tampered-body.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"actor": {
|
||||
"did": "did:vm:human:test",
|
||||
"display_name": "Test User",
|
||||
"role": "auditor"
|
||||
},
|
||||
"bundle_id": "pb-test-tampered-body",
|
||||
"chain": {
|
||||
"end": {
|
||||
"root_hash": "blake3:66a2cca1d65c2fa7f89b6b7e4763dc1c8d4a248ed619882e8c8ad3077ae73363",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
},
|
||||
"length": 3,
|
||||
"ok": true,
|
||||
"receipts": [
|
||||
{
|
||||
"previous_hash": null,
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"root_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"timestamp": "2099-01-01T00:00:00.000Z",
|
||||
"type": "test_event_2"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"root_hash": "blake3:66a2cca1d65c2fa7f89b6b7e4763dc1c8d4a248ed619882e8c8ad3077ae73363",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
}
|
||||
],
|
||||
"start": {
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
}
|
||||
},
|
||||
"document": {
|
||||
"category": "Testing",
|
||||
"doc_id": "Test Document",
|
||||
"filename": "test.docx"
|
||||
},
|
||||
"generated_at": "2025-12-06T17:00:00.000Z",
|
||||
"guardian_anchor": {
|
||||
"anchor_by": "did:vm:guardian:test",
|
||||
"anchor_epoch": null,
|
||||
"anchor_id": "anchor-test",
|
||||
"anchor_timestamp": null,
|
||||
"root_hash": null,
|
||||
"scroll_roots": {}
|
||||
},
|
||||
"meta": {
|
||||
"node": "test",
|
||||
"requested_by_session": "test-session",
|
||||
"requested_by_user": "test@example.com"
|
||||
},
|
||||
"portal": {
|
||||
"did": "did:vm:portal:test",
|
||||
"instance": "test"
|
||||
},
|
||||
"proofchain": {
|
||||
"btc": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"eth": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"ots": {
|
||||
"status": "not_anchored",
|
||||
"timestamp_url": null
|
||||
}
|
||||
},
|
||||
"schema_version": "1.0.0"
|
||||
}
|
||||
80
testvectors/proofbundle/proofbundle-tampered-root.json
Normal file
80
testvectors/proofbundle/proofbundle-tampered-root.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"actor": {
|
||||
"did": "did:vm:human:test",
|
||||
"display_name": "Test User",
|
||||
"role": "auditor"
|
||||
},
|
||||
"bundle_id": "pb-test-tampered-root",
|
||||
"chain": {
|
||||
"end": {
|
||||
"root_hash": "blake3:66a2cca1d65c2fa7f89b6b7e4763dc1c8d4a248ed619882e8c8ad3077ae73363",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
},
|
||||
"length": 3,
|
||||
"ok": true,
|
||||
"receipts": [
|
||||
{
|
||||
"previous_hash": null,
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"root_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"timestamp": "2025-12-06T15:00:00.000Z",
|
||||
"type": "test_event_2"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"root_hash": "blake3:deadbeefdeadbeefdeadbeefdeadbeef",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
}
|
||||
],
|
||||
"start": {
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
}
|
||||
},
|
||||
"document": {
|
||||
"category": "Testing",
|
||||
"doc_id": "Test Document",
|
||||
"filename": "test.docx"
|
||||
},
|
||||
"generated_at": "2025-12-06T17:00:00.000Z",
|
||||
"guardian_anchor": {
|
||||
"anchor_by": "did:vm:guardian:test",
|
||||
"anchor_epoch": null,
|
||||
"anchor_id": "anchor-test",
|
||||
"anchor_timestamp": null,
|
||||
"root_hash": null,
|
||||
"scroll_roots": {}
|
||||
},
|
||||
"meta": {
|
||||
"node": "test",
|
||||
"requested_by_session": "test-session",
|
||||
"requested_by_user": "test@example.com"
|
||||
},
|
||||
"portal": {
|
||||
"did": "did:vm:portal:test",
|
||||
"instance": "test"
|
||||
},
|
||||
"proofchain": {
|
||||
"btc": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"eth": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"ots": {
|
||||
"status": "not_anchored",
|
||||
"timestamp_url": null
|
||||
}
|
||||
},
|
||||
"schema_version": "1.0.0"
|
||||
}
|
||||
80
testvectors/proofbundle/proofbundle-valid.json
Normal file
80
testvectors/proofbundle/proofbundle-valid.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"actor": {
|
||||
"did": "did:vm:human:test",
|
||||
"display_name": "Test User",
|
||||
"role": "auditor"
|
||||
},
|
||||
"bundle_id": "pb-test-valid",
|
||||
"chain": {
|
||||
"end": {
|
||||
"root_hash": "blake3:66a2cca1d65c2fa7f89b6b7e4763dc1c8d4a248ed619882e8c8ad3077ae73363",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
},
|
||||
"length": 3,
|
||||
"ok": true,
|
||||
"receipts": [
|
||||
{
|
||||
"previous_hash": null,
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"root_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"timestamp": "2025-12-06T15:00:00.000Z",
|
||||
"type": "test_event_2"
|
||||
},
|
||||
{
|
||||
"previous_hash": "blake3:42f374530d74cb007574720db2328497109a31dad191817dfb90d8a7d124173d",
|
||||
"root_hash": "blake3:66a2cca1d65c2fa7f89b6b7e4763dc1c8d4a248ed619882e8c8ad3077ae73363",
|
||||
"timestamp": "2025-12-06T16:00:00.000Z",
|
||||
"type": "document_download"
|
||||
}
|
||||
],
|
||||
"start": {
|
||||
"root_hash": "blake3:b6f2c11adac10c96111ae69e33fb3f45082942004c5d59f2c8568b96bc57d5aa",
|
||||
"timestamp": "2025-12-06T14:00:00.000Z",
|
||||
"type": "test_event_1"
|
||||
}
|
||||
},
|
||||
"document": {
|
||||
"category": "Testing",
|
||||
"doc_id": "Test Document",
|
||||
"filename": "test.docx"
|
||||
},
|
||||
"generated_at": "2025-12-06T17:00:00.000Z",
|
||||
"guardian_anchor": {
|
||||
"anchor_by": "did:vm:guardian:test",
|
||||
"anchor_epoch": null,
|
||||
"anchor_id": "anchor-test",
|
||||
"anchor_timestamp": null,
|
||||
"root_hash": null,
|
||||
"scroll_roots": {}
|
||||
},
|
||||
"meta": {
|
||||
"node": "test",
|
||||
"requested_by_session": "test-session",
|
||||
"requested_by_user": "test@example.com"
|
||||
},
|
||||
"portal": {
|
||||
"did": "did:vm:portal:test",
|
||||
"instance": "test"
|
||||
},
|
||||
"proofchain": {
|
||||
"btc": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"eth": {
|
||||
"status": "not_anchored",
|
||||
"txid": null
|
||||
},
|
||||
"ots": {
|
||||
"status": "not_anchored",
|
||||
"timestamp_url": null
|
||||
}
|
||||
},
|
||||
"schema_version": "1.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user