chiavdf:Chia VDF 工具集
Chia 的 VDF 实现,提供 CPU/ASIC timelord 客户端、基准测试、硬件测试和 Python 绑定。
- 浏览
- 11
- 访问
- 0
- 下载
- 0
- 版本
- v1.2.2
- 平台
- Windows、macOS、Linux
详细介绍
项目简介
chiavdf 是 Chia 网络 timelord 使用的可验证延迟函数(VDF)的 C++ 实现,支持 Linux(x86_64、arm64)、macOS(Intel、Apple Silicon)和 Windows(x64)。它既提供 CPU 软件 timelord 客户端,也包含 Chia VDF ASIC 的客户端与测试工具,以及 chia-blockchain 用于验证时间证明的 Python 绑定。
主要功能
vdf_client:CPU 软件 timelord 客户端,计算 timelord 请求的 Proof of Time。vdf_bench:CPU 基准测试,估算每秒迭代次数;x86/x64 可用./vdf_bench square_asm 250000,非 x86 可用./vdf_bench square 250000。hw_vdf_client、hw_test:Chia VDF ASIC 板卡的客户端与板卡测试。emu_hw_vdf_client、emu_hw_test:无需硬件的模拟器,用于 CI 和开发。chiavdfPython 绑定:供 chia-blockchain 验证时间证明,可选构建chiavdfc共享/静态库。- 提供
prover_test、1weso_test、2weso_test等测试工具,以及验证 VDF 证明语料的verify_vdf_corpus。
安装与使用
macOS 可通过 Chia Homebrew tap 安装:
brew install chia-network/chia/chiavdf
Windows 可通过 winget 安装:
winget install --id Chia.chiavdf --exact
Linux 需先添加 Chia apt 仓库,再安装 chiavdf。Python 绑定可单独安装:
pip install chiavdf
运行软件 timelord 时,通常使用 chia-blockchain 的 install-timelord.sh,然后启动:
chia start node timelord
硬件 timelord 使用 ASIC 板卡时:
chia start node timelord-only
hw_vdf_client 8000 3
从源码构建 Python wheel 需要 Python 3.11+、CMake、C++17 编译器和 GMP(Windows 为 MPIR):
pip install wheel setuptools_scm pybind11
BUILD_VDF_CLIENT=N pip wheel .
注意事项
- 硬件 timelord 需要 Chia VDF ASIC 板卡,并按要求安装 FTDI D2XX 驱动;具体见
README_ASIC.md。 hw_vdf_client在多板卡主机上使用--device-loc指定设备位置。- 源码安装的默认行为与之前一致;release 中的 wheel 不受本次源码安装恢复二进制的影响。
prover_test默认执行长时间压力测试,可设置CHIAVDF_PROVER_TEST_FAST=1运行短时间正确性检查。- 可通过
CHIAVDF_LOG_AVX=1输出 AVX 检测日志,并用环境变量控制 AVX2、AVX-512 IFMA 路径。
本作品整理自 GitHub 开源项目 Chia-Network/chiavdf,原作者 @Chia-Network,许可证 Apache-2.0。中文介绍由 AI 根据项目 README 整理,以原仓库为准。
更新记录
- v1.2.2当前版本
源码安装恢复 vdf_client、vdf_bench 及测试二进制并加 CI 检查;hw_vdf_client 新增可选 --expected-serial 和复位初始化;FTDI 下载改用 SHA-256 校验归档。
- v1.2.1
Windows 提供签名 winget 安装包并预置 FTDI 驱动;ASIC timelord 支持实时控制、逐引擎遥测和检查点复用,新增 --segment-threads 选项;新增 prove_low_memory Python API。
评论