Replies: 11 comments 15 replies
-
Version
Any ideas how to fix this? |
Beta Was this translation helpful? Give feedback.
-
Successfully upgraded to |
Beta Was this translation helpful? Give feedback.
-
@sam-harry Lovely write-up - we have had to lock down the wiki cause of potential attack vectors, but i will forward this to our doc writer, and see if we cant get that into the actual wiki |
Beta Was this translation helpful? Give feedback.
-
Update for
git clone http://github.com/Chia-Network/chia_rs.git
git clone https://github.com/Chia-Network/clvm_tools_rs
cd chia_rs/wheel
git checkout 0.1.1
maturin develop --release
cd ../../clvm_tools_rs
git checkout 0.1.7
maturin develop --release |
Beta Was this translation helpful? Give feedback.
-
This works for me on FreeBSD 12.2 for chia 1.3.1 through 1.3.3. However, when I try to build 1.3.4 following the above process, Any idea what needs to be tweaked to get past that? A newer branch of clvm_rs (after 0.1.19)? |
Beta Was this translation helpful? Give feedback.
-
In |
Beta Was this translation helpful? Give feedback.
-
So, this may exist elsewhere re FreeBSD 13, but. I'm trying to build chia-blockchain 1.8.0 on FreeBSD 13.2. Following the above, I get to @perrin4869 update to chia_rs/clvm_tools_rs, but I get an error. Not knowing rust or wheel, I'm not sure how to address.
|
Beta Was this translation helpful? Give feedback.
-
Successfully installed chia 2.1.4 on Freebsd 13.2 sudo pkg install -y git-lite cmake gmake gmp python py39-sqlite3 pybind11 rust git clone --branch latest https://github.com/Chia-Network/chia-blockchain.git pip install --upgrade pip git clone --branch 0.2.15 https://github.com/Chia-Network/chia_rs.git cd ../.. git clone --branch 0.1.39 https://github.com/Chia-Network/clvm_tools_rs.git cd .. sh ./install.sh chia init Everything seems to work but I have a problem with compressed plots. I setup correctly the config.yaml file. Any idea? Thnaks |
Beta Was this translation helpful? Give feedback.
-
I compared the config files with the Linux based harvester where compressed plots works with no problem and it is identical. The installation of chia blockchain on Freebsd 13.2 went smoothly and did not report any errors or warnings. It would take someone who knows how blockchain works and give some advice on why this error message: RuntimeError: Harvester does not support compressed plots. |
Beta Was this translation helpful? Give feedback.
-
Ok, then I'll wait to update the installation istructions until we have a fully functional setup? |
Beta Was this translation helpful? Give feedback.
-
Did any more come of this? I see the FreeBSD instructions on the docs site are still quite old. And if there was a root cause and explanation of whether or not FreeBSD can harvest compressed plots I want that info too. :-) |
Beta Was this translation helpful? Give feedback.
-
I have written an updated version of the FreeBSD install guide, but I don't see a way to make a pull request for a wiki edit, so I've simply added it here.
The install instructions for 11.4 require a work around for installing the cryptography package from ports. This is not required in FreeBSD 12.2 as the cryptography package can be built by pip during the installation process.
Additionally, some changes were made to make the guide easier to read. The pkg install requirements were simplified to a single line. The build from ports instruction were moved to the bottom and it was specified that they are for 11.4-RELEASE users.
Lastly, the python version included in the instructions was upgraded to 3.8 and clvm_rs to 0.1.19
Thank you @perrin4869 for the testing and correction discussed below.
Suggested wiki page starts below this line
Building Chia from Source for FreeBSD
Tested on FreeBSD 12.2-RELEASE
Unfortunately, the cyptography package fails to install via pip in 11.4-RELEASE. It is possible to work around this by manually installing an older version of cryptography from ports (instructions below), but using 12.2-RELEASE or higher is recommended.
Upgrading Existing Chia Installs
If you're upgrading from a previously built chia installation, exit from your previous venv environment (
deactivate
), create a new directory in which to place the latest Chia (e.g.mkdir ~/chia-1.3.1 && cd ~/chia-1.3.1
), clone the latest repo (git clone https://github.com/Chia-Network/chia-blockchain.git -b latest
), enter it and create a new Python virtual environment within it (python3 -m venv venv
). Now, activate the newest environment (. venv/bin/activate
), upgrade pip (pip install --upgrade pip
). Now you may skip down to the clvm_rs install section and begin there.Why This Manual Installation?
Currently the only way to ensure Chia builds on FreeBSD is to do it from the source. By following these instructions to the letter, you should have no problem building the latest Chia from source on a FreeBSD 12.2.
Notes on TrueNAS
If you had been using NFS or Samba sharing to expose your plots to a harvester on another OS, such as Linux, you can instead build Chia within a jail (see the TrueNAS manual for 'jails'), expose your plot directories to it and run the harvester within. In my experience, it provides lower-latency and more reliable access to the plots since the disks are direct-attached and not being provided through an extra few layers of network protocols.
If you are using a fresh jail created by the TrueNAS web GUI you can access the jail shell by running
iocage console JAIL_NAME
from the TrueNAS host which will login to the jail as root by default. Althernatively, you may install openssh and setup a ssh key to login. The jail shell CLI provided by the TrueNAS GUI allows copy and pasting so you can easily paste your public-key into /root/.ssh/authorized_keys && chmod -R 700 /root/.ssh.Other Notes
These instructions will have you building both chia-blockchain and clvm_rs from github source.
These instructions assume a fresh FreeBSD 12 installation!
Discouraged?
Following the instructions in this document will result in a working Chia CLI build on FreeBSD 12 if you follow step-by-step starting from a vanilla FreeBSD installation. Is something broken? Compare the commands you typed, accessible in your bash shell history, and match them with each command in this document. If you feel you've messed something up, do the following:
Pre-requisite package installation
If starting the build again after a failure and you have not re-installed FreeBSD, don't just skip this package installation section! You may have missed one or more software packages critical to the build.
Run the following to install the requried packages. Bash is required sh will not suffice for the build scripts. The development tools be used to build clvm_rs as well as the cryptography dependancy.
Optional packages
If you are ssh'ing into the machine you might want to use 'screen' so that processes will continue even if you logout. For more information: https://www.freebsd.org/cgi/man.cgi?query=screen. 'tmux' is also a great alternative especially if you use iTerm2 on macOS as it supports native tabs and windows with the '-CC' CLI option.
Switch to bash
Make sure you change the shell for your chia-blockchain user. If you are logged in as root and will run chia as a non-root user, run this as it appears below. If you are logged in as your non-root user, you can omit the username because you are already that user. Logout and back in again to load the shell.
Repo Cloning and Virtual Environment (venv) Activation
Create a virtual environment directory 'venv' from within the 'chia-blockchain' directory and activate it before proceeding
You are now in the virtual environment that Python (and so chia) will use. You should have a "(venv)" prefix to your terminal prompt to confirm the venv is working.
Upgrade pip:
Install wheel:
clvm_rs
Build and install the current version of clvm_rs (0.1.19).
clvm_rs 0.1.19 is now installed in your virtual environment.
Building Chia Itself
Change directories back to the chia-blockchain directory and run
Once done, run:
UPnP
NOTE: if you need to disable UPnP - a protocol which automatically sets up port-forwarding on routers using NAT which is a typical setup at any residence with broadband - set "enable_upnp: False" in config.yaml. You can use the one-liner below or do it yourself.
While you don't absolutely need port 8444 forwarded to your Chia node, it is advised that you do so that other peers may connect to you instead of you solely connecting to them. For the average at-home farmer it is advised you do not disable UPnP unless you absolutely know what you're doing or have another node on your local network already using the port and are planning to Farm on Many Machines).
Installing cryptography from ports for 11.4-RELEASE
If using 11.4-RELEASE is required, e.g. runing FreeNAS 11, then you must manually install cyptography into your venv. This must be done after activating the vitrual environement but before running
maturin develop --release
. This can be achieved by loggin in as root building the port.then logging in as your chia user and copying the site-package to your virtual environment
and lastely modifying the cryptography dependance in chia-blockchain/setup.py which may be done with sed from the chia-blockchain directory
now you are ready to build clvm_rs and continue the install.
Installed and Ready to Farm!
That's it! Provided the instructions were followed to the T, and the build is a fresh FreeBSD 12.2, either hardware or TrueNAS jailed, you should be good to go! Now go to town with
chia start node
or whatever floats your boat.More details can be found in the Chia Quick Start Guide.
Beta Was this translation helpful? Give feedback.
All reactions