Merge normal and timelord installation

This commit is contained in:
Mariano Sorgente 2020-02-07 00:14:54 -05:00
parent 5e2a336a1c
commit 6359ebf967
No known key found for this signature in database
GPG Key ID: 0F866338C369278C
3 changed files with 16 additions and 176 deletions

View File

@ -22,7 +22,6 @@ jobs:
run: |
brew update && brew install gmp boost || echo ""
sh install.sh
sh install_timelord.sh
- name: Test proof of space
run: |
cd lib/chiapos

184
README.md
View File

@ -7,186 +7,18 @@ You will need to enable [UPnP](https://www.homenethowto.com/ports-and-nat/upnp-a
For alpha testnet most should only install harvesters, farmers, plotter and full nodes. Building timelords and VDFs is for sophisticated users in most environments. Chia Network and additional volunteers are running sufficient time lords for testnet consensus.
## Step 1: Install harvester, farmer, plotter, and full node
### Debian/Ubuntu
```bash
sudo apt-get update
sudo apt-get install build-essential git cmake libgmp3-dev --no-install-recommends
sudo apt-get install python3-dev python3-venv --no-install-recommends
git clone https://github.com/Chia-Network/chia-blockchain.git
cd chia-blockchain
sh install.sh
. .venv/bin/activate
```
### Amazon Linux 2
```bash
sudo yum update
sudo yum install gcc-c++ cmake3 wget git openssl openssl-devel
sudo yum install python3 python3-devel libffi-devel gmp-devel
# CMake - add a symlink for cmake3 - required by blspy
sudo ln -s /usr/bin/cmake3 /usr/local/bin/cmake
git clone https://github.com/Chia-Network/chia-blockchain.git
cd chia-blockchain
sh install.sh
. .venv/bin/activate
```
### CentOS 7
```bash
sudo yum update
sudo yum install centos-release-scl-rh epel-release
sudo yum install devtoolset-8-toolchain cmake3 libffi-devel
sudo yum install gmp-devel libsqlite3x-devel
sudo yum install wget git openssl openssl-devel
# CMake - add a symlink for cmake3 - required by blspy
sudo ln -s /usr/bin/cmake3 /usr/local/bin/cmake
scl enable devtoolset-8 bash
# Install Python 3.7.5 (current rpm's are 3.6.x)
wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz
tar -zxvf Python-3.7.5.tgz; cd Python-3.7.5
./configure --enable-optimizations; sudo make install; cd ..
git clone https://github.com/Chia-Network/chia-blockchain.git
cd chia-blockchain
sh install.sh
. .venv/bin/activate
```
### Windows (WSL + Ubuntu)
#### Install WSL + Ubuntu 18.04 LTS, upgrade to Ubuntu 19.x
This will require multiple reboots. From an Administrator PowerShell
`Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux`
and then
`Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform`.
Once that is complete, install Ubuntu 18.04 LTS from the Windows Store.
```bash
# Upgrade to 19.x
sudo nano /etc/update-manager/release-upgrades
# Change "Prompt=lts" to "Prompt=normal" save and exit
sudo apt-get -y update
sudo apt-get -y upgrade
sudo do-release-upgrade
sudo apt-get install -y build-essential cmake python3-dev python3-venv software-properties-common libgmp3-dev --no-install-recommends
git clone https://github.com/Chia-Network/chia-blockchain.git
cd chia-blockchain
sudo sh install.sh
. .venv/bin/activate
```
#### Alternate method for Ubuntu 18.04 LTS
In `./install.sh`:
Change `python3` to `python3.7`
Each line that starts with `pip ...` becomes `python -m pip ...`
```bash
sudo apt-get -y update
sudo apt-get install -y build-essential cmake python3-dev python3-venv software-properties-common libgmp3-dev --no-install-recommends
# Install python3.7 with ppa
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get -y update
sudo apt-get install -y python3.7 python3.7-venv python3.7-dev
git clone https://github.com/Chia-Network/chia-blockchain.git
cd chia-blockchain
sudo sh install.sh
. .venv/bin/activate
```
### MacOS
Make sure [brew](https://brew.sh/) is available before starting the setup.
```bash
brew upgrade python
brew install cmake gmp
git clone https://github.com/Chia-Network/chia-blockchain.git
cd chia-blockchain
sh install.sh
. .venv/bin/activate
```
## Step 1: Install the code
To install the chia-blockchain node, follow [these](INSTALL.md) instructions according to your operating system.
## Step 2: Install timelord (optional)
Note: this step is needed only if you intend to run a timelord or a local simulation.
These assume you've already successfully installed harvester, farmer, plotting, and full node above. boost 1.67 or newer is required on all platforms.
### Ubuntu/Debian
```bash
cd chia-blockchain
sh install_timelord.sh
```
### Amazon Linux 2 and CentOS 7
```bash
#Only for Amazon Linux 2
sudo amazon-linux-extras install epel
sudo yum install mpfr-devel
# Install Boost 1.72.0
wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
tar -zxvf boost_1_72_0.tar.gz
cd boost_1_72_0
./bootstrap.sh --prefix=/usr/local
sudo ./b2 install --prefix=/usr/local --with=all; cd ..
cd chia-blockchain
sh install_timelord.sh
```
### Windows (WSL + Ubuntu)
#### Install WSL + Ubuntu upgraded to 19.x
```bash
cd chia-blockchain
sh install_timelord.sh
```
#### Alternate method for Ubuntu 18.04
```bash
# Install boost 1.70 with ppa
sudo add-apt-repository -y ppa:mhier/libboost-latest
sudo apt-get update
sudo apt-get install libboost1.70 libboost1.70-dev
```
### MacOS
```bash
brew install boost
cd chia-blockchain
sh install_timelord.sh
```
## Step 3: Generate keys
## Step 2: Generate keys
First, create some keys by running the following script:
```bash
python -m scripts.regenerate_keys
```
## Step 4a: Run a full node
## Step 3a: Run a full node
To run a full node on port 8444, and connect to the testnet, run the following command.
This will also start an ssh server in port 8222 for the UI, which you can connect to
to see the state of the node. If you want to see std::out log output, modify the logging.std_out
@ -197,7 +29,7 @@ variable in ./config/config.yaml.
ssh -p 8222 localhost
```
## Step 4b: Run a farmer + full node
## Step 3b: Run a farmer + full node
Instead of running only a full node (as in 4a), you can also run a farmer.
Farmers are entities in the network who use their hard drive space to try to create
blocks (like Bitcoin's miners), and earn block rewards. First, you must generate some hard drive plots, which
@ -211,7 +43,7 @@ sh ./scripts/run_farming.sh
```
## Step 4c: Run a timelord + full node
## Step 3c: Run a timelord + full node
Timelords execute sequential verifiable delay functions (proofs of time), that get added to
blocks to make them valid. This requires fast CPUs and a lot of memory as well as completing
both install steps above.
@ -252,4 +84,6 @@ You can also use the [HTTP RPC](https://github.com/Chia-Network/chia-blockchain/
```bash
curl -X POST http://localhost:8555/get_blockchain_state
```
```
After installing, follow the remaining instructions in [README.md](README.md) to run the software.

View File

@ -1,12 +1,19 @@
#!/bin/bash
set -e
if [ `uname` = "Linux" ] && type apt-get; then
# Debian/Ubuntu
sudo apt-get install -y libgmp3-dev libboost-dev libboost-system-dev
fi
python3 -m venv .venv
. .venv/bin/activate
pip install wheel
pip install -e .
pip install -r requirements.txt
make -C lib/chiavdf/fast_vdf
echo ""
echo "Chia blockchain install.sh complete."
echo "For assistance join us on Keybase in the #testnet chat channel"