enigma-memory 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +8 -0
  2. package/apps/cli/bin/enigma.mjs +362 -10
  3. package/deploy/SIMULATION.md +152 -0
  4. package/deploy/docker-compose.local-production-simulation.yml +237 -0
  5. package/deploy/docker-compose.production.example.yml +19 -0
  6. package/deploy/kms-mock.mjs +64 -0
  7. package/deploy/nginx.local-production-simulation.conf +33 -0
  8. package/deploy/siem-mock.mjs +50 -0
  9. package/docs/benchmark-attestation-network.md +488 -0
  10. package/docs/benchmark-reproducibility.md +19 -2
  11. package/docs/blockchain-only-mechanisms.md +388 -0
  12. package/docs/client-connectors.md +512 -0
  13. package/docs/demo-proof-network.md +275 -0
  14. package/docs/developer-ecosystem.md +47 -4
  15. package/docs/developer-proof-quickstart.md +325 -0
  16. package/docs/enigma-memory-ready-conformance.md +376 -0
  17. package/docs/enterprise-proof-control-plane.md +365 -0
  18. package/docs/install-anywhere.md +517 -0
  19. package/docs/market-category-narrative.md +398 -0
  20. package/docs/memory-drive-health-model.md +649 -0
  21. package/docs/memory-drive-strategy.md +458 -0
  22. package/docs/memory-passport-standard.md +445 -0
  23. package/docs/novelty-invention-candidates.md +161 -0
  24. package/docs/privacy-ledger-model.md +229 -0
  25. package/docs/proof-network-build-notes.md +240 -0
  26. package/docs/proof-network-claim-boundaries.md +318 -0
  27. package/docs/proof-network-dashboard-spec.md +773 -0
  28. package/docs/proof-network-glossary.md +27 -0
  29. package/docs/proof-network-launch-plan.md +421 -0
  30. package/docs/proof-network-operator-protocol.md +432 -0
  31. package/docs/proof-network-roadmap.md +431 -0
  32. package/docs/proof-network-test-plan.md +216 -0
  33. package/docs/proof-network-threat-model.md +373 -0
  34. package/docs/proof-network.md +257 -0
  35. package/docs/sdk-api.md +132 -10
  36. package/docs/solana-devnet-acceptance.md +226 -0
  37. package/docs/solana-proof-rail.md +453 -0
  38. package/examples/ci/github-actions.yml +6 -3
  39. package/examples/proof-network-anchor.json +37 -0
  40. package/examples/proof-network-attestation.json +35 -0
  41. package/examples/proof-network-grant.json +27 -0
  42. package/examples/proof-network-packet.json +71 -0
  43. package/package.json +42 -3
  44. package/packages/mcp-server/src/index.js +1 -1
  45. package/packages/proof-network/src/index.js +570 -0
  46. package/scripts/build-hosted-api-key-lifecycle.mjs +1 -1
  47. package/scripts/build-hosted-customer-lifecycle.mjs +1 -1
  48. package/scripts/build-installer-assets.mjs +1 -1
  49. package/scripts/build-proof-network-packet.mjs +213 -0
  50. package/scripts/run-standard-memory-benchmarks.mjs +1 -1
  51. package/scripts/simulate-production-env.mjs +210 -0
  52. package/scripts/verify-registry-install.mjs +1 -0
  53. package/scripts/wait-for-backend-ready.mjs +101 -0
  54. package/specs/goal-completion-audit-v1.schema.json +1 -0
  55. package/specs/proof-network-anchor-batch-v1.schema.json +125 -0
  56. package/specs/proof-network-benchmark-attestation-v1.schema.json +103 -0
  57. package/specs/proof-network-capability-grant-v1.schema.json +132 -0
  58. package/specs/proof-network-packet-v1.schema.json +171 -0
@@ -0,0 +1,216 @@
1
+ # Proof Network acceptance test plan
2
+
3
+ This plan defines the release acceptance tests for Enigma Proof Network artifacts. The boundary is narrow: Enigma is a private AI memory controller, and Solana is an optional proof, permission, and settlement rail. Public artifacts may contain only hashes, Merkle roots, opaque refs, counts, timestamps, schemas, signatures, signer refs, nullifiers, capability scopes, package refs, dataset refs, runner refs, metric refs, and explicit non-submission flags.
4
+
5
+ The tests must prove that local package and CLI behavior creates and validates public-safe artifacts without copying disallowed private material or benchmark record bodies into public outputs.
6
+
7
+ ## Release boundary
8
+
9
+ The acceptance suite covers these Enigma-controlled behaviors:
10
+
11
+ - local artifact construction;
12
+ - deterministic JSON hashing;
13
+ - private payload and restricted-value rejection;
14
+ - CLI artifact creation and verification;
15
+ - JSON Schema conformance for public artifact shapes;
16
+ - benchmark attestation and proof-packet assembly;
17
+ - example artifact safety;
18
+ - documentation claim-boundary enforcement;
19
+ - release gates for package publication readiness.
20
+
21
+ The suite does not claim to prove external service behavior, model-state changes, production deployment, network submission, chain status, benchmark leadership, business outcome, economic design, or service availability.
22
+
23
+ ## Artifact families under test
24
+
25
+ | Artifact | Schema id | Minimum public-safe evidence |
26
+ | --- | --- | --- |
27
+ | Anchor batch | `enigma.proof_network.anchor_batch.v1` | schema id, generated timestamp, anchor ref, chain and cluster refs, commitment roots, counts, payload hash, account derivation ref, instruction ref, batch id, batch hash, and required boundary flags |
28
+ | Capability grant | `enigma.proof_network.capability_grant.v1` | schema id, issue and expiry timestamps, grant ref, issuer ref, subject ref, audience ref, scope strings, resource roots, nonce hash, signature ref, grant id, grant hash, public-safe boundary flags |
29
+ | Capability revocation | `enigma.proof_network.capability_revocation.v1` | schema id, revocation timestamp, revocation ref, grant id or grant hash, issuer ref, reason ref, nullifier root, signature ref, revocation id, revocation hash, public-safe boundary flags |
30
+ | Benchmark attestation | `enigma.proof_network.benchmark_attestation.v1` | schema id, benchmark ref, dataset ref, runner ref, package ref, report hash, metric root or metric refs, sample and run counts, signature ref, attestation id, attestation hash, public-safe boundary flags |
31
+ | Proof packet | `enigma.proof_network.packet.v1` | schema id, packet ref, included artifact ids and hashes, packet hash, artifact count, schema counts, public-safe boundary flags |
32
+
33
+ ## Fixture policy
34
+
35
+ Acceptance fixtures must be plaintext-minimized:
36
+
37
+ - Use synthetic `sha256:` digests, Merkle roots, opaque refs, counters, schema ids, and signature refs.
38
+ - Use a known forbidden sentinel only to assert rejection and non-leakage; the sentinel must never appear in success artifacts or error output intended for publication.
39
+ - Use public fixture refs such as `dataset:public-fixture:v1`, `runner:enigma-local:v1`, and `package:npm/enigma-memory@<version>` instead of local paths or private names.
40
+ - Do not store restricted private material, private identifiers, private policy bodies, local-only paths, or benchmark record bodies in fixtures.
41
+ - Prefer hash refs for any simulated report, policy, dataset, or metric input.
42
+
43
+ ## Acceptance matrix
44
+
45
+ ### 1. Private payload rejection
46
+
47
+ Objective: every public artifact constructor, validator, CLI command, packet builder, and verifier fails closed when private fields or restricted values are present.
48
+
49
+ Required cases:
50
+
51
+ 1. Reject forbidden key names at any nesting depth, including names equivalent to private payload content, access-control bodies, external bodies, private identifiers, or freeform document content.
52
+ 2. Reject restricted values even when the key name is otherwise allowed, including auth-shaped strings, key-shaped blocks, authority-bearing URLs, and private-content markers.
53
+ 3. Reject private payloads before computing ids, hashes, packets, or CLI output files.
54
+ 4. Ensure failure output is sanitized: no private sentinel, restricted input, forbidden value, or full input object may be echoed to stdout, stderr, JSON error output, or generated files.
55
+ 5. Ensure all success artifacts recursively include the required non-submission and private-payload boundary flags.
56
+
57
+ Pass criteria:
58
+
59
+ - The command or API call returns a validation failure for every forbidden input.
60
+ - The serialized failure report contains only public-safe error codes, field paths, and generic messages.
61
+ - No private sentinel or restricted value appears in any artifact or error report.
62
+
63
+ ### 2. Deterministic hashes
64
+
65
+ Objective: artifact hashes are stable, canonical, and independent of caller object insertion order.
66
+
67
+ Required cases:
68
+
69
+ 1. Build the same anchor batch twice from equivalent commitments supplied in different orders; assert equal `anchor_batch_id`, `anchor_batch_hash`, and `solana_ready_anchor.payload_hash`.
70
+ 2. Build the same capability grant twice from equivalent scope and resource-root inputs; assert equal `capability_grant_id` and `capability_grant_hash`.
71
+ 3. Build the same capability revocation twice; assert equal `capability_revocation_id` and `capability_revocation_hash`.
72
+ 4. Build the same benchmark attestation twice with equivalent metric roots; assert equal `benchmark_attestation_id` and `benchmark_attestation_hash`.
73
+ 5. Build proof packets with the same included artifacts in different caller orders; assert the packet canonicalization rule produces a deterministic `proof_packet_hash`.
74
+ 6. Mutate one public-safe field at a time, such as a root, ref, count, expiry, metric root, or signature ref; assert the relevant artifact hash changes.
75
+
76
+ Pass criteria:
77
+
78
+ - Equivalent inputs produce byte-for-byte equal public artifacts after canonicalization.
79
+ - Meaningful public-safe field changes produce different artifact hashes.
80
+ - Hash inputs exclude identity fields so self-referential hashes cannot occur.
81
+
82
+ ### 3. CLI artifact creation
83
+
84
+ Objective: the `enigma chain` commands create reviewable local artifacts and verify them without network submission or external integration calls.
85
+
86
+ Required cases:
87
+
88
+ 1. `enigma chain anchor` writes an anchor-batch JSON file with schema id, commitments, count fields, Solana-ready opaque payload metadata, batch id/hash, required boundary flags, and no private input leakage.
89
+ 2. `enigma chain grant` writes a capability-grant JSON file with issuer, subject, audience, scope, resource-root, expiry, nonce-hash, signature-ref, grant id/hash, and public-safe boundary flags.
90
+ 3. `enigma chain revoke` writes a capability-revocation JSON file with grant id/hash reference, reason ref, nullifier root, signature ref, revocation id/hash, and public-safe boundary flags.
91
+ 4. `enigma chain attest` writes a benchmark-attestation JSON file from either a supplied report hash or a locally hashed reviewed report file, without copying the report body or private path into the output.
92
+ 5. `enigma chain verify --file <artifact>` accepts each valid artifact family and returns an `ok:true` report with schema id, artifact ids/hashes, and validation status only.
93
+ 6. Each command rejects missing required args, malformed refs, invalid hash strings, negative counts, invalid timestamps, invalid scopes, and unsupported schemas with sanitized errors.
94
+
95
+ Pass criteria:
96
+
97
+ - All CLI-created files validate with the matching package validator and the verifier command.
98
+ - CLI help and output language states local planning or verification only when the artifact has the non-submission boundary flag.
99
+ - No CLI path claims network submission, external integration behavior, production deployment, chain status, third-party approval status, or benchmark rank.
100
+
101
+ ### 4. JSON Schema validation
102
+
103
+ Objective: every artifact schema accepted by code has a JSON Schema file that accepts valid public-safe artifacts and rejects malformed or unsafe shapes.
104
+
105
+ Required cases:
106
+
107
+ 1. Validate the current schema files under `specs/` for anchor batch, capability grant, benchmark attestation, and proof packet.
108
+ 2. Add or require a release blocker for any artifact family exported by the package without a matching schema file, including capability revocation.
109
+ 3. For each schema, assert required fields, exact schema id, public-safe flag values, positive or non-negative counts, digest formats, ref formats, timestamp formats, and bounded arrays.
110
+ 4. Assert schemas reject unknown private payload keys and unsafe nested structures where the schema can express those constraints.
111
+ 5. Assert schema validation and package validation agree for representative valid and invalid fixtures.
112
+
113
+ Pass criteria:
114
+
115
+ - A valid artifact from each family passes both JSON Schema validation and package validation.
116
+ - Invalid artifacts fail with explainable validation errors.
117
+ - Release is blocked if any public artifact can be produced without a corresponding reviewed schema or schema exception.
118
+
119
+ ### 5. Benchmark attestation
120
+
121
+ Objective: benchmark claims are bound to reviewed public-safe attestation fields, never benchmark record contents.
122
+
123
+ Required cases:
124
+
125
+ 1. Create an attestation with benchmark ref, dataset ref, runner ref, package ref, report hash, metric root or metric refs, sample count, run count, signature ref, and public-safe boundary flags.
126
+ 2. Verify the attestation hash changes when report hash, dataset ref, runner ref, package ref, sample count, run count, metric root, or signature ref changes.
127
+ 3. Build a proof packet containing the benchmark attestation and assert the packet includes the attestation id/hash and schema count without copying report contents.
128
+ 4. Assert no-score-without-run language in docs and examples: numeric benchmark claims must cite the exact report hash/ref, dataset ref, runner ref, package ref, scorer or metric ref, and review approval.
129
+ 5. Assert root-only anchors are described as inclusion commitments, not proof that benchmark record contents are true, complete, private, or superior to another system.
130
+
131
+ Pass criteria:
132
+
133
+ - Benchmark artifacts contain only hashes, refs, counts, approved aggregate metric refs/roots, timestamps, and signatures.
134
+ - Any example score is labeled as tied to a specific reviewed report and cannot be generalized into comparative leadership.
135
+ - Private enterprise runs may publish run-status and private-evidence refs without forcing public score disclosure.
136
+
137
+ ### 6. Example artifacts
138
+
139
+ Objective: examples demonstrate safe usage without becoming accidental restricted-data templates.
140
+
141
+ Required cases:
142
+
143
+ 1. Validate every example anchor batch, grant, revocation, benchmark attestation, proof packet, and quickstart output included in docs or examples.
144
+ 2. Scan examples for forbidden private payload terms, private-looking identifiers, local absolute paths, external bodies, benchmark record bodies, and other restricted private material.
145
+ 3. Confirm every example uses placeholder digests, opaque refs, signature refs, counts, schema ids, and explicit required boundary flags where applicable.
146
+ 4. Confirm examples that mention Solana say the artifact is Solana-ready or operator-review-ready only, unless an approved network evidence packet is present.
147
+ 5. Confirm examples that mention benchmark metrics bind them to exact report refs and do not imply broad performance or business outcomes.
148
+
149
+ Pass criteria:
150
+
151
+ - Examples are executable or clearly marked as illustrative with valid public-safe shapes.
152
+ - Examples can be copied into tests without introducing restricted data or prohibited claims.
153
+ - Example comments and prose preserve the same boundaries as the JSON fields.
154
+
155
+ ### 7. Documentation claim-boundary checks
156
+
157
+ Objective: public docs remain aligned with the Proof Network boundary and do not overclaim.
158
+
159
+ Required cases:
160
+
161
+ 1. Scan Proof Network docs, README sections, API references, quickstarts, benchmark docs, launch plans, and sales-facing proof docs for prohibited claims.
162
+ 2. Block language that says or implies Enigma publishes private material, writes private payloads to a public rail, performs network submission when only local artifacts exist, proves chain status, proves external service behavior, provides third-party approval status, promises business outcomes, or proves benchmark superiority without a reviewed comparison packet.
163
+ 3. Require conditional language for anchoring, signatures, production operations, deployments, comparative benchmarks, audits, and organization-specific security claims.
164
+ 4. Require evidence-backed nouns: anchor batch, capability grant, capability revocation, benchmark attestation, proof packet, root, hash, opaque ref, signature, nullifier, scope, dataset ref, runner ref, package ref.
165
+ 5. Require every numeric or operational claim to cite the exact artifact, report hash, command, dataset/file refs, runner version/ref, package version/ref, and review approval.
166
+
167
+ Pass criteria:
168
+
169
+ - Docs use local proof generation, local verification, public-safe commitment, and optional Solana-ready phrasing.
170
+ - Docs do not expose or request restricted private material in examples.
171
+ - Any conditional claim names the condition and evidence required before publication.
172
+
173
+ ### 8. Release gates
174
+
175
+ Objective: package release is blocked unless proof artifacts, schemas, CLI, examples, and docs satisfy public-safe acceptance.
176
+
177
+ Gate checklist:
178
+
179
+ 1. Package validators reject private payload keys and restricted values for every artifact family.
180
+ 2. Deterministic hash tests pass for equivalent inputs and mutation tests prove hash sensitivity.
181
+ 3. CLI artifact creation and verification tests pass for anchor, grant, revoke, attest, and verify flows.
182
+ 4. JSON Schema validation covers every public artifact family or a documented blocker exists for missing schema coverage.
183
+ 5. Benchmark attestation tests prove report bodies and restricted benchmark records are not copied into public artifacts.
184
+ 6. Proof packet tests prove packet contents are normalized, public-safe, and schema-counted.
185
+ 7. Example artifacts validate and pass leakage scans.
186
+ 8. Docs claim-boundary scans pass for prohibited and conditional language.
187
+ 9. Release notes state the actual scope: local public-safe proof artifact generation and verification, with optional Solana-ready payload preparation only.
188
+ 10. Publication is blocked if any generated artifact lacks the explicit boundary flags required by its schema.
189
+
190
+ ## Minimum test inventory
191
+
192
+ | Area | Suggested file or check | Required assertions |
193
+ | --- | --- | --- |
194
+ | Package API | `test/enigma-proof-network.test.mjs` | constructors, validators, private payload rejection, deterministic hashes, hash mutation sensitivity, packet validation |
195
+ | CLI | `test/enigma-chain-cli.test.mjs` | local artifact creation, `chain verify`, sanitized errors, no network submission claims |
196
+ | Schemas | schema validation test near existing schema tests | valid artifacts pass, malformed/private artifacts fail, exported schemas and schema files stay in sync |
197
+ | Packet script | test for `scripts/build-proof-network-packet.mjs` | report files are hashed by digest/ref only, no body or private path copied, packet validates |
198
+ | Examples | docs/example scan | example JSON validates, forbidden payload terms absent, Solana and benchmark language bounded |
199
+ | Docs | claim-boundary scan | prohibited claims absent, conditional claims evidence-scoped, numeric claims cite exact refs |
200
+
201
+ ## Failure handling
202
+
203
+ A failing acceptance test should produce only public-safe diagnostics:
204
+
205
+ - schema id or command name;
206
+ - field path;
207
+ - validation code;
208
+ - expected public-safe type or format;
209
+ - artifact id/hash when available;
210
+ - sanitized fixture label.
211
+
212
+ Diagnostics must not echo the rejected private value, report body, external body, local private path, private identifier, or full input object.
213
+
214
+ ## Done definition
215
+
216
+ Proof Network release acceptance is complete only when the matrix above passes and the release record contains the exact commands or checks that were run, the package version/ref, schema refs, artifact refs, and reviewer approval. If any gate is skipped, the release record must say it is skipped and mark the release as not accepted for public proof-network publication.
@@ -0,0 +1,373 @@
1
+ # Proof Network threat model
2
+
3
+ This document is the release threat model for Enigma's Proof Network: privacy-preserving proof artifacts for AI memory with local-only CLI planning, Solana-ready root anchoring, capability grants, capability revocations, benchmark attestations, and proof packets.
4
+
5
+ The Proof Network is a public evidence layer, not a public data layer. Public artifacts may carry hashes, roots, refs, counts, schema ids, timestamps, signatures, nullifiers, and verifier outcomes. Public artifacts must never carry raw memory, prompts, transcripts, completions, embeddings, ACL bodies, tenant names, private keys, API keys, seed phrases, provider responses, local user paths, or credential-bearing URLs.
6
+
7
+ The chain CLI boundary is local planning only. `enigma chain anchor`, `grant`, `revoke`, `attest`, and `verify` may generate or verify JSON, but they must not submit Solana transactions, create accounts, contact RPC providers, or represent a local plan as final settlement.
8
+
9
+ ## Scope
10
+
11
+ In scope:
12
+
13
+ - `enigma.proof_network.anchor_batch.v1` artifacts.
14
+ - `enigma.proof_network.capability_grant.v1` artifacts.
15
+ - `enigma.proof_network.capability_revocation.v1` artifacts.
16
+ - `enigma.proof_network.benchmark_attestation.v1` artifacts.
17
+ - `enigma.proof_network.packet.v1` envelopes.
18
+ - Local `enigma chain anchor|grant|revoke|attest|verify` planning and validation commands.
19
+ - Public-safe documentation examples, fixtures, and release artifacts.
20
+
21
+ Out of scope:
22
+
23
+ - Solana transaction submission, wallet custody, account creation, RPC provider operation, or chain finality claims.
24
+ - Provider deletion, model forgetting, compliance certification, token ROI, provider invoice savings, or truth of memory content.
25
+ - Raw benchmark datasets, private reports, prompts, answers, completions, provider responses, embeddings, and customer policy bodies.
26
+
27
+ ## Privacy boundaries
28
+
29
+ ### Local memory boundary
30
+
31
+ Allowed public material:
32
+
33
+ - `sha256:` commitments, Merkle roots, root refs, sequence refs, artifact ids, counts, schema ids, and signatures.
34
+
35
+ Forbidden public material:
36
+
37
+ - Raw memory text, private context packs, prompts, transcripts, completions, embeddings, provider responses, local paths, and user identifiers.
38
+
39
+ Required control:
40
+
41
+ - Every create and validate path calls `assertNoPrivateProofPayload(value)` before returning or accepting a public proof artifact.
42
+
43
+ ### Capability boundary
44
+
45
+ Allowed public material:
46
+
47
+ - Grant ids, issuer refs, subject refs, audience refs, exact scope ids, issued-at, expires-at, nonce hashes, grant hashes, and revocation nullifiers.
48
+
49
+ Forbidden public material:
50
+
51
+ - ACL bodies, tenant names, user emails, private policy text, bearer tokens, private keys, seed phrases, and connector config bodies.
52
+
53
+ Required control:
54
+
55
+ - Grants are least-privilege, expiring, nonce-bound, operation-bound, and revocable without disclosing private subjects.
56
+
57
+ ### Benchmark boundary
58
+
59
+ Allowed public material:
60
+
61
+ - Report hash, dataset ref, dataset hash, runner ref, package ref, aggregate metric names, metric boundary, and reproducibility refs.
62
+
63
+ Forbidden public material:
64
+
65
+ - Dataset rows, questions, answers, conversations, prompts, completions, provider credentials, and raw report text unless separately reviewed as public-safe.
66
+
67
+ Required control:
68
+
69
+ - Benchmark attestations bind to hashes and refs only and do not convert private benchmark data into public proof payloads.
70
+
71
+ ### Chain boundary
72
+
73
+ Allowed public material:
74
+
75
+ - Opaque anchor batch hash/root, artifact type, network hint, local transaction plan id, `transaction_submitted:false`, and `raw_memory_on_chain:false`.
76
+
77
+ Forbidden public material:
78
+
79
+ - Wallet seed phrases, private keys, credentialed RPC URLs, tenant-linked wallet labels, raw account owner names, memory payloads, and provider responses.
80
+
81
+ Required control:
82
+
83
+ - Chain commands emit offline planning artifacts only and make non-submission explicit.
84
+
85
+ ### Connector boundary
86
+
87
+ Allowed public material:
88
+
89
+ - Connector profile refs, capability refs, proof packet hashes, artifact schema ids, and recomputed verifier status.
90
+
91
+ Forbidden public material:
92
+
93
+ - Connector config secrets, local usernames in paths, copied config files, injected memory text, and connector-supplied private metadata.
94
+
95
+ Required control:
96
+
97
+ - Connectors are untrusted. Packet validation recomputes artifact hash and verifier status rather than trusting connector assertions.
98
+
99
+ ### Settlement boundary
100
+
101
+ Allowed public material:
102
+
103
+ - Quote hashes, receipt hashes, service refs, public operator refs, amount/currency fields, root refs, signer refs, and dispute refs.
104
+
105
+ Forbidden public material:
106
+
107
+ - Customer names, private workload descriptions, prompts, transcripts, invoice secrets, provider responses, and profit/savings claims.
108
+
109
+ Required control:
110
+
111
+ - Settlement artifacts prove bounded service metadata only. They do not prove provider savings, token profit, provider deletion, model forgetting, or compliance.
112
+
113
+ ## Assets and security goals
114
+
115
+ | Asset | Security goal | Required property |
116
+ | --- | --- | --- |
117
+ | Anchor batch | Integrity, public verifiability, privacy minimization | Binds roots/refs into an opaque chain-ready plan without raw memory. |
118
+ | Capability grant | Least privilege, replay resistance, auditable authorization | Scope, issuer, subject, audience, nonce, and expiry are explicit. |
119
+ | Capability revocation | Public invalidation without subject disclosure | Revokes by grant hash/nullifier rather than private identity. |
120
+ | Benchmark attestation | Reproducibility, poisoning resistance, claim discipline | Binds report, dataset, runner, and package refs without raw benchmark data. |
121
+ | Proof packet | Safe interchange envelope | Carries one supported artifact, artifact hash, schema, and verifier metadata. |
122
+ | CLI chain artifact | Operator-safe planning evidence | Local JSON only; no transaction submission, account creation, network call, or secret. |
123
+ | Proof schemas | Fail-closed validation | Unknown/private fields and unsafe values are rejected. |
124
+
125
+ ## Threats, mitigations, and tests
126
+
127
+ ### 1. Privacy leakage
128
+
129
+ Attack path:
130
+
131
+ - A caller includes private fields such as raw memory, prompt text, transcript text, embedding vectors, provider response bodies, ACL bodies, tenant names, credentials, or seed material in an anchor, grant, revocation, attestation, or packet.
132
+
133
+ Impact:
134
+
135
+ - Public proof artifacts expose private user data, customer metadata, provider content, or credentials.
136
+
137
+ Mitigations:
138
+
139
+ - Centralize private key and private value rejection in `assertNoPrivateProofPayload(value)`.
140
+ - Run the private-payload assertion in every `create*` and `validate*` function.
141
+ - Keep public schemas allowlisted and reject unknown fields that could become covert payload channels.
142
+ - Use hashes, roots, refs, counts, nullifiers, and signatures instead of memory or policy bodies.
143
+ - Keep documentation examples hash-only and ref-only.
144
+
145
+ Tests:
146
+
147
+ - `PN-TM-001`: pass forbidden top-level keys into each artifact creator and expect rejection.
148
+ - `PN-TM-002`: pass forbidden nested keys into each validator and expect rejection.
149
+ - `PN-TM-003`: pass secret-looking values, private-key-looking blocks, credentialed URLs, and long free-text payloads and expect rejection.
150
+ - `PN-TM-004`: verify CLI-generated chain artifacts include `raw_memory_on_chain:false` and do not include private field names.
151
+
152
+ ### 2. Metadata correlation
153
+
154
+ Attack path:
155
+
156
+ - Repeated roots, timestamps, counts, tenant-linked refs, account labels, local file names, dataset paths, or connector names allow observers to correlate artifacts across releases, customers, or operators.
157
+
158
+ Impact:
159
+
160
+ - An observer infers tenant identity, memory activity, benchmark activity, connector usage, or business events even without raw memory.
161
+
162
+ Mitigations:
163
+
164
+ - Prefer opaque refs and salted/structured commitments over names for tenants, users, accounts, datasets, and connectors.
165
+ - Do not publish absolute local paths or workstation usernames.
166
+ - Publish counts only when needed for verification.
167
+ - Avoid exact operational timing unless freshness requires it; use issued/expiry windows rather than detailed activity timelines where possible.
168
+ - Rotate grant refs and separate public packet ids from private operator ids.
169
+
170
+ Tests:
171
+
172
+ - `PN-TM-010`: benchmark attestations include file/ref name plus input hash only, not absolute paths.
173
+ - `PN-TM-011`: grants and anchors reject tenant names, emails, account names, and local path-like values.
174
+ - `PN-TM-012`: packet ids and grant ids remain opaque and do not embed connector names or user names.
175
+ - `PN-TM-013`: fixtures verify counts and timestamps are the minimum needed by the schema.
176
+
177
+ ### 3. Malicious connector injection
178
+
179
+ Attack path:
180
+
181
+ - A compromised connector submits a proof packet with extra private fields, overbroad capability scope, unsupported artifact type, stale root, forged verifier metadata, or a mismatched artifact hash.
182
+
183
+ Impact:
184
+
185
+ - Private data enters public evidence, unauthorized capability is accepted, or operators trust a false `valid:true` result.
186
+
187
+ Mitigations:
188
+
189
+ - Treat connector packets as untrusted input.
190
+ - Validate packet schema, supported artifact schema, capability scope, freshness, and artifact hash.
191
+ - Recompute verifier status; never trust connector-supplied `valid:true` alone.
192
+ - Reject unknown artifact types and private payload fields.
193
+ - Require packet operation to match the bound grant scope.
194
+
195
+ Tests:
196
+
197
+ - `PN-TM-020`: mutate a valid packet with an unsupported artifact schema and expect failure.
198
+ - `PN-TM-021`: add private payload fields to a packet and expect failure.
199
+ - `PN-TM-022`: overbroaden grant scope or bind a grant to the wrong packet operation and expect failure.
200
+ - `PN-TM-023`: alter artifact content without updating artifact hash and expect failure.
201
+ - `PN-TM-024`: set forged verifier metadata to `valid:true`; validation recomputes and rejects the packet.
202
+
203
+ ### 4. Stale derived artifacts
204
+
205
+ Attack path:
206
+
207
+ - An anchor, grant, revocation, benchmark attestation, or packet is generated from a superseded root, old package ref, old report hash, expired grant, or already revoked capability.
208
+
209
+ Impact:
210
+
211
+ - Public proof appears fresh while binding obsolete state or revoked authority.
212
+
213
+ Mitigations:
214
+
215
+ - Include source root/report/package refs, created-at, issued-at, expires-at, sequence refs, and revocation nullifiers where applicable.
216
+ - Validate expiration and revocation status before returning `valid:true`.
217
+ - State that roots prove only the referenced snapshot, not current global state.
218
+ - Bind packets to artifact hashes and freshness windows.
219
+
220
+ Tests:
221
+
222
+ - `PN-TM-030`: expired grants are rejected or marked expired.
223
+ - `PN-TM-031`: revoked grants with matching nullifier are rejected or marked revoked.
224
+ - `PN-TM-032`: stale packet timestamps fail freshness validation.
225
+ - `PN-TM-033`: changed source root, report hash, or package ref causes validation failure.
226
+ - `PN-TM-034`: verification output distinguishes stale/revoked from valid rather than silently accepting old state.
227
+
228
+ ### 5. Benchmark poisoning
229
+
230
+ Attack path:
231
+
232
+ - An attestation points to a report generated from modified datasets, answer leakage, provider completions, tuned fixture rows, unpinned runner logic, unverifiable package versions, or unsupported benchmark claims.
233
+
234
+ Impact:
235
+
236
+ - Public material overclaims memory quality, benchmark leadership, provider comparison, or LLM answer accuracy.
237
+
238
+ Mitigations:
239
+
240
+ - Bind attestation to report hash, dataset ref, dataset hash, runner ref, package ref, metric boundary, and claim boundary.
241
+ - Keep raw dataset rows, questions, answers, conversations, prompts, and completions out of attestations.
242
+ - State whether metrics are retrieval/evidence proxy metrics rather than LLM answer accuracy.
243
+ - Reject unsupported claim types such as provider leadership, provider savings, token ROI, provider deletion, and model forgetting.
244
+
245
+ Tests:
246
+
247
+ - `PN-TM-040`: attestation without dataset hash, runner ref, package ref, or report hash fails.
248
+ - `PN-TM-041`: attestation containing raw rows, questions, answers, prompts, or completions fails.
249
+ - `PN-TM-042`: mutated report hash fails verification.
250
+ - `PN-TM-043`: unsupported claim booleans or benchmark-leadership language fail documentation/example checks.
251
+ - `PN-TM-044`: generated benchmark attestations preserve metric boundary text.
252
+
253
+ ### 6. Grant replay
254
+
255
+ Attack path:
256
+
257
+ - A capability grant is reused after expiry, copied across scopes, replayed with another packet, replayed by another subject, or used after revocation.
258
+
259
+ Impact:
260
+
261
+ - An unauthorized connector or operator performs anchoring, attestation, revocation, or verification actions outside the approved scope.
262
+
263
+ Mitigations:
264
+
265
+ - Grants include unique nonce/grant id, issuer ref, subject ref, optional audience ref, exact operation scopes, issued-at, expires-at, and grant hash.
266
+ - Packets bind to the grant hash and requested operation.
267
+ - Revocations publish nullifier artifacts that do not disclose private subjects.
268
+ - Validators reject expired, wrong-scope, wrong-subject, wrong-audience, duplicate, or revoked grants.
269
+
270
+ Tests:
271
+
272
+ - `PN-TM-050`: replay an expired grant and expect rejection.
273
+ - `PN-TM-051`: reuse a grant id with changed scope and expect hash/id mismatch.
274
+ - `PN-TM-052`: attach a grant to the wrong packet operation and expect rejection.
275
+ - `PN-TM-053`: include a matching revocation nullifier and expect revoked status.
276
+ - `PN-TM-054`: duplicate nonce replay is rejected where a nonce cache or fixture set is provided.
277
+
278
+ ### 7. Solana account disclosure
279
+
280
+ Attack path:
281
+
282
+ - Chain planning output includes wallet labels, tenant-linked account names, seed phrases, private keys, credentialed RPC URLs, or account metadata that can deanonymize operators.
283
+
284
+ Impact:
285
+
286
+ - Public chain data or support artifacts link operators to tenants, reveal private wallet material, or compromise signing authority.
287
+
288
+ Mitigations:
289
+
290
+ - Anchor batches remain opaque and local-only.
291
+ - Never include seed phrases, private keys, or credentialed URLs in artifacts, docs, fixtures, or tests.
292
+ - Prefer operator-controlled public refs and network hints instead of account names.
293
+ - Always emit `transaction_submitted:false` and `raw_memory_on_chain:false`.
294
+ - Do not claim finality, confirmation, or settlement until a separate operator-controlled chain process provides reviewed evidence.
295
+
296
+ Tests:
297
+
298
+ - `PN-TM-060`: `enigma chain anchor` output includes `transaction_submitted:false` and `raw_memory_on_chain:false`.
299
+ - `PN-TM-061`: anchor batch validation rejects seed/private-key/account-name fields.
300
+ - `PN-TM-062`: chain artifacts reject credentialed RPC URLs and secret-looking values.
301
+ - `PN-TM-063`: chain examples contain no wallet seed material or tenant-linked account labels.
302
+
303
+ ### 8. Settlement fraud
304
+
305
+ Attack path:
306
+
307
+ - A service, connector, or operator submits fake receipts, duplicate settlement refs, wrong roots, inflated amounts, missing signer refs, or public claims that imply token ROI/provider savings from proof artifacts.
308
+
309
+ Impact:
310
+
311
+ - Operators pay for unperformed work, disputes cannot be resolved, or public claims become misleading.
312
+
313
+ Mitigations:
314
+
315
+ - Bind settlement-facing artifacts to quote hash, receipt hash, service ref, root ref, amount bounds, unique settlement ref, and signer ref.
316
+ - Reject duplicate refs, amount-above-quote, wrong-root, missing-signer, and unsupported-claim artifacts.
317
+ - Keep settlement claim boundaries explicit: no provider invoice savings, token profit, compliance, provider deletion, or model forgetting claim follows from proof-network validation.
318
+ - Preserve dispute refs and fraud indicators without revealing private workloads.
319
+
320
+ Tests:
321
+
322
+ - `PN-TM-070`: amount above quote fails validation.
323
+ - `PN-TM-071`: duplicate settlement ref fails validation or produces a fraud indicator.
324
+ - `PN-TM-072`: wrong root ref or missing signer ref fails validation.
325
+ - `PN-TM-073`: ROI/provider-savings/token-profit claim fields fail validation.
326
+ - `PN-TM-074`: settlement fixtures do not include private workload text, prompts, transcripts, tenant names, or provider responses.
327
+
328
+ ## Public artifact validation rules
329
+
330
+ 1. Fail closed on private-looking keys at every nested level.
331
+ 2. Fail closed on private-looking string values and long unstructured text blobs.
332
+ 3. Prefer refs, roots, hashes, counts, nullifiers, signatures, and schema ids over names or bodies.
333
+ 4. Bind each proof claim to its exact snapshot and schema.
334
+ 5. Make local-only chain behavior explicit with `transaction_submitted:false` and `raw_memory_on_chain:false`.
335
+ 6. Separate structural proof validity from business, legal, model behavior, and provider-operation claims.
336
+ 7. Reject unsupported schema ids rather than preserving them as opaque extensions.
337
+ 8. Treat connector-provided verification status as advisory until recomputed locally.
338
+
339
+ ## Minimum regression suite
340
+
341
+ The release should keep focused tests for the new proof-network surface. These are targeted tests, not project-wide gates:
342
+
343
+ - Pure module tests for all `create*` and `validate*` functions.
344
+ - Forbidden payload tests for keys and values at top-level and nested positions.
345
+ - Hash/ref mutation tests for every artifact type.
346
+ - CLI artifact tests for `anchor`, `grant`, `revoke`, `attest`, and `verify` with public-safe inputs.
347
+ - CLI negative tests for private-looking flags, private-looking JSON files, unsupported schemas, and stale artifacts.
348
+ - Replay/freshness tests for expired grants, duplicate nonces, revoked nullifiers, stale packets, and wrong operation scopes.
349
+ - Benchmark poisoning tests for missing refs, mutated report hashes, raw dataset rows, and unsupported benchmark claims.
350
+ - Solana disclosure tests for private keys, seed phrases, credentialed RPC URLs, account labels, and false transaction-submitted claims.
351
+ - Settlement fraud tests for duplicate refs, amount-above-quote, wrong roots, missing signers, and unsupported ROI/provider-savings claims.
352
+ - Documentation/example scans for forbidden private field names, secret-looking values, and overclaim language.
353
+
354
+ ## Residual risks
355
+
356
+ - Public roots, counts, and timestamps can still leak operational patterns through frequency analysis.
357
+ - Hashes do not make low-entropy private values safe to publish. Tenant names, emails, short prompts, and small ACL bodies need a reviewed commitment design before public use.
358
+ - Local chain planning does not prove Solana finality, account privacy, or settlement completion.
359
+ - Benchmark attestations prove a report hash/ref relationship, not dataset licensing, fair external-provider comparison, or LLM answer correctness.
360
+ - Capability grants reduce authorization ambiguity but do not protect a compromised local machine, stolen signing key, or malicious connector that already has authorized local access.
361
+ - Settlement receipts can bound service evidence, but dispute resolution still needs operator process, key custody, and fraud review outside the artifact schema.
362
+
363
+ ## Release checklist
364
+
365
+ Before publishing proof-network artifacts or docs:
366
+
367
+ 1. All public examples use hashes, roots, refs, counts, signatures, and nullifiers only.
368
+ 2. Every artifact creator and validator rejects private keys, private-looking fields, and private-looking values.
369
+ 3. Chain planning output includes `transaction_submitted:false` and `raw_memory_on_chain:false`.
370
+ 4. Grants are scoped, expiring, nonce-bound, operation-bound, and revocable.
371
+ 5. Benchmark attestations include report, dataset, runner, and package refs but no raw benchmark rows.
372
+ 6. Settlement-related artifacts bind quote/receipt/root/signer refs and reject ROI/provider-savings/token-profit claims.
373
+ 7. Documentation avoids claims of provider deletion, model forgetting, compliance certification, chain finality, token ROI, provider invoice savings, or benchmark leadership unless separately evidenced and approved.