chikvdf 1.0.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chikvdf-1.0.10/.flake8 +4 -0
- chikvdf-1.0.10/.github/workflows/build.yml +331 -0
- chikvdf-1.0.10/.github/workflows/codeql-analysis.yml.bak +65 -0
- chikvdf-1.0.10/.github/workflows/stale-issue.yml.bak +35 -0
- chikvdf-1.0.10/.github/workflows/test.yaml +76 -0
- chikvdf-1.0.10/.gitignore +48 -0
- chikvdf-1.0.10/LICENSE +201 -0
- chikvdf-1.0.10/PKG-INFO +219 -0
- chikvdf-1.0.10/README.md +207 -0
- chikvdf-1.0.10/README_AVX512.md +196 -0
- chikvdf-1.0.10/chikvdf.egg-info/PKG-INFO +219 -0
- chikvdf-1.0.10/chikvdf.egg-info/SOURCES.txt +99 -0
- chikvdf-1.0.10/chikvdf.egg-info/dependency_links.txt +1 -0
- chikvdf-1.0.10/chikvdf.egg-info/not-zip-safe +1 -0
- chikvdf-1.0.10/chikvdf.egg-info/top_level.txt +1 -0
- chikvdf-1.0.10/classgroups.pdf +0 -0
- chikvdf-1.0.10/comparenweso.py +204 -0
- chikvdf-1.0.10/lgtm.yml +9 -0
- chikvdf-1.0.10/mypi.ini +2 -0
- chikvdf-1.0.10/pyproject.toml +7 -0
- chikvdf-1.0.10/setup.cfg +4 -0
- chikvdf-1.0.10/setup.py +280 -0
- chikvdf-1.0.10/src/1weso_test.cpp +68 -0
- chikvdf-1.0.10/src/2weso_test.cpp +79 -0
- chikvdf-1.0.10/src/CMakeLists.txt +50 -0
- chikvdf-1.0.10/src/ClassGroup.h +85 -0
- chikvdf-1.0.10/src/Makefile.vdf-client +53 -0
- chikvdf-1.0.10/src/Reducer.h +246 -0
- chikvdf-1.0.10/src/alloc.hpp +58 -0
- chikvdf-1.0.10/src/asm_avx512_ifma.h +731 -0
- chikvdf-1.0.10/src/asm_base.h +168 -0
- chikvdf-1.0.10/src/asm_gcd_128.h +670 -0
- chikvdf-1.0.10/src/asm_gcd_base_continued_fractions.h +375 -0
- chikvdf-1.0.10/src/asm_gcd_base_divide_table.h +190 -0
- chikvdf-1.0.10/src/asm_gcd_unsigned.h +798 -0
- chikvdf-1.0.10/src/asm_main.h +503 -0
- chikvdf-1.0.10/src/asm_types.h +644 -0
- chikvdf-1.0.10/src/asm_vm.h +148 -0
- chikvdf-1.0.10/src/avx512_integer.h +141 -0
- chikvdf-1.0.10/src/avx512_test.cpp +121 -0
- chikvdf-1.0.10/src/bit_manipulation.h +57 -0
- chikvdf-1.0.10/src/bqfc.c +287 -0
- chikvdf-1.0.10/src/bqfc.h +32 -0
- chikvdf-1.0.10/src/callback.h +233 -0
- chikvdf-1.0.10/src/cmake/FindGMP.cmake +76 -0
- chikvdf-1.0.10/src/cmake/FindGMPXX.cmake +35 -0
- chikvdf-1.0.10/src/compile_asm.cpp +73 -0
- chikvdf-1.0.10/src/create_discriminant.h +10 -0
- chikvdf-1.0.10/src/double_utility.h +121 -0
- chikvdf-1.0.10/src/fast_storage.h +134 -0
- chikvdf-1.0.10/src/gcd_128.h +253 -0
- chikvdf-1.0.10/src/gcd_base_continued_fractions.h +765 -0
- chikvdf-1.0.10/src/gcd_base_divide_table.h +232 -0
- chikvdf-1.0.10/src/gcd_unsigned.h +353 -0
- chikvdf-1.0.10/src/generic.h +280 -0
- chikvdf-1.0.10/src/generic_macros.h +34 -0
- chikvdf-1.0.10/src/gpu_integer.h +645 -0
- chikvdf-1.0.10/src/gpu_integer_divide.h +384 -0
- chikvdf-1.0.10/src/gpu_integer_gcd.h +118 -0
- chikvdf-1.0.10/src/include.h +63 -0
- chikvdf-1.0.10/src/integer.h +52 -0
- chikvdf-1.0.10/src/integer_common.h +461 -0
- chikvdf-1.0.10/src/lib/gmp-patch-6.2.1/compat.c +65 -0
- chikvdf-1.0.10/src/lib/gmp-patch-6.2.1/longlong.h +2355 -0
- chikvdf-1.0.10/src/lib/gmp-patch-6.2.1/mpz/inp_raw.c +172 -0
- chikvdf-1.0.10/src/nucomp.h +346 -0
- chikvdf-1.0.10/src/parameters.h +263 -0
- chikvdf-1.0.10/src/picosha2.h +377 -0
- chikvdf-1.0.10/src/pprods.h +389 -0
- chikvdf-1.0.10/src/primetest.h +171 -0
- chikvdf-1.0.10/src/proof_common.h +137 -0
- chikvdf-1.0.10/src/prover_slow.h +110 -0
- chikvdf-1.0.10/src/prover_test.cpp +76 -0
- chikvdf-1.0.10/src/provers.h +301 -0
- chikvdf-1.0.10/src/python_bindings/fastvdf.cpp +99 -0
- chikvdf-1.0.10/src/refcode/README.md +54 -0
- chikvdf-1.0.10/src/refcode/lzcnt.c +592 -0
- chikvdf-1.0.10/src/threading.h +824 -0
- chikvdf-1.0.10/src/uint128_t/LICENSE +21 -0
- chikvdf-1.0.10/src/uint128_t/README.md +48 -0
- chikvdf-1.0.10/src/uint128_t/uint128_t.build +8 -0
- chikvdf-1.0.10/src/uint128_t/uint128_t.cpp +530 -0
- chikvdf-1.0.10/src/uint128_t/uint128_t.h +8 -0
- chikvdf-1.0.10/src/uint128_t/uint128_t.include +508 -0
- chikvdf-1.0.10/src/uint128_t/uint128_t_config.include +19 -0
- chikvdf-1.0.10/src/util.h +159 -0
- chikvdf-1.0.10/src/vdf.h +766 -0
- chikvdf-1.0.10/src/vdf_bench.cpp +117 -0
- chikvdf-1.0.10/src/vdf_client.cpp +359 -0
- chikvdf-1.0.10/src/vdf_fast.h +1162 -0
- chikvdf-1.0.10/src/vdf_new.h +454 -0
- chikvdf-1.0.10/src/vdf_original.h +326 -0
- chikvdf-1.0.10/src/vdf_test.cpp +438 -0
- chikvdf-1.0.10/src/vdf_test.h +316 -0
- chikvdf-1.0.10/src/verifier.h +148 -0
- chikvdf-1.0.10/src/verifier_test.cpp +55 -0
- chikvdf-1.0.10/src/xgcd_partial.c +124 -0
- chikvdf-1.0.10/tests/test_n_weso_verifier.py +148 -0
- chikvdf-1.0.10/tests/test_verifier.py +53 -0
- chikvdf-1.0.10/tools/gen_pprods.py +111 -0
chikvdf-1.0.10/.flake8
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
name: build - check - upload
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- '**'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches:
|
|
11
|
+
- '**'
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
# 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' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build-wheels:
|
|
20
|
+
name: Wheel - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }}
|
|
21
|
+
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
|
|
22
|
+
strategy:
|
|
23
|
+
fail-fast: false
|
|
24
|
+
matrix:
|
|
25
|
+
os:
|
|
26
|
+
- name: macOS
|
|
27
|
+
matrix: macos
|
|
28
|
+
runs-on:
|
|
29
|
+
arm: [macOS, ARM64]
|
|
30
|
+
intel: [macos-11]
|
|
31
|
+
cibw-archs-macos:
|
|
32
|
+
arm: arm64
|
|
33
|
+
intel: x86_64
|
|
34
|
+
- name: Ubuntu
|
|
35
|
+
matrix: ubuntu
|
|
36
|
+
runs-on:
|
|
37
|
+
arm: [Linux, ARM64]
|
|
38
|
+
intel: [ubuntu-latest]
|
|
39
|
+
- name: Windows
|
|
40
|
+
matrix: windows
|
|
41
|
+
runs-on:
|
|
42
|
+
intel: [windows-latest]
|
|
43
|
+
python:
|
|
44
|
+
- major-dot-minor: '3.7'
|
|
45
|
+
cibw-build: 'cp37-*'
|
|
46
|
+
manylinux:
|
|
47
|
+
arch: manylinux2014
|
|
48
|
+
intel: manylinux2010
|
|
49
|
+
matrix: '3.7'
|
|
50
|
+
- major-dot-minor: '3.8'
|
|
51
|
+
cibw-build: 'cp38-*'
|
|
52
|
+
manylinux:
|
|
53
|
+
arch: manylinux2014
|
|
54
|
+
intel: manylinux2010
|
|
55
|
+
matrix: '3.8'
|
|
56
|
+
- major-dot-minor: '3.9'
|
|
57
|
+
cibw-build: 'cp39-*'
|
|
58
|
+
manylinux:
|
|
59
|
+
arch: manylinux2014
|
|
60
|
+
intel: manylinux2010
|
|
61
|
+
matrix: '3.9'
|
|
62
|
+
- major-dot-minor: '3.10'
|
|
63
|
+
cibw-build: 'cp310-*'
|
|
64
|
+
manylinux:
|
|
65
|
+
arch: manylinux2014
|
|
66
|
+
intel: manylinux2010
|
|
67
|
+
matrix: '3.10'
|
|
68
|
+
- major-dot-minor: '3.11'
|
|
69
|
+
cibw-build: 'cp311-*'
|
|
70
|
+
manylinux:
|
|
71
|
+
arch: manylinux2014
|
|
72
|
+
intel: manylinux2014
|
|
73
|
+
matrix: '3.11'
|
|
74
|
+
arch:
|
|
75
|
+
# - name: ARM
|
|
76
|
+
# matrix: arm
|
|
77
|
+
- name: Intel
|
|
78
|
+
matrix: intel
|
|
79
|
+
exclude:
|
|
80
|
+
# Only partial entries are required here by GitHub Actions so generally I
|
|
81
|
+
# only specify the `matrix:` entry. The super linter complains so for now
|
|
82
|
+
# all entries are included to avoid that. Reported at
|
|
83
|
+
# https://github.com/github/super-linter/issues/3016
|
|
84
|
+
- os:
|
|
85
|
+
name: Windows
|
|
86
|
+
matrix: windows
|
|
87
|
+
runs-on:
|
|
88
|
+
intel: [windows-latest]
|
|
89
|
+
arch:
|
|
90
|
+
name: ARM
|
|
91
|
+
matrix: arm
|
|
92
|
+
- os:
|
|
93
|
+
name: macOS
|
|
94
|
+
matrix: macos
|
|
95
|
+
runs-on:
|
|
96
|
+
arm: [macOS, ARM64]
|
|
97
|
+
intel: [macos-11]
|
|
98
|
+
python:
|
|
99
|
+
major-dot-minor: '3.7'
|
|
100
|
+
cibw-build: 'cp37-*'
|
|
101
|
+
matrix: '3.7'
|
|
102
|
+
arch:
|
|
103
|
+
name: ARM
|
|
104
|
+
matrix: arm
|
|
105
|
+
|
|
106
|
+
steps:
|
|
107
|
+
- name: Clean workspace
|
|
108
|
+
uses: Chik-Network/actions/clean-workspace@main
|
|
109
|
+
|
|
110
|
+
- name: Checkout code
|
|
111
|
+
uses: actions/checkout@v3
|
|
112
|
+
with:
|
|
113
|
+
fetch-depth: 0
|
|
114
|
+
|
|
115
|
+
- uses: Chik-Network/actions/setup-python@main
|
|
116
|
+
with:
|
|
117
|
+
python-version: ${{ matrix.python.major-dot-minor }}
|
|
118
|
+
|
|
119
|
+
- name: Install pipx
|
|
120
|
+
run: |
|
|
121
|
+
pip install pipx
|
|
122
|
+
|
|
123
|
+
- name: Build and test
|
|
124
|
+
env:
|
|
125
|
+
CIBW_BUILD_VERBOSITY_MACOS: 0
|
|
126
|
+
CIBW_BUILD_VERBOSITY_LINUX: 0
|
|
127
|
+
CIBW_BUILD_VERBOSITY_WINDOWS: 0
|
|
128
|
+
CIBW_BUILD: ${{ matrix.python.cibw-build }}
|
|
129
|
+
CIBW_SKIP: '*-manylinux_i686 *-win32 *-musllinux_*'
|
|
130
|
+
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.python.manylinux['arm'] }}
|
|
131
|
+
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.python.manylinux['intel'] }}
|
|
132
|
+
CIBW_ENVIRONMENT_LINUX: "PATH=/project/cmake-3.17.3-Linux-`uname -m`/bin:$PATH BUILD_VDF_CLIENT=N"
|
|
133
|
+
CIBW_BEFORE_ALL_LINUX: >
|
|
134
|
+
yum -y install epel-release
|
|
135
|
+
&& echo "epel-release installed"
|
|
136
|
+
&& yum -y install boost-devel lzip
|
|
137
|
+
&& echo "boost-devel and lzip installed"
|
|
138
|
+
&& curl -L https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-`uname -m`.sh > cmake.sh
|
|
139
|
+
&& yes | sh cmake.sh | cat
|
|
140
|
+
&& rm -f /usr/bin/cmake
|
|
141
|
+
&& curl -L https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.lz | tar x --lzip
|
|
142
|
+
&& cp src/lib/gmp-patch-6.2.1/longlong.h gmp-6.2.1/
|
|
143
|
+
&& cp src/lib/gmp-patch-6.2.1/compat.c gmp-6.2.1/
|
|
144
|
+
&& cp src/lib/gmp-patch-6.2.1/mpz/inp_raw.c gmp-6.2.1/mpz
|
|
145
|
+
&& cd gmp-6.2.1 && ./configure --enable-fat --enable-cxx
|
|
146
|
+
&& make && make install && cd .. && rm -rf gmp-6.2.1
|
|
147
|
+
&& cmake --version
|
|
148
|
+
&& uname -a
|
|
149
|
+
CIBW_BEFORE_BUILD_LINUX: >
|
|
150
|
+
python -m pip install --upgrade pip
|
|
151
|
+
CIBW_ARCHS_MACOS: ${{ matrix.os.cibw-archs-macos[matrix.arch.matrix] }}
|
|
152
|
+
CIBW_BEFORE_ALL_MACOS: >
|
|
153
|
+
brew install gmp boost cmake
|
|
154
|
+
CIBW_BEFORE_BUILD_MACOS: >
|
|
155
|
+
python -m pip install --upgrade pip
|
|
156
|
+
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.14 BUILD_VDF_CLIENT=N"
|
|
157
|
+
CIBW_BEFORE_ALL_WINDOWS: >
|
|
158
|
+
git clone https://github.com/Chik-Network/mpir_gc_x64.git
|
|
159
|
+
CIBW_ENVIRONMENT_WINDOWS: "BUILD_VDF_CLIENT=N SETUPTOOLS_USE_DISTUTILS=stdlib"
|
|
160
|
+
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
|
|
161
|
+
ls -l mpir_gc_x64 && pip uninstall -y delocate
|
|
162
|
+
&& pip install git+https://github.com/Chik-Network/delocate.git
|
|
163
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir.dll {wheel}
|
|
164
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_gc.dll {wheel}
|
|
165
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_broadwell.dll {wheel}
|
|
166
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_broadwell_avx.dll {wheel}
|
|
167
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_bulldozer.dll {wheel}
|
|
168
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_haswell.dll {wheel}
|
|
169
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_piledriver.dll {wheel}
|
|
170
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_sandybridge.dll {wheel}
|
|
171
|
+
&& delocate-wheel -v -i mpir_gc_x64/mpir_skylake_avx.dll {wheel}
|
|
172
|
+
&& cp {wheel} {dest_dir}
|
|
173
|
+
CIBW_TEST_REQUIRES: pytest
|
|
174
|
+
CIBW_TEST_COMMAND: py.test -v {project}/tests
|
|
175
|
+
CIBW_PRERELEASE_PYTHONS: True
|
|
176
|
+
run:
|
|
177
|
+
pipx run --spec='cibuildwheel==2.11.1' cibuildwheel --output-dir dist 2>&1
|
|
178
|
+
|
|
179
|
+
- name: Upload artifacts
|
|
180
|
+
uses: actions/upload-artifact@v3
|
|
181
|
+
with:
|
|
182
|
+
name: packages
|
|
183
|
+
path: ./dist
|
|
184
|
+
|
|
185
|
+
build-sdist:
|
|
186
|
+
name: sdist - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }}
|
|
187
|
+
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
|
|
188
|
+
strategy:
|
|
189
|
+
fail-fast: false
|
|
190
|
+
matrix:
|
|
191
|
+
os:
|
|
192
|
+
- name: Ubuntu
|
|
193
|
+
matrix: ubuntu
|
|
194
|
+
runs-on:
|
|
195
|
+
arm: [Linux, ARM64]
|
|
196
|
+
intel: [ubuntu-latest]
|
|
197
|
+
python:
|
|
198
|
+
- major-dot-minor: '3.9'
|
|
199
|
+
matrix: '3.9'
|
|
200
|
+
arch:
|
|
201
|
+
- name: Intel
|
|
202
|
+
matrix: intel
|
|
203
|
+
|
|
204
|
+
steps:
|
|
205
|
+
- name: Clean workspace
|
|
206
|
+
uses: Chik-Network/actions/clean-workspace@main
|
|
207
|
+
|
|
208
|
+
- name: Checkout code
|
|
209
|
+
uses: actions/checkout@v3
|
|
210
|
+
with:
|
|
211
|
+
fetch-depth: 0
|
|
212
|
+
|
|
213
|
+
- uses: Chik-Network/actions/setup-python@main
|
|
214
|
+
with:
|
|
215
|
+
python-version: ${{ matrix.python.major-dot-minor }}
|
|
216
|
+
|
|
217
|
+
- name: Build source distribution
|
|
218
|
+
run: |
|
|
219
|
+
pip install build
|
|
220
|
+
python -m build --sdist --outdir dist .
|
|
221
|
+
|
|
222
|
+
- name: Upload artifacts
|
|
223
|
+
uses: actions/upload-artifact@v3
|
|
224
|
+
with:
|
|
225
|
+
name: packages
|
|
226
|
+
path: ./dist
|
|
227
|
+
|
|
228
|
+
check:
|
|
229
|
+
name: Check - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }}
|
|
230
|
+
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
|
|
231
|
+
strategy:
|
|
232
|
+
fail-fast: false
|
|
233
|
+
matrix:
|
|
234
|
+
os:
|
|
235
|
+
- name: Ubuntu
|
|
236
|
+
matrix: ubuntu
|
|
237
|
+
runs-on:
|
|
238
|
+
arm: [Linux, ARM64]
|
|
239
|
+
intel: [ubuntu-latest]
|
|
240
|
+
python:
|
|
241
|
+
- major-dot-minor: '3.9'
|
|
242
|
+
matrix: '3.9'
|
|
243
|
+
arch:
|
|
244
|
+
- name: Intel
|
|
245
|
+
matrix: intel
|
|
246
|
+
|
|
247
|
+
steps:
|
|
248
|
+
- name: Clean workspace
|
|
249
|
+
uses: Chik-Network/actions/clean-workspace@main
|
|
250
|
+
|
|
251
|
+
- name: Checkout code
|
|
252
|
+
uses: actions/checkout@v3
|
|
253
|
+
with:
|
|
254
|
+
fetch-depth: 0
|
|
255
|
+
|
|
256
|
+
- uses: Chik-Network/actions/setup-python@main
|
|
257
|
+
with:
|
|
258
|
+
python-version: ${{ matrix.python.major-dot-minor }}
|
|
259
|
+
|
|
260
|
+
- name: flake8
|
|
261
|
+
run: |
|
|
262
|
+
pip install flake8
|
|
263
|
+
flake8 tests setup.py
|
|
264
|
+
|
|
265
|
+
- name: mypy
|
|
266
|
+
run: |
|
|
267
|
+
pip install mypy
|
|
268
|
+
mypy --config-file mypi.ini setup.py tests
|
|
269
|
+
|
|
270
|
+
upload:
|
|
271
|
+
name: Upload to PyPI - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }}
|
|
272
|
+
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
|
|
273
|
+
needs:
|
|
274
|
+
- build-wheels
|
|
275
|
+
- build-sdist
|
|
276
|
+
- check
|
|
277
|
+
strategy:
|
|
278
|
+
fail-fast: false
|
|
279
|
+
matrix:
|
|
280
|
+
os:
|
|
281
|
+
- name: Ubuntu
|
|
282
|
+
matrix: ubuntu
|
|
283
|
+
runs-on:
|
|
284
|
+
arm: [Linux, ARM64]
|
|
285
|
+
intel: [ubuntu-latest]
|
|
286
|
+
python:
|
|
287
|
+
- major-dot-minor: '3.9'
|
|
288
|
+
matrix: '3.9'
|
|
289
|
+
arch:
|
|
290
|
+
- name: Intel
|
|
291
|
+
matrix: intel
|
|
292
|
+
|
|
293
|
+
steps:
|
|
294
|
+
- name: Clean workspace
|
|
295
|
+
uses: Chik-Network/actions/clean-workspace@main
|
|
296
|
+
|
|
297
|
+
- name: Checkout code
|
|
298
|
+
uses: actions/checkout@v3
|
|
299
|
+
with:
|
|
300
|
+
fetch-depth: 0
|
|
301
|
+
|
|
302
|
+
- uses: Chik-Network/actions/setup-python@main
|
|
303
|
+
with:
|
|
304
|
+
python-version: ${{ matrix.python.major-dot-minor }}
|
|
305
|
+
|
|
306
|
+
- name: Download artifacts
|
|
307
|
+
uses: actions/download-artifact@v3
|
|
308
|
+
with:
|
|
309
|
+
name: packages
|
|
310
|
+
path: ./dist
|
|
311
|
+
|
|
312
|
+
- name: Test for secrets access
|
|
313
|
+
id: check_secrets
|
|
314
|
+
shell: bash
|
|
315
|
+
run: |
|
|
316
|
+
unset HAS_SECRET
|
|
317
|
+
if [ -n "$SECRET" ]; then HAS_SECRET='true' ; fi
|
|
318
|
+
echo "HAS_SECRET=${HAS_SECRET}" >>$GITHUB_OUTPUT
|
|
319
|
+
env:
|
|
320
|
+
SECRET: "${{ secrets.test_pypi_password }}"
|
|
321
|
+
|
|
322
|
+
- name: Install twine
|
|
323
|
+
run: pip install twine
|
|
324
|
+
|
|
325
|
+
- name: Publish distribution to PyPI
|
|
326
|
+
if: startsWith(github.event.ref, 'refs/tags') && steps.check_secrets.outputs.HAS_SECRET
|
|
327
|
+
env:
|
|
328
|
+
TWINE_USERNAME: __token__
|
|
329
|
+
TWINE_NON_INTERACTIVE: 1
|
|
330
|
+
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
|
331
|
+
run: twine upload --non-interactive --skip-existing --verbose 'dist/*'
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ "main" ]
|
|
17
|
+
pull_request:
|
|
18
|
+
# The branches below must be a subset of the branches above
|
|
19
|
+
branches: [ "main" ]
|
|
20
|
+
schedule:
|
|
21
|
+
- cron: '43 9 * * 5'
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
analyze:
|
|
25
|
+
name: Analyze
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
permissions:
|
|
28
|
+
actions: read
|
|
29
|
+
contents: read
|
|
30
|
+
security-events: write
|
|
31
|
+
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
language: [ 'cpp', 'python' ]
|
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
37
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
38
|
+
|
|
39
|
+
steps:
|
|
40
|
+
- name: Checkout repository
|
|
41
|
+
uses: actions/checkout@v3
|
|
42
|
+
|
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
|
44
|
+
- name: Initialize CodeQL
|
|
45
|
+
uses: github/codeql-action/init@v2
|
|
46
|
+
with:
|
|
47
|
+
languages: ${{ matrix.language }}
|
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
51
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
52
|
+
# queries: security-extended,security-and-quality
|
|
53
|
+
|
|
54
|
+
- name: Build
|
|
55
|
+
run: |
|
|
56
|
+
export BUILD_VDF_CLIENT=Y
|
|
57
|
+
export BUILD_VDF_BENCH=Y
|
|
58
|
+
sudo apt update && sudo apt-get install cmake libboost-all-dev libgmp-dev
|
|
59
|
+
python3 -m venv venv
|
|
60
|
+
source venv/bin/activate
|
|
61
|
+
pip install wheel setuptools_scm pybind11
|
|
62
|
+
pip wheel .
|
|
63
|
+
|
|
64
|
+
- name: Perform CodeQL Analysis
|
|
65
|
+
uses: github/codeql-action/analyze@v2
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'Close stale issues'
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 11 * * *'
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
stale:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: chik-network/stale@main
|
|
12
|
+
with:
|
|
13
|
+
operations-per-run: 10000
|
|
14
|
+
ascending: true
|
|
15
|
+
days-before-issue-stale: 14
|
|
16
|
+
days-before-issue-close: 7
|
|
17
|
+
days-before-pr-stale: 60
|
|
18
|
+
days-before-pr-close: -1
|
|
19
|
+
exempt-all-pr-milestones: true
|
|
20
|
+
exempt-all-issue-milestones: true
|
|
21
|
+
exempt-all-assignees: true
|
|
22
|
+
stale-issue-label: stale-issue
|
|
23
|
+
stale-pr-label: stale-pr
|
|
24
|
+
remove-stale-when-updated: true
|
|
25
|
+
stale-issue-message: >
|
|
26
|
+
'This issue has been flagged as stale as there has been no
|
|
27
|
+
activity on it in 14 days. If this issue is still affecting you
|
|
28
|
+
and in need of review, please update it to keep it open.'
|
|
29
|
+
close-issue-message: >
|
|
30
|
+
'This issue was automatically closed because it has been flagged
|
|
31
|
+
as stale and subsequently passed 7 days with no further activity.'
|
|
32
|
+
stale-pr-message: >
|
|
33
|
+
'This PR has been flagged as stale due to no activity for over 60
|
|
34
|
+
days. It will not be automatically closed, but it has been given
|
|
35
|
+
a stale-pr label and should be manually reviewed.'
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Test Prover and vdf_client
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- '**'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches:
|
|
11
|
+
- '**'
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Test ${{ matrix.config }} ${{ matrix.os }}
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [macos-latest, ubuntu-latest]
|
|
21
|
+
config: [ optimized=1, TSAN=1, ASAN=1]
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout code
|
|
25
|
+
uses: actions/checkout@v3
|
|
26
|
+
|
|
27
|
+
- name: Build vdf-client on Ubuntu
|
|
28
|
+
if: startsWith(matrix.os, 'ubuntu')
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get install libgmp-dev libboost-python-dev libpython3-dev libboost-system-dev build-essential -y
|
|
31
|
+
cd src
|
|
32
|
+
make ${{ matrix.config }} -f Makefile.vdf-client
|
|
33
|
+
|
|
34
|
+
- name: Build vdf-client on Mac
|
|
35
|
+
if: startsWith(matrix.os, 'mac')
|
|
36
|
+
run: |
|
|
37
|
+
brew install boost
|
|
38
|
+
cd src
|
|
39
|
+
make ${{ matrix.config }} -f Makefile.vdf-client
|
|
40
|
+
|
|
41
|
+
- name: Test vdf-client
|
|
42
|
+
if: matrix.config == 'optimized=1'
|
|
43
|
+
run: |
|
|
44
|
+
cd src
|
|
45
|
+
echo "Running 1weso_test"
|
|
46
|
+
./1weso_test
|
|
47
|
+
echo "Running 2weso_test"
|
|
48
|
+
./2weso_test
|
|
49
|
+
echo "Running prover_test"
|
|
50
|
+
./prover_test
|
|
51
|
+
|
|
52
|
+
- name: Test vdf-client
|
|
53
|
+
if: matrix.config != 'optimized=1'
|
|
54
|
+
run: |
|
|
55
|
+
cd src
|
|
56
|
+
echo "Running 1weso_test"
|
|
57
|
+
./1weso_test 1000
|
|
58
|
+
echo "Running 2weso_test"
|
|
59
|
+
./2weso_test 1000
|
|
60
|
+
|
|
61
|
+
# macos thread sanitizer will give false positives on ./prover_test because
|
|
62
|
+
# it prints to std::cout from multiple threads. Which is allowed by the
|
|
63
|
+
# standard
|
|
64
|
+
- name: test Prover
|
|
65
|
+
if: matrix.config != 'optimized=1' && (matrix.config != 'TSAN=1' || startsWith(matrix.os, 'ubuntu'))
|
|
66
|
+
run: |
|
|
67
|
+
cd src
|
|
68
|
+
echo "Running prover_test"
|
|
69
|
+
./prover_test
|
|
70
|
+
|
|
71
|
+
- name: Benchmark vdf-client
|
|
72
|
+
if: matrix.config == 'optimized=1'
|
|
73
|
+
run: |
|
|
74
|
+
cd src
|
|
75
|
+
echo "Benchmarking vdf_client with 400,000 iterations of vdf_bench"
|
|
76
|
+
./vdf_bench square_asm 400000
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Generated assembly file
|
|
7
|
+
/asm_compiled.s
|
|
8
|
+
/avx2_asm_compiled.s
|
|
9
|
+
|
|
10
|
+
# Makefiles
|
|
11
|
+
CMakeFiles/
|
|
12
|
+
Makefile
|
|
13
|
+
CMakeCache.txt
|
|
14
|
+
cmake_install.cmake
|
|
15
|
+
_deps/
|
|
16
|
+
dist
|
|
17
|
+
|
|
18
|
+
# Binary files
|
|
19
|
+
src/compile_asm
|
|
20
|
+
/vdf
|
|
21
|
+
/server
|
|
22
|
+
src/vdf_bench
|
|
23
|
+
/vdf_server
|
|
24
|
+
src/vdf_client
|
|
25
|
+
src/1weso_test
|
|
26
|
+
src/2weso_test
|
|
27
|
+
src/prover_test
|
|
28
|
+
/verifier
|
|
29
|
+
/verifier_test
|
|
30
|
+
/build/*
|
|
31
|
+
*.whl
|
|
32
|
+
*.egg-info
|
|
33
|
+
*.o
|
|
34
|
+
*.s
|
|
35
|
+
|
|
36
|
+
# pyenv
|
|
37
|
+
.python-version
|
|
38
|
+
.eggs
|
|
39
|
+
.venv
|
|
40
|
+
venv
|
|
41
|
+
activate
|
|
42
|
+
|
|
43
|
+
# Tests cache
|
|
44
|
+
.mypy_cache
|
|
45
|
+
.pytest_cache
|
|
46
|
+
|
|
47
|
+
src/cmake-build-debug/
|
|
48
|
+
.idea
|