欢迎光临
我们一直在努力

chia-plotter(线多线程)P盘绘图工具,官方说明

全球最大交易所币安

国区邀请链接:https://accounts.suitechsui.us/zh-CN/register?ref=16003031 支持86手机号码,网页直接注册。

全球最大交易所币安,国区邀请链接:https://accounts.binance.com/zh-CN/register?ref=16003031  币安一向重视合规,早在2017年就已经退出中国大陆市场,注册不了请用香港IP地址,居住地选中国,认证照旧,邮箱推荐如gmail、outlook。,认证照旧。,居住地选中国,认证照旧。,认证照旧。

目前不清退的交易所推荐:

1、全球第二大交易所OKX欧意,邀请链接: https://www.wrzftwcjoz.com/zh-hans/join/1837888  注册简单,交易不需要实名,新用户能开合约,币种多,交易量大!。

2、老牌交易所比特儿现改名叫芝麻开门 :https://www.gate.ac/signup/XgRDAQ8?ref_type=103  注册简单,交易不需要实名,新用户能开合约,币种多,交易量大!。

【Chia在哪交易?】XCH如何交易,操作教程!

chia-plotter(线多线程)

这是 chia 绘图仪的新实现,它被设计为处理管道,类似于 GPU 的工作方式,只有“核心”是普通的软件 CPU 线程。

因此,这款绘图仪能够充分利用任何存储设备的带宽,只需增加“核心”的数量,即。线程。

用法

For <poolkey> and <farmerkey> see output of `chia keys show`.
<tmpdir> needs about 220 GiB space, it will handle about 25% of all writes. (Examples: './', '/mnt/tmp/')
<tmpdir2> needs about 110 GiB space and ideally is a RAM drive, it will handle about 75% of all writes.
Combined (tmpdir + tmpdir2) peak disk usage is less than 256 GiB.
In case of <count> != 1, you may press Ctrl-C for graceful termination after current plot is finished or double Ctrl-c to terminate immediatelly\

Usage:
  chia_plot [OPTION...]

  -n, --count arg      Number of plots to create (default = 1, -1 = infinite)
  -r, --threads arg    Number of threads (default = 4)
  -u, --buckets arg    Number of buckets (default = 256)
  -t, --tmpdir arg     Temporary directory, needs ~220 GiB (default = $PWD)
  -2, --tmpdir2 arg    Temporary directory 2, needs ~110 GiB [RAM] (default = <tmpdir>)
  -d, --finaldir arg   Final directory (default = <tmpdir>)
  -p, --poolkey arg    Pool Public Key (48 bytes)
  -f, --farmerkey arg  Farmer Public Key (48 bytes)
      --help           Print help

<threads>如果您有足够的内核,请确保启动,默认值为 4。根据阶段将启动更多线程,该设置只是一个乘数。

RAM 使用量取决于<threads><buckets>。使用 256 个存储桶的新默认值,每个线程最多约为 0.5 GB。

Linux 上的 RAM 磁盘设置

sudo mount -t tmpfs -o size=110G tmpfs /mnt/ram/

注意:RAM 磁盘至少需要 128 GiB 系统 RAM。

测试

在具有 256GB RAM 和 3x800GB SATA SSD RAID0的双 Xeon (R) E5-2650v2 @ 2.60GHz R720 上,使用 110G tmpfs 用于<tmpdir2>

Number of Threads: 16
Number of Buckets: 2^8 (256)
Working Directory:   /mnt/tmp3/chia/tmp/ 
Working Directory 2: /mnt/tmp3/chia/tmp/ram/
[P1] Table 1 took 17.2488 sec
[P1] Table 2 took 145.011 sec, found 4294911201 matches
[P1] Table 3 took 170.86 sec, found 4294940789 matches
[P1] Table 4 took 203.713 sec, found 4294874801 matches
[P1] Table 5 took 201.346 sec, found 4294830453 matches
[P1] Table 6 took 195.928 sec, found 4294681297 matches
[P1] Table 7 took 158.053 sec, found 4294486972 matches
Phase 1 took 1092.2 sec
[P2] max_table_size = 4294967296
[P2] Table 7 scan took 15.5542 sec
[P2] Table 7 rewrite took 37.7806 sec, dropped 0 entries (0 %)
[P2] Table 6 scan took 46.7014 sec
[P2] Table 6 rewrite took 65.7315 sec, dropped 581295425 entries (13.5352 %)
[P2] Table 5 scan took 45.4663 sec
[P2] Table 5 rewrite took 61.9683 sec, dropped 761999997 entries (17.7423 %)
[P2] Table 4 scan took 44.8217 sec
[P2] Table 4 rewrite took 61.36 sec, dropped 828847725 entries (19.2985 %)
[P2] Table 3 scan took 44.9121 sec
[P2] Table 3 rewrite took 61.5872 sec, dropped 855110820 entries (19.9097 %)
[P2] Table 2 scan took 43.641 sec
[P2] Table 2 rewrite took 59.6939 sec, dropped 865543167 entries (20.1528 %)
Phase 2 took 620.488 sec
Wrote plot header with 268 bytes
[P3-1] Table 2 took 73.1018 sec, wrote 3429368034 right entries
[P3-2] Table 2 took 42.3999 sec, wrote 3429368034 left entries, 3429368034 final
[P3-1] Table 3 took 68.9318 sec, wrote 3439829969 right entries
[P3-2] Table 3 took 43.8179 sec, wrote 3439829969 left entries, 3439829969 final
[P3-1] Table 4 took 71.3236 sec, wrote 3466027076 right entries
[P3-2] Table 4 took 46.2887 sec, wrote 3466027076 left entries, 3466027076 final
[P3-1] Table 5 took 70.6369 sec, wrote 3532830456 right entries
[P3-2] Table 5 took 45.5857 sec, wrote 3532830456 left entries, 3532830456 final
[P3-1] Table 6 took 75.8534 sec, wrote 3713385872 right entries
[P3-2] Table 6 took 48.8266 sec, wrote 3713385872 left entries, 3713385872 final
[P3-1] Table 7 took 83.2586 sec, wrote 4294486972 right entries
[P3-2] Table 7 took 56.3803 sec, wrote 4294486972 left entries, 4294486972 final
Phase 3 took 733.323 sec, wrote 21875928379 entries to final plot
[P4] Starting to write C1 and C3 tables  
[P4] Finished writing C1 and C3 tables   
[P4] Writing C2 table
[P4] Finished writing C2 table
Phase 4 took 84.6697 sec, final plot size is 108828428322 bytes
Total plot creation time was 2530.76 sec 

如何验证

为确保绘图有效,您可以使用chiapos 中ProofOfSpace工具:

git clone https://github.com/Chia-Network/chiapos.git
cd chiapos && mkdir build && cd build && cmake .. && make -j8
./ProofOfSpace check -f plot-k32-???.plot [num_iterations]

未来的计划

我确实有一些 GPU 挖矿的历史,早在 2014 年,我就第一个开源了 XPM GPU 矿机,它的效率比 CPU 矿机高出大约 40 倍。请参阅我的其他回购。

因此,我将添加 OpenCL 支持以进一步加快绘图仪的速度,从而减轻 CPU 的大部分负载,这只是时间问题。

依赖关系

  • cmake (>=3.14)
  • libsodium-dev

安装


视窗

stotiks构建的二进制文件可以在这里找到:https : //github.com/stotiks/chia-plotter/releases


拱形Linux

首先,从 pacman 安装依赖项:

sudo pacman -S cmake libsodium gmp gcc10

然后,获取并编译项目:

# Checkout the source
git clone https://github.com/madMAx43v3r/chia-plotter.git
cd chia-plotter

# Use gcc10 during build
export CC=gcc-10
export CXX=g++-10
# Init submodules
git submodule update --init
# Compile
./make_devel.sh
./build/chia_plot --help

CentOS 7

git clone https://github.com/madMAx43v3r/chia-plotter.git
cd chia-plotter

git submodule update --init
sudo yum install epel-release -y
sudo yum install cmake3 libsodium libsodium-static -y
ln /usr/bin/cmake3 /usr/bin/cmake
# Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
sudo yum install centos-release-scl -y
# Install the collection:
sudo yum install devtoolset-7 -y
# Start using software collections:
scl enable devtoolset-7 bash
./make_devel.sh
./build/chia_plot --help

清除 Linux

读取安装文件


Ubuntu 20.04

sudo apt install -y libsodium-dev cmake g++ git
# Checkout the source and install
git clone https://github.com/madMAx43v3r/chia-plotter.git 
cd chia-plotter

git submodule update --init
./make_devel.sh
./build/chia_plot --help

二进制文件最终会在build/,您可以自由地将它们复制到其他地方(在同一台机器或类似的操作系统上)。


Debian 10(“破坏者”)

确保将 buster-backports 添加到您的 sources.list 否则安装将失败,因为旧的 cmake 版本。请参阅debian backport 文档以供参考。

# Install cmake 3.16 from buster-backports
sudo apt install -t buster-backports cmake
sudo apt install -y libsodium-dev g++ git
# Checkout the source and install
git clone https://github.com/madMAx43v3r/chia-plotter.git 
cd chia-plotter

git submodule update --init
./make_devel.sh
./build/chia_plot --help

二进制文件最终会在build/,您可以自由地将它们复制到其他地方(在同一台机器或类似的操作系统上)。


苹果系统

首先,您需要安装一个名为BrewXcodeCommandLineTools的包管理器。

# Alternative way to download CommandLineTools on Terminal:
xcode-select --install

brew install libsodium cmake git autoconf automake libtool wget

# If you downloaded Xcode run these:
sudo ln -s /usr/local/include/sodium.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
sudo ln -s /usr/local/include/sodium /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/

# If you downloaded CommandLineTools run these:
sudo ln -s /usr/local/include/sodium.h /Library/Developer/CommandLineTools/usr/include
sudo ln -s /usr/local/include/sodium /Library/Developer/CommandLineTools/usr/include

brew link cmake

在应用以下命令之前确认您的 Mac 上有哪个目录

wget https://raw.githubusercontent.com/facebookincubator/fizz/master/build/fbcode_builder/CMake/FindSodium.cmake -O /usr/local/opt/cmake/share/cmake/Modules/FindSodium.cmake

或者

wget https://raw.githubusercontent.com/facebookincubator/fizz/master/build/fbcode_builder/CMake/FindSodium.cmake -O /opt/homebrew/Cellar/cmake/3.20.3/share/cmake/Modules/FindSodium.cmake
git clone https://github.com/madMAx43v3r/chia-plotter.git 
cd chia-plotter
git submodule update --init
./make_devel.sh
./build/chia_plot --help

如果出现最大打开文件限制错误(默认操作系统设置为 256,对于默认存储桶大小来说太低256),请在启动绘图仪之前运行此设置

ulimit -n 3000

此文件限制更改只会影响当前会话。

在 Docker 容器中运行

在某些设置和场景中,在 Docker 容器内运行绘图仪可能很有用。这chia-plotter在 Windows 中运行时可能很有用。

为此,请在您的计算机中安装 Docker,然后运行以下命令:

docker run \
  -v <path-to-your-tmp-dir>:/mnt/harvester \
  -v <path-to-your-final-dir>:/mnt/farm \
  odelucca/chia-plotter \
    -t /mnt/harvester/ \
    -d /mnt/farm/ \
    -p <pool-key> \
    -f <farm-key> \
    -r <number-of-CPU-cores>

?您可以在图像名称 ( odelucca/chia-plotter)后提供任何绘图仪参数

在 Linux 基准测试中,我们发现在 Docker 中运行对性能的影响仅比在本机操作系统中运行高 5%。

对于 Windows 用户,您应该检查您的 Docker 配置是否有任何 RAM 或 CPU 限制。由于 Docker 在 HyperV 内运行,这可能会限制您的硬件使用。在任何情况下,您都可以使用-m标志(在docker run命令之后)设置 RAM 限制。

关于 Docker 中的多线程

在 Windows 中运行时,您可能需要正确配置 Docker 以允许多 CPU。您可以按照本文进行操作

简而言之,您也可以将--cpus标志传递给您的docker run命令以获得相同的结果。

因此,例如,以下命令:

docker run \
  -v <path-to-your-tmp-dir>:/mnt/harvester \
  -v <path-to-your-final-dir>:/mnt/farm \
  -m 8G \
  --cpus 8 \
  odelucca/chia-plotter \
    -t /mnt/harvester/ \
    -d /mnt/farm/ \
    -p <pool-key> \
    -f <farm-key> \
    -r 8

将使用 8 个 CPU 和 8GB 的​​ RAM 运行您的绘图仪。


已知的问题

  • 不使用 gcc-11 编译,请使用较低版本。
  • 至少需要 cmake 3.14(因为 bls-signatures)

如何在 18.04 上安装最新的 cmake

https://askubuntu.com/questions/1203635/installing-latest-cmake-on-ubuntu-18-04-3-lts-run-via-wsl-openssl-error

推荐:全球第二大交易所OKX欧意,邀请链接: https://www.wrzftwcjoz.com/zh-hans/join/1837888  注册简单,交易不需要实名,新用户能开合约,币种多,交易量大!。

目前不清退的交易所推荐:

1、全球第二大交易所OKX欧意,邀请链接: https://www.wrzftwcjoz.com/zh-hans/join/1837888  注册简单,交易不需要实名,新用户能开合约,币种多,交易量大!。

2、老牌交易所比特儿现改名叫芝麻开门 :https://www.gate.ac/signup/XgRDAQ8?ref_type=103  注册简单,交易不需要实名,新用户能开合约,币种多,交易量大!。

全球最大交易所币安,国区邀请链接:https://accounts.binance.com/zh-CN/register?ref=16003031  币安一向重视合规,早在2017年就已经退出中国大陆市场,注册不了请用香港IP地址,居住地选中国,认证照旧,邮箱推荐如gmail、outlook。,认证照旧。,居住地选中国,认证照旧。,认证照旧。

火必所有用户现在可用了,但是要重新注册账号火币https://www.huobi.com

全球最大交易所币安

国区邀请链接:https://accounts.suitechsui.us/zh-CN/register?ref=16003031 支持86手机号码,网页直接注册。

赞(1)
未经允许不得转载:Chia之家 » chia-plotter(线多线程)P盘绘图工具,官方说明