Skip to content

Commit 7e5a4d5

Browse files
authored
Merge pull request #53 from mpcp-protocol/docs/phase-6-adoption-acceleration
docs: complete Phase 6 — Adoption Acceleration (PR21–PR25)
2 parents 124010d + 926d35d commit 7e5a4d5

3 files changed

Lines changed: 313 additions & 65 deletions

File tree

ROADMAP.md

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ Implements: protocol verification engine, artifact schemas, cryptographic signin
7878

7979
---
8080

81-
## Phase 6 — Adoption Acceleration
81+
## Phase 6 — Adoption Acceleration
8282

8383
| PR | Title | Status |
8484
|----|-------|--------|
85-
| PR21 | Payment profiles expansion (XRPL Stablecoin, RLUSD) | pending |
86-
| PR22 | Layer-1 ecosystem evaluation (XRPL, Hedera, Stellar, EVM) | pending |
87-
| PR23 | Machine wallet guardrails documentation | pending |
88-
| PR24 | Automated fleet payment demo (visual end-to-end) | pending |
89-
| PR25 | MPCP conformance badge | pending |
85+
| PR21 | Payment profiles expansion (XRPL Stablecoin, RLUSD) | |
86+
| PR22 | Layer-1 ecosystem evaluation (XRPL, Hedera, Stellar, EVM) | |
87+
| PR23 | Machine wallet guardrails documentation | |
88+
| PR24 | Automated fleet payment demo (visual end-to-end) | |
89+
| PR25 | MPCP conformance badge | |
9090
| PR26 | Human-to-Agent Delegation Profile (`revocationEndpoint`, `allowedPurposes`, TRIP scope, `checkRevocation()`) ||
9191
| PR27 | On-Chain Policy Anchoring (`anchorRef`, `resolveXrplDid`, `hederaHcsAnchorPolicyDocument`, `checkXrplNftRevocation`) ||
9292
| PR28 | Encrypted Policy Anchoring (`submitMode`, AES-256-GCM via `crypto.subtle`, `PolicyDocumentCustody`, XRPL IPFS prep) ||
@@ -154,65 +154,57 @@ All three functions flat-exported from `src/sdk/index.ts`, consistent with exist
154154

155155
---
156156

157-
## PR21 — Payment Profiles Expansion
157+
## PR21 — Payment Profiles Expansion
158158

159-
Expand reference profiles so MPCP is immediately usable for real payment ecosystems.
159+
XRPL Stablecoin profile — RLUSD / issued-asset payment constraints, wallet and verifier expectations.
160160

161-
Initial focus:
162-
- XRPL Stablecoin Profile — RLUSD / issued-asset payment constraints
163-
- Wallet and verifier expectations for stablecoin settlement
164-
165-
Future candidates: Stellar, Hedera, EVM stablecoin.
166-
167-
Deliverables:
168-
- Profile document(s)
169-
- Example artifact bundles
170-
- Verification guidance per profile
161+
Delivered:
162+
- `docs/implementation/xrpl-stablecoin-profile.md` — full profile doc (asset constraints, policy shape, wallet/verifier expectations, Trust Gateway integration)
163+
- `profiles/xrpl-stablecoin.json` — machine-readable profile definition
164+
- `examples/xrpl-stablecoin/` — example artifact bundle + README
165+
- `docs/implementation/reference-profiles.md` updated with XRPL Stablecoin entry
171166

172167
---
173168

174-
## PR22 — Layer-1 Ecosystem Evaluation
175-
176-
Research and document which L1/payment ecosystem to prioritize next for MPCP deployment profiles.
169+
## PR22 — Layer-1 Ecosystem Evaluation ✓
177170

178-
Evaluation criteria: stablecoin support, settlement finality, fees, compliance features, offline/verifier friendliness, developer tooling.
171+
Research document comparing XRPL, Stellar, Hedera, and EVM (L2) against MPCP settlement requirements: stablecoin maturity, budget reservation, finality, fees, identity, offline friendliness, tooling.
179172

180-
Deliverables:
181-
- Research document comparing candidates
182-
- Recommended next profile target with rationale
173+
Delivered:
174+
- `docs/implementation/l1-ecosystem-evaluation.md` — full comparison matrix and recommendation
175+
- **Recommendation:** Stellar (USDC + Claimable Balances) as next rail; EVM L2 second; Hedera continues as anchoring layer
183176

184177
---
185178

186-
## PR23 — Machine Wallet Guardrails
179+
## PR23 — Machine Wallet Guardrails
187180

188-
Document and demonstrate how MPCP acts as a machine wallet guardrail layer: a machine wallet may not send funds unless the payment satisfies the full PolicyGrant SBA → SPA constraint chain.
181+
How MPCP acts as a machine wallet guardrail layer: PolicyGrant constraints, SBA session limits, Trust Gateway verification.
189182

190-
Deliverables:
191-
- Guide describing the guardrail model
192-
- Wallet integration example
193-
- Threat-model notes for overspend and misuse prevention
183+
Delivered:
184+
- `docs/implementation/machine-wallet-guardrails.md`guardrail model, Layer 1/2/3 enforcement, threat model, XRPL memo integration
185+
- `docs/examples/machine-wallet-guardrails.md` example walkthrough
186+
- `examples/machine-wallet-guardrails/wallet-integration.mjs` — runnable script with allowed/rejected scenarios
194187

195188
---
196189

197-
## PR24 — Automated Fleet Payment Demo
190+
## PR24 — Automated Fleet Payment Demo
198191

199-
Visual end-to-end demonstration of an MPCP-controlled fleet payment (vehicle → parking/charging facility → verifier → settlement).
192+
End-to-end fleet payment demonstrations with architecture diagrams and runnable scripts.
200193

201-
Deliverables:
202-
- Runnable demo script
203-
- Architecture diagram
204-
- Companion documentation
194+
Delivered:
195+
- `examples/fleet-trip/` — multi-stop robotaxi demo (toll, charging, parking, tamper detection); `demo-fleet-trip.mjs`
196+
- `examples/machine-commerce/` — fleet spend simulator (`simulate.mjs`), fleet demo (`demo-fleet.mjs`), scenarios + policy JSON
197+
- `docs/examples/fleet.md` — architecture diagram (Vehicle Agent → Verifier → Trust Gateway → XRPL), run instructions, key behaviors
205198

206199
---
207200

208-
## PR25 — MPCP Conformance Badge
201+
## PR25 — MPCP Conformance Badge
209202

210-
Lightweight conformance process: implementations that pass the golden vectors and required verification checks may claim compatibility.
203+
Formal conformance tiers (L0–L3), Shields.io badge, `package.json` claim format, implementer checklist.
211204

212-
Deliverables:
213-
- Conformance criteria
214-
- Badge / claim format
215-
- Documentation for external implementers
205+
Delivered:
206+
- `docs/implementation/conformance.md` — expanded with L0 Hash / L1 Structural / L2 Full-chain / L3 Profile tiers; badge format; `package.json` claim schema; per-tier implementer checklist
207+
- Aligns with `mpcp-spec/test-vectors/CONFORMANCE.md` (L0/L1/L2 definitions)
216208

217209
---
218210

docs/implementation/conformance.md

Lines changed: 146 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,147 @@
11
# Conformance
22

3-
MPCP implementations can be verified for conformance to the protocol specification.
3+
MPCP implementations can be verified for conformance to the protocol specification. This page defines **conformance tiers**, the **verification vectors** used to test them, the **MPCP Conformance Badge** for external implementers, and a **self-assessment checklist**.
44

5-
## Conformance Levels
5+
---
66

7-
| Level | Scope | Description |
8-
|-------|-------|-------------|
9-
| **Artifact** | Single artifact | Produces valid PolicyGrant and SBA per spec |
10-
| **Chain** | Full authorization chain | Links artifacts correctly (policyHash, sessionId, constraints) |
11-
| **Verification** | Settlement verification | Passes all verification checks for valid bundles |
12-
| **Profile** | Deployment profile | Matches a reference profile (parking, charging, fleet-offline, hosted-rail) |
7+
## Conformance Tiers
8+
9+
Tiers are cumulative — each level assumes all lower levels pass.
10+
11+
| Tier | Name | Scope | What it proves |
12+
|------|------|-------|----------------|
13+
| **L0** | Hash | Canonical JSON + domain-separated hashing | Your serialization is deterministic and hashes match the reference |
14+
| **L1** | Structural | Artifact shape + constraint propagation | Your artifacts contain all required fields and SBA ⊆ PolicyGrant holds |
15+
| **L2** | Full-chain verification | Signatures, linkage, budget, expiry, XRPL conformance | Your verifier accepts valid chains and rejects invalid ones identically to the reference implementation |
16+
| **L3** | Profile | Deployment profile conformance | Your implementation matches a named reference profile (parking, charging, fleet-offline, xrpl-stablecoin, hosted-rail) |
17+
18+
### L0 — Canonical Hash Reproduction
19+
20+
Recompute `SHA-256(UTF-8(prefix) || canonical_json(payload))` for each entry in [`test-vectors/expected-hashes.json`](https://github.com/mpcp-protocol/mpcp-spec/blob/main/test-vectors/expected-hashes.json) and obtain the documented hex digest.
21+
22+
Tooling: [`verify_test_vectors.py`](https://github.com/mpcp-protocol/mpcp-spec/blob/main/test-vectors/verify_test_vectors.py) (exit code 0 on success).
23+
24+
### L1 — Structural Sanity
25+
26+
Parse all `*-v1-minimal.json` fixtures in `test-vectors/` and confirm required fields are present with correct types. This does not replace normative schema definitions — it catches structural regressions.
27+
28+
### L2 — Full-Chain Verification
29+
30+
Verify golden vectors end-to-end using your verifier:
31+
32+
| Vector | Expected result |
33+
|--------|----------------|
34+
| `valid-settlement.json` | Pass — full chain valid |
35+
| `expired-grant.json` | Fail — `policy_grant_expired` |
36+
| `budget-exceeded.json` | Fail — `budget_exceeded` |
37+
| `settlement-mismatch.json` | Fail — settlement does not match SBA constraints |
38+
39+
Run against the reference:
40+
41+
```bash
42+
npx mpcp verify test/vectors/valid-settlement.json --explain
43+
npx mpcp verify test/vectors/expired-grant.json --explain
44+
```
45+
46+
L2 also requires signature verification (Ed25519 or P-256) and Trust Bundle key resolution.
47+
48+
### L3 — Profile Conformance
49+
50+
Validate that your deployment matches a named profile from [Reference Profiles](reference-profiles.md):
51+
52+
```bash
53+
mpcp policy-summary your-policy.json --profile parking
54+
```
55+
56+
Profile conformance checks: `allowedRails` subset, asset constraints, and profile-specific fields.
57+
58+
---
59+
60+
## MPCP Conformance Badge
61+
62+
External implementations that pass conformance testing may claim an MPCP conformance badge.
63+
64+
### Badge Format
65+
66+
Use a [Shields.io](https://shields.io) badge in your README:
67+
68+
```markdown
69+
![MPCP Conformance](https://img.shields.io/badge/MPCP-L2%20Conformant-blue)
70+
```
71+
72+
Rendered: ![MPCP Conformance](https://img.shields.io/badge/MPCP-L2%20Conformant-blue)
73+
74+
Replace `L2` with the highest tier your implementation passes (`L0`, `L1`, `L2`, or `L3`).
75+
76+
### package.json Claim
77+
78+
Add a structured conformance claim to your `package.json`:
79+
80+
```json
81+
{
82+
"mpcp": {
83+
"conformance": "L2",
84+
"specVersion": "1.0",
85+
"testedWith": "mpcp-service@0.1.0",
86+
"profiles": ["xrpl-stablecoin"]
87+
}
88+
}
89+
```
90+
91+
| Field | Required | Description |
92+
|-------|----------|-------------|
93+
| `conformance` | Yes | Highest tier passed: `L0`, `L1`, `L2`, or `L3` |
94+
| `specVersion` | Yes | MPCP spec version tested against |
95+
| `testedWith` | Recommended | Reference implementation package and version used for verification |
96+
| `profiles` | L3 only | Array of profile names the implementation conforms to |
97+
98+
### Claim Rules
99+
100+
1. **Self-assessed** — conformance is self-declared; there is no central certification authority
101+
2. **Reproducible** — the implementation must include instructions for running the conformance vectors
102+
3. **Versioned** — claims are tied to a specific `specVersion`; a new spec revision requires re-testing
103+
4. **Honest** — do not claim a tier unless all lower tiers also pass
104+
105+
---
106+
107+
## Implementer Checklist
108+
109+
Use this checklist when preparing a conformance claim:
110+
111+
### L0 (Hash)
112+
113+
- [ ] `canonicalJson(obj)` produces identical output to the reference for all test payloads
114+
- [ ] Domain-separated hash: `SHA-256("MPCP:TrustBundle:1.0:" + canonical)` matches for Trust Bundle vectors
115+
- [ ] Domain-separated hash: `SHA-256("MPCP:PolicyGrant:1.0:" + canonical)` matches for PolicyGrant vectors
116+
- [ ] Domain-separated hash: `SHA-256("MPCP:BudgetAuthorization:1.0:" + canonical)` matches for SBA vectors
117+
- [ ] `verify_test_vectors.py` exits with code 0
118+
119+
### L1 (Structural)
120+
121+
- [ ] All minimal JSON fixtures parse without error
122+
- [ ] Required fields present on PolicyGrant: `grantId`, `issuer`, `subject`, `purposes`, `allowedRails`, `budgetMinor`, `currency`, `expiresAt`
123+
- [ ] Required fields present on SBA: `sessionId`, `grantId`, `policyHash`, `maxAmountMinor`, `currency`, `expiresAt`
124+
- [ ] Constraint propagation: SBA `maxAmountMinor` ≤ PolicyGrant `budgetMinor`; SBA `expiresAt` ≤ PolicyGrant `expiresAt`
125+
126+
### L2 (Full-chain)
127+
128+
- [ ] `valid-settlement.json` passes full verification
129+
- [ ] `expired-grant.json` fails with reason `policy_grant_expired`
130+
- [ ] `budget-exceeded.json` fails with reason `budget_exceeded`
131+
- [ ] `settlement-mismatch.json` fails with settlement constraint mismatch
132+
- [ ] Ed25519 signature verification succeeds for valid artifacts
133+
- [ ] Ed25519 signature verification fails for tampered artifacts
134+
- [ ] Trust Bundle key resolution works (`resolveFromTrustBundle`)
135+
- [ ] Expired Trust Bundles are rejected
136+
137+
### L3 (Profile)
138+
139+
- [ ] `allowedRails` in policy is a subset of the profile's permitted rails
140+
- [ ] Asset constraints match profile definition (e.g., XRPL stablecoin: `kind: IOU`, valid `issuer`)
141+
- [ ] Profile-specific checks pass (e.g., `offlineMaxSinglePayment` for fleet-offline)
142+
- [ ] `mpcp policy-summary` with `--profile` flag reports no violations
143+
144+
---
13145

14146
## Verification Vectors
15147

@@ -20,25 +152,17 @@ The reference implementation includes golden vectors in `test/vectors/` for conf
20152
- `budget-exceeded.json` — Amount exceeds budget, must fail
21153
- `settlement-mismatch.json` — Settlement does not match SBA constraints, must fail
22154

23-
Run the conformance tests:
24-
25-
```bash
26-
npm test
27-
npx mpcp verify test/vectors/valid-settlement.json --explain
28-
```
29-
30-
## Self-Assessment
155+
Additional hash vectors are in [`mpcp-spec/test-vectors/`](https://github.com/mpcp-protocol/mpcp-spec/tree/main/test-vectors):
31156

32-
Implementers should verify:
157+
- `expected-hashes.json` — canonical hash reference for L0
158+
- `*-v1-minimal.json` — structural fixtures for L1
33159

34-
1. **Artifact structure** — All required fields present, types correct
35-
2. **Canonical JSON** — Deterministic serialization for hashing
36-
3. **Domain-separated hashing** — Correct prefix per artifact type
37-
4. **Signature verification** — Valid key resolution and signature check
38-
5. **Constraint propagation** — SBA ⊆ PolicyGrant
160+
---
39161

40162
## See Also
41163

164+
- [Test Vectors — Conformance Levels](https://github.com/mpcp-protocol/mpcp-spec/blob/main/test-vectors/CONFORMANCE.md) — L0 / L1 / L2 definitions in the spec repo
42165
- [MPCP Reference Flow](https://github.com/mpcp-protocol/mpcp-spec/blob/main/docs/architecture/reference-flow.md) — Canonical flow for EV charging
43166
- [Verifier](verifier.md) — Verification pipeline
167+
- [Reference Profiles](reference-profiles.md) — Named deployment profiles for L3
44168
- [Protocol: mpcp](https://github.com/mpcp-protocol/mpcp-spec/blob/main/docs/protocol/mpcp.md) — Full specification

0 commit comments

Comments
 (0)