Skip to content

Commit d886bd1

Browse files
committed
Merge branch 'main' of https://github.com/Chia-Network/chia-blockchain into Chia-Network-main
2 parents d633bf3 + ab1ac66 commit d886bd1

File tree

505 files changed

+29383
-12774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

505 files changed

+29383
-12774
lines changed

.coveragerc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[run]
2+
branch=True
3+
relative_files=True
4+
source=
5+
chia
6+
tests
7+
concurrency=multiprocessing
8+
parallel=True
9+
10+
[report]
11+
precision = 1
12+
exclude_lines =
13+
pragma: no cover
14+
abc\.abstractmethod
15+
typing\.overload
16+
^\s*\.\.\.\s*$
17+
if typing.TYPE_CHECKING:

.github/workflows/benchmarks.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Benchmarks
2+
3+
on:
4+
push:
5+
branches:
6+
- 'long_lived/**'
7+
- main
8+
- 'release/**'
9+
tags:
10+
- '**'
11+
pull_request:
12+
branches:
13+
- '**'
14+
15+
concurrency:
16+
# SHA is added to the end if on `main` to let all main workflows run
17+
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
name: Benchmarks
23+
runs-on: benchmark
24+
timeout-minutes: 30
25+
strategy:
26+
fail-fast: false
27+
max-parallel: 4
28+
matrix:
29+
python-version: [ 3.9 ]
30+
env:
31+
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
32+
33+
steps:
34+
- name: Clean workspace
35+
uses: Chia-Network/actions/clean-workspace@main
36+
37+
- name: Checkout Code
38+
uses: actions/checkout@v3
39+
with:
40+
fetch-depth: 0
41+
42+
- name: Setup Python environment
43+
uses: actions/setup-python@v3
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
47+
- name: Get pip cache dir
48+
id: pip-cache
49+
run: |
50+
echo "::set-output name=dir::$(pip cache dir)"
51+
52+
- name: Cache pip
53+
uses: actions/cache@v3
54+
with:
55+
path: ${{ steps.pip-cache.outputs.dir }}
56+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
57+
restore-keys: |
58+
${{ runner.os }}-pip-
59+
60+
- name: Checkout test blocks and plots
61+
uses: actions/checkout@v3
62+
with:
63+
repository: 'Chia-Network/test-cache'
64+
path: '.chia'
65+
ref: '0.29.0'
66+
fetch-depth: 1
67+
68+
- name: Run install script
69+
env:
70+
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
71+
run: |
72+
sh install.sh -d
73+
74+
- name: pytest
75+
run: |
76+
. ./activate
77+
./venv/bin/py.test -n 0 -m benchmark tests

.github/workflows/build-linux-arm64-installer.yml

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: Linux ARM64 installer on Python 3.8
1+
name: Build Installer - Linux DEB ARM64
22

33
on:
44
push:
55
branches:
6+
- 'long_lived/**'
67
- main
8+
- 'release/**'
79
tags:
810
- '**'
911
pull_request:
@@ -12,13 +14,13 @@ on:
1214

1315
concurrency:
1416
# SHA is added to the end if on `main` to let all main workflows run
15-
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
17+
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
1618
cancel-in-progress: true
1719

1820
jobs:
1921
build:
20-
name: Linux ARM64 installer on Python 3.8
21-
runs-on: [ARM64]
22+
name: Linux arm64 DEB Installer
23+
runs-on: [Linux, ARM64]
2224
container: chianetwork/ubuntu-18.04-builder:latest
2325
timeout-minutes: 120
2426
strategy:
@@ -30,8 +32,11 @@ jobs:
3032
steps:
3133
- uses: Chia-Network/actions/clean-workspace@main
3234

35+
- name: Add safe git directory
36+
uses: Chia-Network/actions/git-mark-workspace-safe@main
37+
3338
- name: Checkout Code
34-
uses: actions/checkout@v2
39+
uses: actions/checkout@v3
3540
with:
3641
fetch-depth: 0
3742
submodules: recursive
@@ -62,17 +67,17 @@ jobs:
6267
SECRET: "${{ secrets.INSTALLER_UPLOAD_SECRET }}"
6368

6469
# Get the most recent release from chia-plotter-madmax
65-
- uses: actions/github-script@v4
70+
- uses: actions/github-script@v6
6671
id: 'latest-madmax'
6772
with:
6873
github-token: ${{ secrets.GITHUB_TOKEN }}
6974
result-encoding: string
7075
script: |
71-
const releases = await github.repos.listReleases({
76+
const release = await github.rest.repos.getLatestRelease({
7277
owner: 'Chia-Network',
7378
repo: 'chia-plotter-madmax',
7479
});
75-
return releases.data[0].tag_name;
80+
return release.data.tag_name;
7681
7782
- name: Get latest madmax plotter
7883
run: |
@@ -83,17 +88,17 @@ jobs:
8388
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot_k34"
8489
8590
# Get the most recent release from bladebit
86-
- uses: actions/github-script@v4
91+
- uses: actions/github-script@v6
8792
id: 'latest-bladebit'
8893
with:
8994
github-token: ${{ secrets.GITHUB_TOKEN }}
9095
result-encoding: string
9196
script: |
92-
const releases = await github.repos.listReleases({
97+
const release = await github.rest.repos.getLatestRelease({
9398
owner: 'Chia-Network',
9499
repo: 'bladebit',
95100
});
96-
return releases.data[0].tag_name;
101+
return release.data.tag_name;
97102
98103
- name: Get latest bladebit plotter
99104
run: |
@@ -105,23 +110,23 @@ jobs:
105110
- name: Run install script
106111
env:
107112
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
108-
BUILD_VDF_CLIENT: "N"
109113
run: |
110-
sh install.sh
114+
sh install.sh -d
111115
112116
- name: Build arm64 .deb package
117+
env:
118+
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
113119
run: |
114-
. ./activate
115120
ldd --version
116-
cd ./chia-blockchain-gui
117-
git status
118-
cd ../build_scripts
121+
git -C ./chia-blockchain-gui status
122+
. ./activate
123+
cd ./build_scripts
119124
sh build_linux_deb.sh arm64
120125
121126
- name: Upload Linux artifacts
122-
uses: actions/upload-artifact@v2
127+
uses: actions/upload-artifact@v3
123128
with:
124-
name: Linux-ARM-64-Installer
129+
name: chia-installers-linux-deb-arm64
125130
path: ${{ github.workspace }}/build_scripts/final_installer/
126131

127132
- name: Configure AWS Credentials
@@ -137,10 +142,11 @@ jobs:
137142
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
138143
if: steps.check_secrets.outputs.HAS_SECRET
139144
run: |
140-
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
141-
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
142-
echo "CHIA_DEV_BUILD=$CHIA_DEV_BUILD" >>$GITHUB_ENV
143-
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb" "s3://download-chia-net/dev/chia-blockchain_${CHIA_DEV_BUILD}_arm64.deb"
145+
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
146+
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
147+
echo "CHIA_DEV_BUILD=$CHIA_DEV_BUILD" >>$GITHUB_ENV
148+
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb" "s3://download.chia.net/dev/chia-blockchain_${CHIA_DEV_BUILD}_arm64.deb"
149+
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb" "s3://download.chia.net/dev/chia-blockchain-cli_${CHIA_DEV_BUILD}-1_arm64.deb"
144150
145151
- name: Create Checksums
146152
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
@@ -149,6 +155,7 @@ jobs:
149155
run: |
150156
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
151157
sha256sum $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb > $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256
158+
sha256sum $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb > $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.sha256
152159
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
153160
154161
- name: Install py3createtorrent
@@ -161,26 +168,32 @@ jobs:
161168
env:
162169
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
163170
run: |
164-
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb -o $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent --webseed https://download-chia-net.s3.us-west-2.amazonaws.com/install/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb
171+
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb -o $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent --webseed https://download.chia.net/install/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb
172+
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb -o $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.torrent --webseed https://download.chia.net/install/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb
165173
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
166174
167175
- name: Upload Beta Installer
168176
if: steps.check_secrets.outputs.HAS_SECRET && github.ref == 'refs/heads/main'
169177
env:
170178
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
171179
run: |
172-
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download-chia-net/beta/chia-blockchain_arm64_latest_beta.deb
173-
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download-chia-net/beta/chia-blockchain_arm64_latest_beta.deb.sha256
180+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download.chia.net/beta/chia-blockchain_arm64_latest_beta.deb
181+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download.chia.net/beta/chia-blockchain_arm64_latest_beta.deb.sha256
182+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb s3://download.chia.net/beta/chia-blockchain-cli_arm64_latest_beta.deb
183+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.sha256 s3://download.chia.net/beta/chia-blockchain-cli_arm64_latest_beta.deb.sha256
174184
175185
- name: Upload Release Files
176186
if: steps.check_secrets.outputs.HAS_SECRET && startsWith(github.ref, 'refs/tags/')
177187
env:
178188
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
179189
run: |
180-
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
181-
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download-chia-net/install/
182-
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download-chia-net/install/
183-
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent s3://download-chia-net/torrents/
190+
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
191+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download.chia.net/install/
192+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download.chia.net/install/
193+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent s3://download.chia.net/torrents/
194+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb s3://download.chia.net/install/
195+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.sha256 s3://download.chia.net/install/
196+
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.torrent s3://download.chia.net/torrents/
184197
185198
- name: Get tag name
186199
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)