Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wheatnetwork committed Jan 24, 2022
1 parent 31741f1 commit a12ac11
Show file tree
Hide file tree
Showing 91 changed files with 3,178 additions and 861 deletions.
14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -7,7 +7,7 @@ A lot of fascinating new cryptography and blockchain concepts are used and imple
This repo includes the code for the Wheat full node, farmer, and timelord (in wheat folder), which are all written in python.
It also includes a verifiable delay function implementation that it imports from the [chiavdf repo](https://github.com/Chia-Network/chiavdf) (in c/c++), and a proof of space implementation that it imports from the [chiapos repo](https://github.com/Chia-Network/chiapos). BLS signatures are imported from the [bls-signatures repo](https://github.com/Chia-Network/bls-signatures) as blspy. There is an additional dependency on the [chiabip158 repo](https://github.com/Chia-Network/chiabip158). For major platforms, binary and source wheels are shipped to PyPI from each dependent repo. Then wheat-blockchain can pip install those from PyPI or they can be prepackaged as is done for the Windows installer. On unsupported platforms, pip will fall back to the source distributions, to be compiled locally.

If you want to learn more about this project, read the [wiki](https://github.com/WheatNetwork/wheat-blockchain/wiki), or check out the [green paper](https://www.wheat.network/assets/ChiaGreenPaper.pdf).
If you want to learn more about this project, read the [wiki](https://github.com/WheatNetwork/wheat-blockchain/wiki), or check out the [green paper](https://www.wheat.network/).

## Contributions

Expand Down Expand Up @@ -61,6 +61,16 @@ The [Mypy library](https://mypy.readthedocs.io/en/stable/) is very useful for en

If you want verbose logging for tests, edit the `tests/pytest.ini` file.

## Pre-Commit

We provide a [pre-commit configuration](https://github.com/WheatNetwork/wheat-blockchain/blob/main/.pre-commit-config.yaml) which triggers several useful
hooks (including linters/formatter) before each commit you make if you installed and set up [pre-commit](https://pre-commit.com/). This will help
to reduce the time you spend on failed CI jobs.

To install pre-commit on your system see https://pre-commit.com/#installation. After installation, you can either use it manually
with `pre-commit run` or let it trigger the hooks automatically before each commit by installing the
provided configuration with `pre-commit install`.

## Configure VS code

1. Install python extension
Expand All @@ -86,7 +96,7 @@ workflow.

## Testnets and review environments

With the launch of `1.0.0` we will begin running an official `testnet`.
With the launch of `1.0.0` we will begin running an official `testnet`.
Prior to the release of `1.1.0` there will be two running test nets. `testnet` and `transaction-beta-testnet`. The `transaction-beta-testnet` testnet will be a beta of the pending 1.1 release, which will enable transactions on the wheat blockchain.
Following the release of `1.1.0`, the official `testnet` will include all changes that have been accepted to the current release branch.

Expand Down
36 changes: 36 additions & 0 deletions Install-gui.ps1
@@ -0,0 +1,36 @@
$ErrorActionPreference = "Stop"

if ($null -eq (Get-ChildItem env:VIRTUAL_ENV -ErrorAction SilentlyContinue))
{
Write-Output "This script requires that the Wheat Python virtual environment is activated."
Write-Output "Execute '.\venv\Scripts\Activate.ps1' before running."
Exit 1
}

if ($null -eq (Get-Command node -ErrorAction SilentlyContinue))
{
Write-Output "Unable to find Node.js"
Exit 1
}

Write-Output "Running 'git submodule update --init --recursive'."
Write-Output ""
git submodule update --init --recursive

Push-Location
try {
Set-Location wheat-blockchain-gui

$ErrorActionPreference = "SilentlyContinue"
npm install --loglevel=error
npm audit fix
npm run build
py ..\installhelper.py

Write-Output ""
Write-Output "Wheat blockchain Install-gui.ps1 completed."
Write-Output ""
Write-Output "Type 'cd wheat-blockchain-gui' and then 'npm run electron' to start the GUI."
} finally {
Pop-Location
}
60 changes: 60 additions & 0 deletions Install.ps1
@@ -0,0 +1,60 @@
$ErrorActionPreference = "Stop"

if ([Environment]::Is64BitOperatingSystem -eq $false)
{
Write-Output "Wheat requires a 64-bit Windows installation"
Exit 1
}

if (-not (Get-Item -ErrorAction SilentlyContinue "$env:windir\System32\msvcp140.dll").Exists)
{
Write-Output "Unable to find Visual C++ Runtime DLLs"
Write-Output ""
Write-Output "Download and install the Visual C++ Redistributable for Visual Studio 2019 package from:"
Write-Output "https://visualstudio.microsoft.com/downloads/#microsoft-visual-c-redistributable-for-visual-studio-2019"
Exit 1
}

if ($null -eq (Get-Command git -ErrorAction SilentlyContinue))
{
Write-Output "Unable to find git"
Exit 1
}

git submodule update --init mozilla-ca

if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
{
Write-Output "Unable to find py"
Write-Output "Note the check box during installation of Python to install the Python Launcher for Windows."
Write-Output ""
Write-Output "https://docs.python.org/3/using/windows.html#installation-steps"
Exit 1
}

$pythonVersion = (py --version).split(" ")[1]
if ([version]$pythonVersion -lt [version]"3.7.0")
{
Write-Output "Found Python version:" $pythonVersion
Write-Output "Installation requires Python 3.7 or later"
Exit 1
}
Write-Output "Python version is:" $pythonVersion

py -m venv venv

venv\scripts\python -m pip install --upgrade pip setuptools wheel
venv\scripts\pip install --extra-index-url https://pypi.chia.net/simple/ miniupnpc==2.2.2
venv\scripts\pip install --editable . --extra-index-url https://pypi.chia.net/simple/

Write-Output ""
Write-Output "Wheat blockchain .\Install.ps1 complete."
Write-Output "For assistance join us on Keybase in the #support chat channel:"
Write-Output "https://keybase.io/team/wheat_network.public"
Write-Output ""
Write-Output "Try the Quick Start Guide to running wheat-blockchain:"
Write-Output "https://github.com/WheatNetwork/wheat-blockchain/wiki/Quick-Start-Guide"
Write-Output ""
Write-Output "To install the GUI type '.\Install-gui.ps1' after '.\venv\scripts\Activate.ps1'."
Write-Output ""
Write-Output "Type '.\venv\Scripts\Activate.ps1' and then 'wheat init' to begin."
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Wheat Network
Copyright 2022 Wheat Network

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
13 changes: 12 additions & 1 deletion azure-pipelines.yml
Expand Up @@ -53,6 +53,16 @@ steps:
deactivate
displayName: Create installer version number
- script: |
MADMAX_VERSION=$(curl --silent "https://api.github.com/repos/Wheat-Network/chia-plotter-madmax/releases/latest" | jq -r '.tag_name')
mkdir "$(System.DefaultWorkingDirectory)/madmax"
wget -O "$(System.DefaultWorkingDirectory)/madmax/wheat_plot" https://github.com/Wheat-Network/chia-plotter-madmax/releases/download/${MADMAX_VERSION}/chia_plot-${MADMAX_VERSION}-macos-intel
wget -O "$(System.DefaultWorkingDirectory)/madmax/wheat_plot_k34" https://github.com/Wheat-Network/chia-plotter-madmax/releases/download/${MADMAX_VERSION}/chia_plot_k34-${MADMAX_VERSION}-macos-intel
chmod +x "$(System.DefaultWorkingDirectory)/madmax/wheat_plot"
chmod +x "$(System.DefaultWorkingDirectory)/madmax/wheat_plot_k34"
displayName: "Get latest madmax release"
- script: |
sh install.sh
displayName: "Install dependencies"
Expand All @@ -68,7 +78,8 @@ steps:
export APPLE_NOTARIZE_USERNAME
APPLE_NOTARIZE_PASSWORD="$(APPLE_NOTARIZE_PASSWORD)"
export APPLE_NOTARIZE_PASSWORD
if [ "$(APPLE_NOTARIZE_PASSWORD)" ]; then NOTARIZE="true"; export NOTARIZE; fi
if [ "$(APPLE_NOTARIZE_PASSWORD)" ]; then NOTARIZE="true"; else NOTARIZE="false"; fi
export NOTARIZE
cd build_scripts || exit
sh build_macos.sh
displayName: "Build DMG with build_scripts/build_macos.sh"
Expand Down

0 comments on commit a12ac11

Please sign in to comment.