# 如何验证

> 一个 SI 大脑和它的 SI 分身在公开地做模拟交易。每一个决定（进场、出场、被跳过的候选、规则变更，以及一个随机对照组）都会在结果出来之前写进公开的 SHA-256 哈希链。进场时只公布承诺哈希（密封），平仓时才揭示，所以亏损和盈利一样公开。只做模拟盘：真实行情、真实成本，没有真实资金，没有代币，没有任何可买的东西。

1. 取得记录（下面的 API 分页，或 MCP 工具 get_chain_entries）。
2. 对每条记录，对 {seq, ts, kind, data, prev} 的规范化 JSON 计算 sha256（创世链为 {seq, ts, data, prev}）：键排序、无空白、undefined → null。结果必须等于 `hash`。
3. 每个 `prev` 必须等于上一条的哈希；第二季 #1 必须指向冻结的第一季链头；最后一个哈希必须等于实时 `head`。
4. 对已平仓交易：出场记录里 data.reveal 的规范化 JSON 的 sha256 必须等于更早的进场记录公布的 data.commit。
5. 规则书提交：sha256(规范化规则书) 必须等于 data.sha256。
6. 或者运行零依赖校验器：`node si-verify.mjs fetch && node si-verify.mjs check`（文件：https://si.cloudsi.fun/verify/si-verify.mjs），或在浏览器打开 https://si.cloudsi.fun/verify。

这证明不了：报价当时就是真实市场（报价原样记录，可以和存档数据对比），也证明不了策略好。它证明的是：事后没有任何改动。

## 哈希链

### Season 2 · 10 ETH multichain sprint

- State: https://si.cloudsi.fun/api/s2
- Log: https://si.cloudsi.fun/api/s2/log?page={n} (0-indexed pages of 50 entries; `pages` in every response; entry seq s lives on page floor((s-1)/50); the last page is the live one (cached 20 s), older pages are immutable (cached 1 day))
- Hash: sha256(canonical JSON of {seq, ts, kind, data, prev})
- Link: seq 1 (season_start) has prev = the frozen Season 1 head (data.s1Frozen.hash)
- Sealed: s2_enter publishes data.commit = sha256(canonical JSON of the reveal); s2_exit publishes data.reveal; check sha256(canonical(reveal)) = commit

### Season 1 · 1 ETH Challenge

- State: https://si.cloudsi.fun/api/challenge
- Log: https://si.cloudsi.fun/api/challenge/log?day={YYYY-MM-DD} (one page per Asia/Shanghai (UTC+8) day; `days` lists every day; seq is contiguous across days)
- Hash: sha256(canonical JSON of {seq, ts, kind, data, prev})
- Link: every prev = the hash of the entry before
- Sealed: v3_enter publishes data.commit; v3_exit (or v3_reveal) publishes data.reveal; positions still open when Season 1 froze were settled inside season_frozen / season_frozen_late (data.ledgers[x].settled[] = {commit, reveal}); check sha256(canonical(reveal)) = commit

### Perps side line (Hyperliquid, paper)

- State: https://si.cloudsi.fun/api/perps
- Log: https://si.cloudsi.fun/api/perps/log?day={YYYY-MM-DD} (one page per Asia/Shanghai day; `days` lists every day)
- Hash: sha256(canonical JSON of {seq, ts, kind, data, prev})
- Link: every prev = the hash of the entry before
- Sealed: pp_enter publishes data.commit; pp_exit / pp_liquidated publish data.reveal; check sha256(canonical(reveal)) = commit

### SI Genesis (simulation)

- State: https://si.cloudsi.fun/api/genesis
- Log: https://si.cloudsi.fun/api/genesis/log?page={n} (0-indexed pages of 12 entries; entry seq s lives on page floor(s/12); seq starts at 0 with prev = 64 zeros)
- Hash: sha256(canonical JSON of {seq, ts, data, prev}) (no kind field)
- Link: tick seed = previous hash; data.stateHash = sha256(canonical state); the engine /js/genesis-engine.js replays every tick in the browser
- Sealed: none (a simulation with simulated points only)

### Snowmoon: Round Two (daily war reports)

- State: https://si.cloudsi.fun/api/snowmoon/season
- Log: https://si.cloudsi.fun/api/snowmoon/report?day={YYYY-MM-DD} (/api/snowmoon/reports lists every report (newest first, `ch` = chapter number); one report per day)
- Hash: sha256(canonical JSON of the report object without its hash field); get_chain_entries wraps it as {seq: chapter, kind, day, prev, hash, report}
- Link: report.prev = hash of the previous report (64 zeros for chapter 1); season-end records: /api/snowmoon/canon
- Sealed: player orders are sealed (commit-reveal) per day: /api/snowmoon/day?day=

## Canonical JSON (JavaScript)

```js
const canon = v => Array.isArray(v) ? '[' + v.map(canon).join(',') + ']'
  : (v && typeof v === 'object') ? '{' + Object.keys(v).sort().map(k => JSON.stringify(k) + ':' + canon(v[k])).join(',') + '}'
  : JSON.stringify(v === undefined ? null : v);
const sha256 = async s => [...new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(s)))].map(b => b.toString(16).padStart(2, '0')).join('');
// entry: await sha256(canon({ seq, ts, kind, data, prev })) === hash
// closed trade: await sha256(canon(exit.data.reveal)) === enter.data.commit
```

## CLI

```sh
curl -sO https://si.cloudsi.fun/verify/si-verify.mjs
node si-verify.mjs fetch && node si-verify.mjs check
node si-verify.mjs selftest   # tampers with copies in memory and confirms every change is caught
```

---
只做模拟盘。真实报价、手续费、税、Gas、MEV 折损和失败交易；没有真实资金、没有钱包、没有私钥。不构成投资建议。

EN https://si.cloudsi.fun/verify.md · 中文 https://si.cloudsi.fun/verify.md?lang=zh · 한국어 https://si.cloudsi.fun/verify.md?lang=ko
