Skip to content

Commit c98f8fb

Browse files
Merge commit 'fe39e79b3d2171712501da02b63102313d184938' as 'depend/secp256k1'
2 parents 12e9803 + fe39e79 commit c98f8fb

File tree

101 files changed

+29204
-0
lines changed

Some content is hidden

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

101 files changed

+29204
-0
lines changed

depend/secp256k1/.cirrus.yml

+294
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
env:
2+
WIDEMUL: auto
3+
STATICPRECOMPUTATION: yes
4+
ECMULTGENPRECISION: auto
5+
ASM: no
6+
BUILD: check
7+
WITH_VALGRIND: yes
8+
EXTRAFLAGS:
9+
HOST:
10+
ECDH: no
11+
RECOVERY: no
12+
SCHNORRSIG: no
13+
EXPERIMENTAL: no
14+
CTIMETEST: yes
15+
BENCH: yes
16+
TEST_ITERS:
17+
BENCH_ITERS: 2
18+
MAKEFLAGS: -j2
19+
20+
cat_logs_snippet: &CAT_LOGS
21+
always:
22+
cat_tests_log_script:
23+
- cat tests.log || true
24+
cat_exhaustive_tests_log_script:
25+
- cat exhaustive_tests.log || true
26+
cat_valgrind_ctime_test_log_script:
27+
- cat valgrind_ctime_test.log || true
28+
cat_bench_log_script:
29+
- cat bench.log || true
30+
on_failure:
31+
cat_config_log_script:
32+
- cat config.log || true
33+
cat_test_env_script:
34+
- cat test_env.log || true
35+
cat_ci_env_script:
36+
- env
37+
38+
merge_base_script_snippet: &MERGE_BASE
39+
merge_base_script:
40+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
41+
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
42+
- git config --global user.email "[email protected]"
43+
- git config --global user.name "ci"
44+
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
45+
46+
task:
47+
name: "x86_64: Linux (Debian stable)"
48+
container:
49+
dockerfile: ci/linux-debian.Dockerfile
50+
# Reduce number of CPUs to be able to do more builds in parallel.
51+
cpu: 1
52+
# More than enough for our scripts.
53+
memory: 1G
54+
matrix: &ENV_MATRIX
55+
- env: {WIDEMUL: int64, RECOVERY: yes}
56+
- env: {WIDEMUL: int64, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
57+
- env: {WIDEMUL: int128}
58+
- env: {WIDEMUL: int128, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
59+
- env: {WIDEMUL: int128, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
60+
- env: {WIDEMUL: int128, ASM: x86_64}
61+
- env: { RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
62+
- env: { STATICPRECOMPUTATION: no}
63+
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
64+
- env: {CPPFLAGS: -DDETERMINISTIC}
65+
- env: {CFLAGS: -O0, CTIMETEST: no}
66+
- env: { ECMULTGENPRECISION: 2 }
67+
- env: { ECMULTGENPRECISION: 8 }
68+
matrix:
69+
- env:
70+
CC: gcc
71+
- env:
72+
CC: clang
73+
<< : *MERGE_BASE
74+
test_script:
75+
- ./ci/cirrus.sh
76+
<< : *CAT_LOGS
77+
78+
task:
79+
name: "i686: Linux (Debian stable)"
80+
container:
81+
dockerfile: ci/linux-debian.Dockerfile
82+
cpu: 1
83+
memory: 1G
84+
env:
85+
HOST: i686-linux-gnu
86+
ECDH: yes
87+
RECOVERY: yes
88+
EXPERIMENTAL: yes
89+
SCHNORRSIG: yes
90+
matrix:
91+
- env:
92+
CC: i686-linux-gnu-gcc
93+
- env:
94+
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
95+
<< : *MERGE_BASE
96+
test_script:
97+
- ./ci/cirrus.sh
98+
<< : *CAT_LOGS
99+
100+
task:
101+
name: "x86_64: macOS Catalina"
102+
macos_instance:
103+
image: catalina-base
104+
env:
105+
HOMEBREW_NO_AUTO_UPDATE: 1
106+
HOMEBREW_NO_INSTALL_CLEANUP: 1
107+
# Cirrus gives us a fixed number of 12 virtual CPUs. Not that we even have that many jobs at the moment...
108+
MAKEFLAGS: -j13
109+
matrix:
110+
<< : *ENV_MATRIX
111+
matrix:
112+
- env:
113+
CC: gcc-9
114+
- env:
115+
CC: clang
116+
# Update Command Line Tools
117+
# Uncomment this if the Command Line Tools on the CirrusCI macOS image are too old to brew valgrind.
118+
# See https://apple.stackexchange.com/a/195963 for the implementation.
119+
## update_clt_script:
120+
## - system_profiler SPSoftwareDataType
121+
## - touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
122+
## - |-
123+
## PROD=$(softwareupdate -l | grep "*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | sed 's/Label: //g' | tr -d '\n')
124+
## # For debugging
125+
## - softwareupdate -l && echo "PROD: $PROD"
126+
## - softwareupdate -i "$PROD" --verbose
127+
## - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
128+
##
129+
brew_valgrind_pre_script:
130+
- brew config
131+
- brew tap --shallow LouisBrunner/valgrind
132+
# Fetch valgrind source but don't build it yet.
133+
- brew fetch --HEAD LouisBrunner/valgrind/valgrind
134+
brew_valgrind_cache:
135+
# This is $(brew --cellar valgrind) but command substition does not work here.
136+
folder: /usr/local/Cellar/valgrind
137+
# Rebuild cache if ...
138+
fingerprint_script:
139+
# ... macOS version changes:
140+
- sw_vers
141+
# ... brew changes:
142+
- brew config
143+
# ... valgrind changes:
144+
- git -C "$(brew --cache)/valgrind--git" rev-parse HEAD
145+
populate_script:
146+
# If there's no hit in the cache, build and install valgrind.
147+
- brew install --HEAD LouisBrunner/valgrind/valgrind
148+
brew_valgrind_post_script:
149+
# If we have restored valgrind from the cache, tell brew to create symlink to the PATH.
150+
# If we haven't restored from cached (and just run brew install), this is a no-op.
151+
- brew link valgrind
152+
brew_script:
153+
- brew install automake libtool gcc@9
154+
<< : *MERGE_BASE
155+
test_script:
156+
- ./ci/cirrus.sh
157+
<< : *CAT_LOGS
158+
159+
task:
160+
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
161+
container:
162+
dockerfile: ci/linux-debian.Dockerfile
163+
cpu: 1
164+
memory: 1G
165+
env:
166+
WRAPPER_CMD: qemu-s390x
167+
TEST_ITERS: 16
168+
HOST: s390x-linux-gnu
169+
WITH_VALGRIND: no
170+
ECDH: yes
171+
RECOVERY: yes
172+
EXPERIMENTAL: yes
173+
SCHNORRSIG: yes
174+
CTIMETEST: no
175+
<< : *MERGE_BASE
176+
test_script:
177+
# https://sourceware.org/bugzilla/show_bug.cgi?id=27008
178+
- rm /etc/ld.so.cache
179+
- ./ci/cirrus.sh
180+
<< : *CAT_LOGS
181+
182+
task:
183+
name: "ARM32: Linux (Debian stable, QEMU)"
184+
container:
185+
dockerfile: ci/linux-debian.Dockerfile
186+
cpu: 1
187+
memory: 1G
188+
env:
189+
WRAPPER_CMD: qemu-arm
190+
TEST_ITERS: 16
191+
HOST: arm-linux-gnueabihf
192+
WITH_VALGRIND: no
193+
ECDH: yes
194+
RECOVERY: yes
195+
EXPERIMENTAL: yes
196+
SCHNORRSIG: yes
197+
CTIMETEST: no
198+
matrix:
199+
- env: {}
200+
- env: {ASM: arm}
201+
<< : *MERGE_BASE
202+
test_script:
203+
- ./ci/cirrus.sh
204+
<< : *CAT_LOGS
205+
206+
task:
207+
name: "ARM64: Linux (Debian stable, QEMU)"
208+
container:
209+
dockerfile: ci/linux-debian.Dockerfile
210+
cpu: 1
211+
memory: 1G
212+
env:
213+
WRAPPER_CMD: qemu-aarch64
214+
TEST_ITERS: 16
215+
HOST: aarch64-linux-gnu
216+
WITH_VALGRIND: no
217+
ECDH: yes
218+
RECOVERY: yes
219+
EXPERIMENTAL: yes
220+
SCHNORRSIG: yes
221+
CTIMETEST: no
222+
<< : *MERGE_BASE
223+
test_script:
224+
- ./ci/cirrus.sh
225+
<< : *CAT_LOGS
226+
227+
task:
228+
name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
229+
container:
230+
dockerfile: ci/linux-debian.Dockerfile
231+
cpu: 1
232+
memory: 1G
233+
env:
234+
WRAPPER_CMD: wine64-stable
235+
TEST_ITERS: 16
236+
HOST: x86_64-w64-mingw32
237+
WITH_VALGRIND: no
238+
ECDH: yes
239+
RECOVERY: yes
240+
EXPERIMENTAL: yes
241+
SCHNORRSIG: yes
242+
CTIMETEST: no
243+
<< : *MERGE_BASE
244+
test_script:
245+
- ./ci/cirrus.sh
246+
<< : *CAT_LOGS
247+
248+
# Sanitizers
249+
task:
250+
container:
251+
dockerfile: ci/linux-debian.Dockerfile
252+
cpu: 1
253+
memory: 1G
254+
env:
255+
ECDH: yes
256+
RECOVERY: yes
257+
EXPERIMENTAL: yes
258+
SCHNORRSIG: yes
259+
CTIMETEST: no
260+
EXTRAFLAGS: "--disable-openssl-tests"
261+
matrix:
262+
- name: "Valgrind (memcheck)"
263+
env:
264+
# The `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (https://www.valgrind.org/docs/manual/manual-core.html)
265+
WRAPPER_CMD: "valgrind --error-exitcode=42"
266+
TEST_ITERS: 16
267+
- name: "UBSan, ASan, LSan"
268+
env:
269+
CFLAGS: "-fsanitize=undefined,address"
270+
CFLAGS_FOR_BUILD: "-fsanitize=undefined,address"
271+
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
272+
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
273+
LSAN_OPTIONS: "use_unaligned=1"
274+
TEST_ITERS: 32
275+
# Try to cover many configurations with just a tiny matrix.
276+
matrix:
277+
- env:
278+
ASM: auto
279+
STATICPRECOMPUTATION: yes
280+
- env:
281+
ASM: no
282+
STATICPRECOMPUTATION: no
283+
ECMULTGENPRECISION: 2
284+
matrix:
285+
- env:
286+
CC: clang
287+
- env:
288+
HOST: i686-linux-gnu
289+
CC: i686-linux-gnu-gcc
290+
<< : *MERGE_BASE
291+
test_script:
292+
- ./ci/cirrus.sh
293+
<< : *CAT_LOGS
294+

depend/secp256k1/.gitignore

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
bench_inv
2+
bench_ecdh
3+
bench_ecmult
4+
bench_schnorrsig
5+
bench_sign
6+
bench_verify
7+
bench_recover
8+
bench_internal
9+
tests
10+
exhaustive_tests
11+
gen_context
12+
valgrind_ctime_test
13+
*.exe
14+
*.so
15+
*.a
16+
!.gitignore
17+
18+
Makefile
19+
configure
20+
.libs/
21+
Makefile.in
22+
aclocal.m4
23+
autom4te.cache/
24+
config.log
25+
config.status
26+
*.tar.gz
27+
*.la
28+
libtool
29+
.deps/
30+
.dirstamp
31+
*.lo
32+
*.o
33+
*~
34+
*.log
35+
*.trs
36+
37+
coverage/
38+
coverage.html
39+
coverage.*.html
40+
*.gcda
41+
*.gcno
42+
*.gcov
43+
44+
src/libsecp256k1-config.h
45+
src/libsecp256k1-config.h.in
46+
src/ecmult_static_context.h
47+
build-aux/config.guess
48+
build-aux/config.sub
49+
build-aux/depcomp
50+
build-aux/install-sh
51+
build-aux/ltmain.sh
52+
build-aux/m4/libtool.m4
53+
build-aux/m4/lt~obsolete.m4
54+
build-aux/m4/ltoptions.m4
55+
build-aux/m4/ltsugar.m4
56+
build-aux/m4/ltversion.m4
57+
build-aux/missing
58+
build-aux/compile
59+
build-aux/test-driver
60+
src/stamp-h1
61+
libsecp256k1.pc

depend/secp256k1/COPYING

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2013 Pieter Wuille
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

0 commit comments

Comments
 (0)