Skip to content

Replace single-hash setMatureModel with shard manifest #9

@EightRice

Description

@EightRice

Goal

When the trained model gets too large to live as a single blob, the on-chain pointer should reference a manifest describing the shards instead of one weights file.

Current state

RPB.setMatureModel(_weightsCid, _price) stores a single sha256 hex string. Suitable while models fit in one blob; not suitable once sharding.py (10+4 erasure-coded) starts producing distributed checkpoints for inference.

Proposed manifest schema

{
  "version": 1,
  "model_kind": "vl-jepa" | "llm-backbone" | "simplenet",
  "total_size": <bytes>,
  "shards": [
    {"index": 0, "hash": "<sha256>", "size": <bytes>, "is_parity": false},
    ...
  ],
  "erasure": {"data": 10, "parity": 4, "codec": "replica" | "rs"},
  "merkle_root": "<sha256>"
}

The manifest itself lives in the blob store; the contract holds the manifest's sha256 hex.

Scope

  • Add nodes/common/manifest.py with the schema and a producer that consumes sharding.py output.
  • Aggregator publishes the manifest blob and calls setMatureModel(manifestHash, price).
  • Inference-side loader resolves the manifest, fetches shards via existing P2P blob protocol, verifies merkle root.
  • ABI of setMatureModel stays unchanged — semantics of the string change from "weights blob hash" to "manifest blob hash."

Acceptance

  • A trained sharded model can be published end-to-end: aggregator → manifest → setMatureModel → inference node loads it.
  • Documentation updated to reflect the manifest semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    track:infraP2P, libp2p, blob store, contracts deploymenttrack:productEconomics, alignment pricing, governance, constitutiontype:contractTouches Solidity / on-chain surfacetype:featureNew capability

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions