Conformance
MPCP implementations can be verified for conformance to the protocol specification.
Conformance Levels
| Level | Scope | Description |
|---|---|---|
| Artifact | Single artifact | Produces valid PolicyGrant, SBA, SPA, SettlementIntent per spec |
| Chain | Full authorization chain | Links artifacts correctly (policyHash, sessionId, constraints) |
| Verification | Settlement verification | Passes all verification checks for valid bundles |
| Profile | Deployment profile | Matches a reference profile (parking, charging, fleet-offline, hosted-rail) |
Verification Vectors
The reference implementation includes golden vectors in test/vectors/ for conformance testing:
valid-settlement.json— Full valid chain, must passexpired-grant.json— Expired PolicyGrant, must failbudget-exceeded.json— Amount exceeds budget, must failintent-hash-mismatch.json— Intent hash mismatch, must failsettlement-mismatch.json— Settlement does not match SPA, must fail
Run the conformance tests:
npm test
npx mpcp verify test/vectors/valid-settlement.json --explain
Self-Assessment
Implementers should verify:
- Artifact structure — All required fields present, types correct
- Canonical JSON — Deterministic serialization for hashing
- Domain-separated hashing — Correct prefix per artifact type
- Signature verification — Valid key resolution and signature check
- Constraint propagation — SBA ⊆ PolicyGrant, SPA ⊆ SBA
See Also
- MPCP Reference Flow — Canonical flow for EV charging
- Verifier — Verification pipeline
- Protocol: mpcp — Full specification