Files
ssw-mpc/deploy/ray/start-node.sh
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

27 lines
848 B
Bash
Executable File
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.
#!/usr/bin/env bash
# 在各机构机器上启动一个 Ray worker 节点,并打上该方的资源标签。
#
# 用法:
# bash deploy/ray/start-node.sh alice <head-host>:6379
#
# 资源标签是整套方案的关键:nax 提交任务时声明 resources={"alice_node": 1},
# Ray 就只会把该任务调度到这台机器上 —— 数据不出域的物理保证。
set -euo pipefail
SITE="${1:?用法: start-node.sh <site-name> [head-address]}"
HEAD="${2:-}"
TAG="${SITE}_node"
if ! command -v ray >/dev/null 2>&1; then
echo "未找到 ray。先 pip install 'ray[default]'" >&2
exit 1
fi
ARGS=(--num-cpus=1 --num-gpus=0 --resources="{\"${TAG}\": 1}")
if [[ -n "$HEAD" ]]; then
ARGS+=(--address="$HEAD")
fi
echo "启动 Ray 节点: site=${SITE} tag=${TAG} head=${HEAD:-<本机为 head>}"
exec ray start "${ARGS[@]}" --block