Skip to main content

Schema Registry

Purpose​

Store and expose schema metadata for data package validation.

Scope​

This contract records schema identifiers and related metadata. It does not validate data or manage provider scores.

Actors and Roles​

  • Any actor can register a new schema version in MVP.
  • Governance control is a future upgrade (not present in current contract).

State and Storage Model (High-Level)​

  • Schema records keyed by schemaId and version.
  • Each record stores a URI, schema hash, and registration timestamp.

Core Flows (State Machine)​

  • Register a new schema version (immutable once stored).

Protocol Guarantees​

  • A schema version cannot be overwritten once registered.
  • Each registration is auditable via SchemaRegistered.

Security Invariants​

  • A schema version cannot be overwritten once registered.

Threat Model​

  • Malicious schema metadata intended to mislead integrators.

Economic Constraints​

No direct economic flows are managed by this contract.

Governance and Admin Controls​

No owner or governance controls in the current contract. Future versions may add role gating.

Events (Optional)​

  • SchemaRegistered(schemaId, version, uri, schemaHash)

Integration Notes​

  • Validate schemas off-chain using the published metadata references.

Test Coverage Map (No Code)​

  • Registration and update workflows.
  • Authorization coverage for schema changes.