Files
ssw-mpc/deploy/ray/README.md
T
ssw c5b2cf69a5 feat: nax-rs P0/P1/P1.5 —— Rust 重写隐私计算框架
算子核(nax-core):零依赖 no_std
- Z_2^64 定点算术 + AVX2 矩阵乘,与 Python 参考实现 215 条逐位一致
- 加性分享 / Beaver 三元组 / 截断对 / edaBit,ChaCha20 PRG,SHA-256
- 自实现银行家舍入(f64::round_ties_even 是 std-only,no_std 编不过)

协议栈
- nax-proto:手写帧协议(12 字节头 + u64 payload),无 protobuf 依赖
- nax-vault:Beaver 乘 / 定点截断 / open / reveal
- nax-node:TCP 传输 + 密文会话 + PSI 会话
- nax-psi:X25519 ECDH-PSI(唯一外部依赖 dalek,因恒定时间约束)
- nax-tee:HAL trait(seal/unseal/attest/sign)+ Mock + TrustPlan 四级降级

验收
- 83 用例全绿;armv7 全 workspace 编译通过
- 两进程密文计算:(1·4+1)+(2·5+1)+(3·6+1) = 35
- 两进程 PSI:[1..5] ∩ [3..7] = {3,4,5}
- 单二进制 450 KB,零运行时依赖

文档
- docs/ARCHITECTURE.md:分层、Ray 定位、TEE 分工与降级梯度
- docs/ZYNQ.md:A9 性能预算(比 i5 慢 8-12x,非 50x)与部署形态
2026-10-29 11:10:54 +08:00

45 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Ray 部署编排(不进计算路径)
Ray 在这里只做一件事:**把 `nax-node` 拉起,并保证每一方落在它自己的机器上**。
计算不走 Ray —— 不走 object store、不走 cloudpickle、不走 actor 调用。
节点之间用 nax 自己的帧通信。
## 为什么这样切
Ray 唯一不可替代的能力是**自定义资源调度**:
```bash
# alice 的机器
ray start --address=ray://head:10001 --num-cpus=1 --resources='{"alice_node": 1}'
# bob 的机器
ray start --address=ray://head:10001 --num-cpus=1 --resources='{"bob_node": 1}'
```
`{"alice_node": 1}` 这种资源标签让 Ray 能保证"跑 alice 的进程只在 alice 的机器上",
这一点自己写调度要花不少功夫。
但如果让 Ray 承载**计算**,就会引入四个二进制化的硬伤(见
`docs/ARCHITECTURE.md#2-为什么不是每方一个-ray-actor`):函数要 cloudpickle
序列化、对象所有权在 object store、GCS/raylet 一整套进程、异常跨语言传播。
所以:**Ray 管进程,不管数据**。
## 用法
```bash
# 1. 在各机构机器上起 Ray 节点(带自定义资源标签)
bash deploy/ray/start-node.sh alice
# 2. 从 head 提交 nax 集群
ray job submit --address=http://head:8265 \
--runtime-env deploy/ray/runtime-env.yaml \
-- bash deploy/ray/launch.sh
```
`launch.sh` 里对每个 site 提交一个 `nax node` 进程,用资源标签锁定落点。
## 状态
🚧 骨架。等 `nax-node` 可运行后才能真正验证(P5)。