Topic Title
ERC-8220: Canonical POV Serialization & Semantic Reproducibility — Reference Specification Draft
Body
This post proposes a concrete technical extension to ERC-8220 addressing the semantic comparability gap identified in the initial discussion thread.
Background
ERC-8220 as currently specified guarantees tamper-proof anchoring of evaluation outputs. It does not guarantee that scores are comparable or interpretable across independent evaluator implementations.
A score of 8750 from evaluator A and a score of 8750 from evaluator B may measure different properties, apply different rulesets, or operate on different input sets. Without semantic anchoring, on-chain scores are evaluator-local signals rather than system-wide governance primitives.
Proposed Extension: AttestedScore
We propose replacing the raw uint256 score return type in IComplianceEvaluator with a minimal semantic tuple:
struct AttestedScore {
uint256 score; // 0–10000 basis points
bytes32 vsVersion; // keccak256 of canonical methodology specification
bytes32 povHash; // keccak256 of canonical POV serialization
}
function evaluate(address agent) external view returns (AttestedScore memory);
Two scores are semantically comparable if and only if they share identical vsVersion and povHash. This is a necessary condition; evaluator implementations must additionally be deterministic.
POV Definition
A POV (Point of Validation) is a fully specified evaluation context tuple:
POV {
inputs: ordered set of agent data submitted for evaluation
methodology: ruleset name, version, and parameters
evaluatorSet: ordered set of participating validator addresses
}
povHash = keccak256(canonicalPOVJSON)
vsVersion = keccak256(canonicalMethodologyJSON)
Canonical Serialization Rules
To guarantee cross-node hash reproducibility, all POV payloads must be serialized under the following rules:
-
Encoding: UTF-8, NFC normalized (canonical decomposition followed by canonical composition)
-
Format: compact JSON, no external whitespace
-
Key ordering: UTF-8 bytewise lexicographic sort at every nesting level
-
Locale-sensitive comparison functions (e.g.
localeCompare) are prohibited -
No floating-point values
-
Integers: JSON number type, no leading zeros, no quotes (unless > 2^53-1)
-
Addresses: lowercase,
0x-prefixed, 42 characters -
Bytes32 values: lowercase,
0x-prefixed, 66 characters -
Booleans: JSON native
true/false -
Null fields: omitted entirely
-
evaluatorSet: sorted lexicographically by address string -
inputs: sorted byidfield, UTF-8 bytewise ascending
This specification is provisional. RFC 8785 (JCS) compatibility is under evaluation for a future revision.
evidenceURI Payload
Each anchored score references an off-chain evidence payload with the following canonical structure:
{
"logHash": "0x<sha256 of raw execution log>",
"modelSignature": "pending_tee",
"povHash": "0x<bytes32>",
"score": 8750,
"timestamp": 1747392000,
"vsVersion": "0x<bytes32>"
}
modelSignature is an explicit placeholder until verifiable TEE attestation infrastructure (SGX, SEV, Nitro, or equivalent) is operational. No hardware attestation is implied in the current implementation.
Identity Layer
IAgentRegistry binds agent addresses to compressed secp256k1 public keys (33 bytes, prefix 0x02 or 0x03). Registration and authorization are separate explicit steps. No score is processed before isAuthorized() returns true for the requesting agent.
Verdict Terminology
Protocol verdicts use neutral, portable terms:
| Verdict | Meaning |
|---|---|
COMPLIANT |
Score meets or exceeds the governance policy threshold |
NON_COMPLIANT |
Score falls below the governance policy threshold |
Assertions are immutable once anchored. They may be superseded by newer governance assertions from subsequent evaluation cycles. Immutability of a historical assertion does not imply perpetual governance validity.
Scope
This extension addresses semantic comparability and deterministic reproducibility. It does not address evaluator methodology correctness, governance threshold calibration, or cross-chain assertion portability.
Reference Implementation
XHRONOS — Base Mainnet
Reference implementation and ongoing ERC-8220 semantic reproducibility research.
Full specification artifacts available on request.