Skip to content

Commit

Permalink
ETHGreen Update 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ethgreen committed Dec 31, 2021
1 parent 32c7d15 commit 3e6503e
Show file tree
Hide file tree
Showing 498 changed files with 54,619 additions and 55,248 deletions.
31 changes: 0 additions & 31 deletions .github/dependabot.yml

This file was deleted.

4 changes: 2 additions & 2 deletions BUILD_TIMELORD.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Building timelords

The Linux and MacOS chiavdf binary wheels currently exclude an executable
required to run a [Timelord](https://github.com/ethgreen-network/ethgreen-blockchain/wiki/Timelords).
required to run a [Timelord](https://github.com/ethgreen-nethgreenrk/ethgreen-blockchain/wiki/Timelords).
If you want to run a Timelord on Linux or MacOS, you must install the wheel
from source (which may require some additional development packages) while in
the virtual environment.
Expand All @@ -14,7 +14,7 @@ sh install-timelord.sh
```

If the compile fails, it's likely due to a missing dependency. The script
[install-timelord.sh](https://github.com/ethgreen-network/ethgreen-blockchain/blob/main/install-timelord.sh)
[install-timelord.sh](https://github.com/ethgreen-nethgreenrk/ethgreen-blockchain/blob/main/install-timelord.sh)
attempts to install required build dependencies for Linux and MacOS before
invoking pip to build from the source python distribution of chiavdf.

Expand Down
24 changes: 12 additions & 12 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at legal@ethgreen-network.net. All
reported by contacting the project team at legal@ethgreenreen-network.net. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Introduction

Welcome to the ETHGreen-blockchain project!
Welcome to the ethgreen-blockchain project!
We are happy that you are taking a look at the code for ethgreen, a proof of space and time cryptocurrency.

A lot of fascinating new cryptography and blockchain concepts are used and implemented here.
This repo includes the code for the ethgreen full node, farmer, and timelord (in ethgreen 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/ethgreen-network/chiavdf) (in c/c++), and a proof of space implementation that it imports from the [chiapos repo](https://github.com/ethgreen-network/chiapos). BLS signatures are imported from the [bls-signatures repo](https://github.com/ethgreen-network/bls-signatures) as blspy. There is an additional dependency on the [chiabip158 repo](https://github.com/ethgreen-network/chiabip158). For major platforms, binary and source wheels are shipped to PyPI from each dependent repo. Then ethgreen-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.
This repo includes the code for the ethgreen full node, farmer, and timelord ethgreenethgreen 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/ethgreen/chiavdf) (in c/c++), and a proof of space implementation that it imports from the [chiapos repo](https://github.com/ethgreen/chiapos). BLS signatures are imported from the [bls-signatures repo](https://github.com/ethgreen/bls-signatures) as blspy. There is an additional dependency on the [chiabip158 repo](https://github.com/ethgreen/chiabip158). For major platforms, binary and source wheels are shipped to PyPI froethgreench dependent repo. Then ethgreen-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/ethgreen-network/ethgreen-blockchain/wiki), or check out the [green paper](https://www.ethgreen.org/xeth).
If you want to learn more about this project, read the [wiki](https://github.com/ethgreen-nethgreenrk/ethgreen-blockchain/wiki), or check out the [green paper](hethgreen://www.ethgreen.org/xeth).

## Contributions

Expand Down Expand Up @@ -51,7 +51,7 @@ proofs of space during testing. The next time tests are run, this will not be ne
```bash
. ./activate
pip install ".[dev]"
black ethgreen tests && mypy ethgreen tests && flake8 ethgreen tests
black ethgreen tests && methgreenethgreen tests &&ethgreenke8 ethgreen tests
py.test tests -v --durations 0
```

Expand All @@ -63,7 +63,7 @@ If you want verbose logging for tests, edit the `tests/pytest.ini` file.

## Pre-Commit

We provide a [pre-commit configuration](https://github.com/ethgreen-network/ethgreen-blockchain/blob/main/.pre-commit-config.yaml) which triggers several useful
We provide a [pre-commit configuration](https://github.com/ethgreen/ethgreen-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.

Expand Down Expand Up @@ -92,7 +92,7 @@ workflow.
3. Install BlackConnect plugin
4. Set to run python black on save
5. Set line length to 120
6. Install these linters https://github.com/ethgreen-network/ethgreen-blockchain/tree/main/.github/linters
6. Install these linters https://github.com/ethgreen/ethgreen-blockchain/tree/main/.github/linters

## Testnets and review environments

Expand Down
36 changes: 36 additions & 0 deletions Install-gui.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
$ErrorActionPreference = "Stop"

if ($null -eq (Get-ChildItem env:VIRTUAL_ENV -ErrorAction SilentlyContinue))
{
Write-Output "This script requires that the Ethgreen 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 ethgreen-blockchain-gui

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

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

if ([Environment]::Is64BitOperatingSystem -eq $false)
{
Write-Output "Ethgreen 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 "Ethgreen blockchain .\Install.ps1 complete."
Write-Output "For assistance join us on Discord in the #support chat channel:"
Write-Output "https://discord.gg/uWnhFbMJTn"
Write-Output ""
Write-Output "Try the Quick Start Guide to running ethgreen-blockchain:"
Write-Output "https://github.com/ethgreen/ethgreen-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 'ethgreen init' to begin."
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 ethgreen Network
Copyright 2021 Chia 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
80 changes: 42 additions & 38 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trigger:
- "*"
tags:
include:
- "*"
- "*"

pool:
vmImage: "macOS-10.15"
Expand Down Expand Up @@ -44,63 +44,56 @@ steps:
deleteCert: true

- script: |
python -m venv venv
ln -s venv/bin/activate .
. ./activate
python -m pip install --upgrade pip
pip install wheel pep517 setuptools_scm
node -v
pip install -i https://pypi.chia.net/simple/ miniupnpc==2.2.2
cd build_scripts
python3 -m venv ../venv
. ../venv/bin/activate
pip install setuptools_scm
touch $(System.DefaultWorkingDirectory)/build_scripts/version.txt
python -m installer-version > $(System.DefaultWorkingDirectory)/build_scripts/version.txt
displayName: "Install dependencies"
python ./build_scripts/installer-version.py > $(System.DefaultWorkingDirectory)/build_scripts/version.txt
cat $(System.DefaultWorkingDirectory)/build_scripts/version.txt
deactivate
displayName: Create installer version number
- script: |
. ./activate
clang --version
pip wheel --use-pep517 --extra-index-url https://pypi.chia.net/simple/ --wheel-dir=wheels .
pip install --no-index --find-links=./wheels/ ethgreen-blockchain
displayName: "Build and install wheels"
MADMAX_VERSION=$(curl --silent "https://api.github.com/repos/Chia-Network/chia-plotter-madmax/releases/latest" | jq -r '.tag_name')
mkdir "$(System.DefaultWorkingDirectory)/madmax"
wget -O "$(System.DefaultWorkingDirectory)/madmax/ethgreen_plot" https://github.com/Chia-Network/chia-plotter-madmax/releases/download/${MADMAX_VERSION}/ethgreen_plot-${MADMAX_VERSION}-macos-intel
wget -O "$(System.DefaultWorkingDirectory)/madmax/ethgreen_plot_k34" https://github.com/Chia-Network/chia-plotter-madmax/releases/download/${MADMAX_VERSION}/ethgreen_plot_k34-${MADMAX_VERSION}-macos-intel
chmod +x "$(System.DefaultWorkingDirectory)/madmax/ethgreen_plot"
chmod +x "$(System.DefaultWorkingDirectory)/madmax/ethgreen_plot_k34"
displayName: "Get latest madmax release"
- script: |
sh install.sh
displayName: "Install dependencies"
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: "Setup Node 12.x"
versionSpec: '14.x'
displayName: "Setup Node 14.x"

- bash: |
. ./activate
APPLE_NOTARIZE_USERNAME="$(APPLE_NOTARIZE_USERNAME)"
export APPLE_NOTARIZE_USERNAME
APPLE_NOTARIZE_PASSWORD="$(APPLE_NOTARIZE_PASSWORD)"
export APPLE_NOTARIZE_PASSWORD
if [ "$(APPLE_NOTARIZE_PASSWORD)" ]; then NOTARIZE="true"; export NOTARIZE; fi
git submodule update --init --recursive
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"
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/wheels
artifactName: MacOS-wheels
displayName: "Upload MacOS wheels"

- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/build_scripts/final_installer/
artifactName: MacOS-DMG
displayName: "Upload MacOS DMG"

- bash: |
ls $(System.DefaultWorkingDirectory)/build_scripts/
cat $(System.DefaultWorkingDirectory)/build_scripts/version.txt
displayName: "list files in dir"
- bash: |
ls $(System.DefaultWorkingDirectory)/build_scripts/final_installer/
cd $(System.DefaultWorkingDirectory)/build_scripts/
export ETHGREEN_VERSION="ethgreen-"$(<version.txt)
export ETHGREEN_VERSION="Ethgreen-"$(<version.txt)
shasum -a 256 $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg > $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg.sha256
ls $(System.DefaultWorkingDirectory)/build_scripts/final_installer/
displayName: "Create Checksums"
Expand All @@ -109,12 +102,12 @@ steps:
export AWS_ACCESS_KEY_ID=$(AccessKey)
export AWS_SECRET_ACCESS_KEY=$(SecretKey)
export AWS_DEFAULT_REGION=us-west-2
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/*.dmg s3://download-ethgreen-net/builds/
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/*.dmg s3://download-ethgreennetwork-org/builds/
displayName: "Upload to S3"
- bash: |
cd $(System.DefaultWorkingDirectory)/build_scripts/
export ETHGREEN_VERSION="ethgreen-"$(<version.txt)
export ETHGREEN_VERSION="Ethgreen-"$(<version.txt)
pip3 install py3createtorrent
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg -o $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg.torrent --webseed https://download-ethgreen-net.s3.us-west-2.amazonaws.com/install/$ETHGREEN_VERSION.dmg
Expand All @@ -127,10 +120,21 @@ steps:
export AWS_SECRET_ACCESS_KEY=$(SecretKey)
export AWS_DEFAULT_REGION=us-west-2
cd $(System.DefaultWorkingDirectory)/build_scripts/
export ETHGREEN_VERSION="ethgreen-"$(<version.txt)
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg s3://download-ethgreen-net/install/
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg.sha256 s3://download-ethgreen-net/install/
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg.torrent s3://download-ethgreen-net/torrents/
export ETHGREEN_VERSION="Ethgreen-"$(<version.txt)
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg s3://download-ethgreennetwork-org/beta/Ethgreen-intel_latest_beta.dmg
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg.sha256 s3://download-ethgreennetwork-org/beta/Ethgreen-intel_latest_beta.dmg.sha256
displayName: "Upload Beta Files"
condition: and(succeeded(), contains(variables['build.sourceBranch'], 'refs/heads/main'))
- bash: |
export AWS_ACCESS_KEY_ID=$(AccessKey)
export AWS_SECRET_ACCESS_KEY=$(SecretKey)
export AWS_DEFAULT_REGION=us-west-2
cd $(System.DefaultWorkingDirectory)/build_scripts/
export ETHGREEN_VERSION="Ethgreen-"$(<version.txt)
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg s3://download-ethgreennetwork-org/install/
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg.sha256 s3://download-ethgreennetwork-org/install/
aws s3 cp $(System.DefaultWorkingDirectory)/build_scripts/final_installer/$ETHGREEN_VERSION.dmg.torrent s3://download-ethgreennetwork-org/torrents/
displayName: "Upload Release Files"
condition: and(succeeded(), contains(variables['build.sourceBranch'], 'refs/tags/'))
Expand Down
Loading

0 comments on commit 3e6503e

Please sign in to comment.