# ModelRegistry — 模型确权 + 见证人轮换

## 设计

* publisher 注册 modelHash + attestor 公钥地址
* attestor 是 EcdsaInferenceVerifier 信任的签名者
* publisher 可调用 setAttestor 轮换 attestor key

## 关键约束

* modelHash 全局唯一
* publisher 永久不可改
* attestor 可轮换（但旧 receipt 仍用旧 attestor 验签——history immutable）
* deactivate 模型 = isActive = false（旧 receipt 仍 valid）

## 接口

```solidity
function registerModel(bytes32 modelHash, address attestor, string contentURI)
function setAttestor(bytes32 modelHash, address newAttestor)
function deactivateModel(bytes32 modelHash)
function getAttestor(bytes32 modelHash) returns (address)
```

## 主网前必备

* attestor 私钥入 HSM / KMS
* multi-sig publisher 推荐（防单点失误）
* ZK swap (ZkmlInferenceVerifier 真 EZKL) 后 attestor 信任降级


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yellowpaper.axblade.io/registries-que-quan/model-registry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
