filecoin benchmarks

1,filecoin benchmarks

  • rust安装
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# rustc --version
rustc 1.42.0 (b8cedc004 2020-03-09)

2,设置环境变量

  • 使用终端代理
# export ALL_PROXY=socks5://127.0.0.1:1080
# git config --global http.proxy 'socks5://127.0.0.1:1080'
# export GO111MODULE=on
# export GOPROXY=https://goproxy.cn

3,下载源代码编译安装

# git clone --branch testnet/3 https://github.com/filecoin-project/lotus.git
# git show
commit fd78f30204abd4b142419415c0e7f8b756fd1823 (HEAD -> testnet/3, origin/testnet/3)
Merge: 3bbbefd3 2384c673
Author: Whyrusleeping <[email protected]>
Date:   Tue Apr 21 15:23:49 2020 -0700

    Merge pull request #1568 from filecoin-project/feat/fix-reward-redeem

    fix reward redeem command to work again
# env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps bench
  • 报错
rm -rf  build/.filecoin-install build/.update-modules  lotus lotus-storage-miner lotus-seal-worker lotus-shed lotus-seed pond townhall fountain chainwatch bench stats health
make -C extern/filecoin-ffi/ clean
make[1]: 进入目录“/root/lotus/extern/filecoin-ffi”
make[1]: *** 没有规则可制作目标“clean”。 停止。
make[1]: 离开目录“/root/lotus/extern/filecoin-ffi”
Makefile:180: recipe for target 'clean' failed
make: [clean] Error 2 (已忽略)
git submodule update --init --recursive
子模组 'extern/filecoin-ffi'(https://github.com/filecoin-project/filecoin-ffi.git)未对路径 'extern/filecoin-ffi' 注册
子模组 'extern/serialization-vectors'(https://github.com/filecoin-project/serialization-vectors)未对路径 'extern/serialization-vectors' 注册
正克隆到 '/root/lotus/extern/filecoin-ffi'...
正克隆到 '/root/lotus/extern/serialization-vectors'...
fatal: unable to access 'https://github.com/filecoin-project/serialization-vectors/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
fatal: 无法克隆 'https://github.com/filecoin-project/serialization-vectors' 到子模组路径 '/root/lotus/extern/serialization-vectors'
克隆 'extern/serialization-vectors' 失败。按计划重试
正克隆到 '/root/lotus/extern/serialization-vectors'...
fatal: unable to access 'https://github.com/filecoin-project/serialization-vectors/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
fatal: 无法克隆 'https://github.com/filecoin-project/serialization-vectors' 到子模组路径 '/root/lotus/extern/serialization-vectors'
第二次尝试克隆 'extern/serialization-vectors' 失败,退出
Makefile:39: recipe for target 'build/.update-modules' failed
make: *** [build/.update-modules] Error 1
  • 设置环境变量
# export RUSTFLAGS="-C target-cpu=native -g"
# export FFI_BUILD_FROM_SOURCE=1
  • 编译
make deps bench
# export FIL_PROOFS_MAXIMIZE_CACHING=1
# export RUST_LOG=info

参考:

  1. benchmarks github
  2. Rust 安装
  3. git socks5 代理
发布了672 篇原创文章 · 获赞 195 · 访问量 129万+

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/105674010