Skip to content

Fix services field names: spec uses name+endpoint, not type+url #3

Description

@a6b8

Problem

The RegistrationValidator currently treats type and url as the spec-defined field names for service objects, and warns when name or endpoint are used instead:

  • REG-023: Uses "name" instead of spec-defined "type" — fires when name is present but type is not
  • REG-025: Uses "endpoint" instead of spec-defined "url" — fires when endpoint is present but url is not

This is inverted. The ERC-8004 spec defines services as:

{
  "name": "MCP",
  "endpoint": "https://mcp.agent.eth/",
  "version": "2025-06-18"
}

name and endpoint are the correct spec-defined field names.

Impact

  • 14,940 false REG-023 warnings across Ethereum, Base, and Other Chains datasets
  • 15,814 false REG-025 warnings across all datasets
  • Valid registrations are incorrectly flagged as non-compliant

Required Changes

In RegistrationValidator.mjs#validateServices():

  1. name is the spec-defined field — accept it as correct, warn when only type is present (inverted from current logic)
  2. endpoint is the spec-defined field — accept it as correct, warn when only url is present (inverted from current logic)
  3. version is an optional valid field — do not flag it as unknown
  4. skills and domains are valid for OASF services — do not flag them as unknown

Spec Reference (services example)

"services": [
  { "name": "web", "endpoint": "https://web.agentxyz.com/" },
  { "name": "A2A", "endpoint": "https://agent.example/.well-known/agent-card.json", "version": "0.3.0" },
  { "name": "MCP", "endpoint": "https://mcp.agent.eth/", "version": "2025-06-18" },
  { "name": "OASF", "endpoint": "ipfs://{cid}", "version": "0.8", "skills": [], "domains": [] },
  { "name": "ENS", "endpoint": "vitalik.eth", "version": "v1" },
  { "name": "DID", "endpoint": "did:method:foobar", "version": "v1" },
  { "name": "email", "endpoint": "mail@myagent.com" }
]

Validation Data

Validated against ~69,000 Dune-downloaded on-chain registration events (Ethereum: 29,664 / Base: 34,520 / Other Chains: 5,000).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions