Skip to content

Commit c6f01da

Browse files
Squashed 'depend/secp256k1/' changes from 143ecc6f..9fd06254
9fd06254 Merge pull request #5 from bitcoin-core/master 4c3ba88c Merge #901: ci: Switch all Linux builds to Debian and more improvements 9361f360 ci: Select number of parallel make jobs depending on CI environment 28eccdf8 ci: Split output of logs into multiple sections c7f754fe ci: Run PRs on merge result instead of on the source branch b994a8be ci: Print information about binaries using "file" f24e122d ci: Switch all Linux builds to Debian ebdba03c Merge #891: build: Add workaround for automake 1.13 and older 3a8b47bc Merge #894: ctime_test: move context randomization test to the end 7d3497cd ctime_test: move context randomization test to the end f329bba2 build: Add workaround for automake 1.13 and older 24d1656c Merge #882: Use bit ops instead of int mult for constant-time logic in gej_add_ge e491d06b Use bit ops instead of int mult for constant-time logic in gej_add_ge f8c0b57e Merge #864: Add support for Cirrus CI cc2a5451 ci: Refactor Nix shell files 2480e55c ci: Remove support for Travis CI 2b359f1c ci: Enable simple cache for brewing valgrind on macOS 8c02e465 ci: Add support for Cirrus CI 659d0d47 Merge #880: Add parens around ROUND_TO_ALIGN's parameter. b6f64988 Add parens around ROUND_TO_ALIGN's parameter. This makes the macro robust against a hypothetical ROUND_TO_ALIGN(foo ? sizeA : size B) invocation. a4abaab7 Merge #877: Add missing secp256k1_ge_set_gej_var decl. 5671e5f3 Merge #874: Remove underscores from header defs. db726782 Merge #878: Remove unused secp256k1_fe_inv_all_var b732701f Merge #875: Avoid casting (void**) values. 75d2ae14 Remove unused secp256k1_fe_inv_all_var 482e4a9c Add missing secp256k1_ge_set_gej_var decl. 27306186 Avoid casting (void**) values. Replaced with an expression that only casts (void*) values. fb390c52 Remove underscores from header defs. This makes them consistent with other files and avoids reserved identifiers. f2d9aeae Merge #862: Autoconf improvements 328aaef2 Merge #845: Extract the secret key from a keypair 3c151307 Improve CC_FOR_BUILD detection 47802a47 Restructure and tidy configure.ac 252c19df Ask brew for valgrind include path 8c727b90 Merge #860: fixed trivial typo b7bc3a4a fixed typo 33cb3c2b Add secret key extraction from keypair to constant time tests 36d9dc1e Add seckey extraction from keypair to the extrakeys tests fc96aa73 Add a function to extract the secretkey from a keypair 98dac878 Merge #858: Fix insecure links 07aa4c70 Fix insecure links b61f9da5 Merge #857: docs: fix simple typo, dependecy -> dependency 18aadf9d docs: fix simple typo, dependecy -> dependency 2d9e7175 Merge #852: Add sage script for generating scalar_split_lambda constants dc6e5c3a Merge #854: Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation 6e85d675 Rename tweak to tweak32 in public API f587f04e Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation 329a2e0a sage: Add script for generating scalar_split_lambda constants 8f0c6f15 Merge #851: make test count iteration configurable by environment variable f4fa8d22 forbid a test iteration of 0 or less f554dfc7 sage: Reorganize files 0ce45548 make test count iteration configurable by environment variable git-subtree-dir: depend/secp256k1 git-subtree-split: 9fd06254560b86bc36fb7661cf910df501c8bbe9
1 parent 5e317e2 commit c6f01da

Some content is hidden

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

87 files changed

+1118
-769
lines changed

.cirrus.yml

+209
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
env:
2+
WIDEMUL: auto
3+
BIGNUM: auto
4+
STATICPRECOMPUTATION: yes
5+
ECMULTGENPRECISION: auto
6+
ASM: no
7+
BUILD: check
8+
WITH_VALGRIND: yes
9+
RUN_VALGRIND: no
10+
EXTRAFLAGS:
11+
HOST:
12+
ECDH: no
13+
RECOVERY: no
14+
SCHNORRSIG: no
15+
EXPERIMENTAL: no
16+
CTIMETEST: yes
17+
BENCH: yes
18+
ITERS: 2
19+
MAKEFLAGS: -j2
20+
21+
cat_logs_snippet: &CAT_LOGS
22+
always:
23+
cat_tests_log_script:
24+
- cat tests.log || true
25+
cat_exhaustive_tests_log_script:
26+
- cat exhaustive_tests.log || true
27+
cat_valgrind_ctime_test_log_script:
28+
- cat valgrind_ctime_test.log || true
29+
cat_bench_log_script:
30+
- cat bench.log || true
31+
on_failure:
32+
cat_config_log_script:
33+
- cat config.log || true
34+
cat_test_env_script:
35+
- cat test_env.log || true
36+
cat_ci_env_script:
37+
- env
38+
39+
merge_base_script_snippet: &MERGE_BASE
40+
merge_base_script:
41+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
42+
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
43+
- git config --global user.email "[email protected]"
44+
- git config --global user.name "ci"
45+
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
46+
47+
task:
48+
name: "x86_64: Linux (Debian stable)"
49+
container:
50+
dockerfile: ci/linux-debian.Dockerfile
51+
# Reduce number of CPUs to be able to do more builds in parallel.
52+
cpu: 1
53+
# More than enough for our scripts.
54+
memory: 1G
55+
matrix: &ENV_MATRIX
56+
- env: {WIDEMUL: int64, RECOVERY: yes}
57+
- env: {WIDEMUL: int64, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
58+
- env: {WIDEMUL: int128}
59+
- env: {WIDEMUL: int128, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
60+
- env: {WIDEMUL: int128, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
61+
- env: {WIDEMUL: int128, ASM: x86_64}
62+
- env: {BIGNUM: no}
63+
- env: {BIGNUM: no, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
64+
- env: {BIGNUM: no, STATICPRECOMPUTATION: no}
65+
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
66+
- env: {CPPFLAGS: -DDETERMINISTIC}
67+
- env: {CFLAGS: -O0, CTIMETEST: no}
68+
- env:
69+
CFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
70+
LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
71+
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
72+
BIGNUM: no
73+
ASM: x86_64
74+
ECDH: yes
75+
RECOVERY: yes
76+
EXPERIMENTAL: yes
77+
SCHNORRSIG: yes
78+
CTIMETEST: no
79+
- env: { ECMULTGENPRECISION: 2 }
80+
- env: { ECMULTGENPRECISION: 8 }
81+
- env:
82+
RUN_VALGRIND: yes
83+
BIGNUM: no
84+
ASM: x86_64
85+
ECDH: yes
86+
RECOVERY: yes
87+
EXPERIMENTAL: yes
88+
SCHNORRSIG: yes
89+
EXTRAFLAGS: "--disable-openssl-tests"
90+
BUILD:
91+
matrix:
92+
- env:
93+
CC: gcc
94+
- env:
95+
CC: clang
96+
<< : *MERGE_BASE
97+
test_script:
98+
- ./ci/cirrus.sh
99+
<< : *CAT_LOGS
100+
101+
task:
102+
name: "i686: Linux (Debian stable)"
103+
container:
104+
dockerfile: ci/linux-debian.Dockerfile
105+
cpu: 1
106+
memory: 1G
107+
env:
108+
HOST: i686-linux-gnu
109+
ECDH: yes
110+
RECOVERY: yes
111+
EXPERIMENTAL: yes
112+
SCHNORRSIG: yes
113+
matrix:
114+
- env:
115+
CC: i686-linux-gnu-gcc
116+
- env:
117+
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
118+
matrix:
119+
- env:
120+
BIGNUM: gmp
121+
- env:
122+
BIGNUM: no
123+
<< : *MERGE_BASE
124+
test_script:
125+
- ./ci/cirrus.sh
126+
<< : *CAT_LOGS
127+
128+
task:
129+
name: "x86_64: macOS Catalina"
130+
macos_instance:
131+
image: catalina-base
132+
env:
133+
HOMEBREW_NO_AUTO_UPDATE: 1
134+
HOMEBREW_NO_INSTALL_CLEANUP: 1
135+
# Cirrus gives us a fixed number of 12 virtual CPUs. Not that we even have that many jobs at the moment...
136+
MAKEFLAGS: -j13
137+
matrix:
138+
<< : *ENV_MATRIX
139+
matrix:
140+
- env:
141+
CC: gcc-9
142+
- env:
143+
CC: clang
144+
# Update Command Line Tools
145+
# Uncomment this if the Command Line Tools on the CirrusCI macOS image are too old to brew valgrind.
146+
# See https://apple.stackexchange.com/a/195963 for the implementation.
147+
## update_clt_script:
148+
## - system_profiler SPSoftwareDataType
149+
## - touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
150+
## - |-
151+
## PROD=$(softwareupdate -l | grep "*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | sed 's/Label: //g' | tr -d '\n')
152+
## # For debugging
153+
## - softwareupdate -l && echo "PROD: $PROD"
154+
## - softwareupdate -i "$PROD" --verbose
155+
## - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
156+
##
157+
brew_valgrind_pre_script:
158+
- brew config
159+
- brew tap --shallow LouisBrunner/valgrind
160+
# Fetch valgrind source but don't build it yet.
161+
- brew fetch --HEAD LouisBrunner/valgrind/valgrind
162+
brew_valgrind_cache:
163+
# This is $(brew --cellar valgrind) but command substition does not work here.
164+
folder: /usr/local/Cellar/valgrind
165+
# Rebuild cache if ...
166+
fingerprint_script:
167+
# ... macOS version changes:
168+
- sw_vers
169+
# ... brew changes:
170+
- brew config
171+
# ... valgrind changes:
172+
- git -C "$(brew --cache)/valgrind--git" rev-parse HEAD
173+
populate_script:
174+
# If there's no hit in the cache, build and install valgrind.
175+
- brew install --HEAD LouisBrunner/valgrind/valgrind
176+
brew_valgrind_post_script:
177+
# If we have restored valgrind from the cache, tell brew to create symlink to the PATH.
178+
# If we haven't restored from cached (and just run brew install), this is a no-op.
179+
- brew link valgrind
180+
brew_script:
181+
- brew install automake libtool gmp gcc@9
182+
<< : *MERGE_BASE
183+
test_script:
184+
- ./ci/cirrus.sh
185+
<< : *CAT_LOGS
186+
187+
task:
188+
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
189+
container:
190+
dockerfile: ci/linux-debian.Dockerfile
191+
cpu: 1
192+
memory: 1G
193+
env:
194+
QEMU_CMD: qemu-s390x
195+
HOST: s390x-linux-gnu
196+
BUILD:
197+
WITH_VALGRIND: no
198+
BIGNUM: no
199+
ECDH: yes
200+
RECOVERY: yes
201+
EXPERIMENTAL: yes
202+
SCHNORRSIG: yes
203+
CTIMETEST: no
204+
<< : *MERGE_BASE
205+
test_script:
206+
# https://sourceware.org/bugzilla/show_bug.cgi?id=27008
207+
- rm /etc/ld.so.cache
208+
- ./ci/cirrus.sh
209+
<< : *CAT_LOGS

.travis.yml

-109
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
libsecp256k1
22
============
33

4-
[![Build Status](https://travis-ci.org/bitcoin-core/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin-core/secp256k1)
4+
[![Build Status](https://api.cirrus-ci.com/github/bitcoin-core/secp256k1.svg?branch=master)](https://cirrus-ci.com/github/bitcoin-core/secp256k1)
55

66
Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1.
77

build-aux/m4/ax_prog_cc_for_build.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
2+
# https://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
33
# ===========================================================================
44
#
55
# SYNOPSIS

build-aux/m4/bitcoin_secp.m4

+8
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,11 @@ if test x"$has_gmp" != x"yes"; then
8787
LIBS="$LIBS_TEMP"
8888
fi
8989
])
90+
91+
AC_DEFUN([SECP_VALGRIND_CHECK],[
92+
if test x"$has_valgrind" != x"yes"; then
93+
CPPFLAGS_TEMP="$CPPFLAGS"
94+
CPPFLAGS="$VALGRIND_CPPFLAGS $CPPFLAGS"
95+
AC_CHECK_HEADER([valgrind/memcheck.h], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed])])
96+
fi
97+
])

0 commit comments

Comments
 (0)