Skip to content

Commit 082cb08

Browse files
committed
Update upstream to 725d895fc54cf82da1c2a9c69048656405da556d
1 parent 9f62cc0 commit 082cb08

File tree

180 files changed

+44201
-13173
lines changed

Some content is hidden

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

180 files changed

+44201
-13173
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-zkp"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
55
"Andrew Poelstra <[email protected]>",
66
"Lucas Soriano <[email protected]>",
@@ -31,7 +31,7 @@ use-rand = ["rand", "secp256k1/rand"]
3131

3232
[dependencies]
3333
secp256k1 = "0.22.1"
34-
secp256k1-zkp-sys = { version = "0.5.0", default-features = false, path = "./secp256k1-zkp-sys" }
34+
secp256k1-zkp-sys = { version = "0.6.0", default-features = false, path = "./secp256k1-zkp-sys" }
3535
rand = { version = "0.6", default-features = false, optional = true }
3636
serde = { version = "1.0", default-features = false, optional = true }
3737

secp256k1-zkp-sys/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-zkp-sys"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
55
"Andrew Poelstra <[email protected]>",
66
"Steven Roose <[email protected]>",
@@ -13,7 +13,7 @@ description = "FFI for `libsecp256k1-zkp` library."
1313
keywords = [ "secp256k1", "libsecp256k1-zkp", "ffi" ]
1414
readme = "README.md"
1515
build = "build.rs"
16-
links = "rustsecp256k1zkp_v0_5_0"
16+
links = "rustsecp256k1zkp_v0_6_0"
1717

1818
# Should make docs.rs show all functions, even those behind non-default features
1919
[package.metadata.docs.rs]

secp256k1-zkp-sys/build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,7 @@ fn main() {
7474
base_config
7575
.file("depend/secp256k1/contrib/lax_der_parsing.c")
7676
.file("depend/secp256k1/src/secp256k1.c")
77+
.file("depend/secp256k1/src/precomputed_ecmult_gen.c")
78+
.file("depend/secp256k1/src/precomputed_ecmult.c")
7779
.compile("libsecp256k1zkp.a");
7880
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file was automatically created by ./vendor-libsecp.sh
2-
f3708a1ecb445b1b05a0f8fcd1da6a88f83d89c4
2+
725d895fc54cf82da1c2a9c69048656405da556d
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 6370bdd537492638e5ae0f7235cc73daab13ff12

secp256k1-zkp-sys/depend/secp256k1/.cirrus.yml

+179-70
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
env:
2-
WIDEMUL: auto
3-
BIGNUM: auto
4-
STATICPRECOMPUTATION: yes
2+
### compiler options
3+
HOST:
4+
# Specific warnings can be disabled with -Wno-error=foo.
5+
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
6+
WERROR_CFLAGS: -Werror -pedantic-errors
7+
MAKEFLAGS: -j4
8+
BUILD: check
9+
### secp256k1 config
10+
ECMULTWINDOW: auto
511
ECMULTGENPRECISION: auto
612
ASM: no
7-
BUILD: check
13+
WIDEMUL: auto
814
WITH_VALGRIND: yes
9-
RUN_VALGRIND: no
1015
EXTRAFLAGS:
11-
HOST:
16+
### secp256k1 modules
1217
ECDH: no
1318
RECOVERY: no
1419
SCHNORRSIG: no
@@ -18,11 +23,11 @@ env:
1823
WHITELIST: no
1924
MUSIG: no
2025
ECDSAADAPTOR: no
21-
EXPERIMENTAL: no
22-
CTIMETEST: yes
26+
### test options
27+
SECP256K1_TEST_ITERS:
2328
BENCH: yes
24-
ITERS: 2
25-
MAKEFLAGS: -j2
29+
SECP256K1_BENCH_ITERS: 2
30+
CTIMETEST: yes
2631

2732
cat_logs_snippet: &CAT_LOGS
2833
always:
@@ -50,62 +55,32 @@ merge_base_script_snippet: &MERGE_BASE
5055
- git config --global user.name "ci"
5156
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
5257

53-
task:
54-
name: "x86_64: Linux (Debian stable)"
58+
linux_container_snippet: &LINUX_CONTAINER
5559
container:
5660
dockerfile: ci/linux-debian.Dockerfile
5761
# Reduce number of CPUs to be able to do more builds in parallel.
5862
cpu: 1
63+
# Gives us more CPUs for free if they're available.
64+
greedy: true
5965
# More than enough for our scripts.
6066
memory: 1G
67+
68+
task:
69+
name: "x86_64: Linux (Debian stable)"
70+
<< : *LINUX_CONTAINER
6171
matrix: &ENV_MATRIX
6272
- env: {WIDEMUL: int64, RECOVERY: yes}
6373
- env: {WIDEMUL: int64, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
6474
- env: {WIDEMUL: int128}
6575
- env: {WIDEMUL: int128, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
6676
- env: {WIDEMUL: int128, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
6777
- env: {WIDEMUL: int128, ASM: x86_64}
68-
- env: {BIGNUM: no}
69-
- env: {BIGNUM: no, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
70-
- env: {BIGNUM: no, STATICPRECOMPUTATION: no}
78+
- env: { RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
7179
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
7280
- env: {CPPFLAGS: -DDETERMINISTIC}
7381
- env: {CFLAGS: -O0, CTIMETEST: no}
74-
- env:
75-
CFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
76-
LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
77-
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
78-
BIGNUM: no
79-
ASM: x86_64
80-
ECDH: yes
81-
RECOVERY: yes
82-
EXPERIMENTAL: yes
83-
SCHNORRSIG: yes
84-
ECDSA_S2C: yes
85-
RANGEPROOF: yes
86-
WHITELIST: yes
87-
GENERATOR: yes
88-
MUSIG: yes
89-
ECDSAADAPTOR: yes
90-
CTIMETEST: no
91-
- env: { ECMULTGENPRECISION: 2 }
92-
- env: { ECMULTGENPRECISION: 8 }
93-
- env:
94-
RUN_VALGRIND: yes
95-
BIGNUM: no
96-
ASM: x86_64
97-
ECDH: yes
98-
RECOVERY: yes
99-
EXPERIMENTAL: yes
100-
SCHNORRSIG: yes
101-
ECDSA_S2C: yes
102-
RANGEPROOF: yes
103-
WHITELIST: yes
104-
GENERATOR: yes
105-
MUSIG: yes
106-
ECDSAADAPTOR: yes
107-
EXTRAFLAGS: "--disable-openssl-tests"
108-
BUILD:
82+
- env: { ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
83+
- env: { ECMULTGENPRECISION: 8, ECMULTWINDOW: 4 }
10984
matrix:
11085
- env:
11186
CC: gcc
@@ -118,10 +93,7 @@ task:
11893

11994
task:
12095
name: "i686: Linux (Debian stable)"
121-
container:
122-
dockerfile: ci/linux-debian.Dockerfile
123-
cpu: 1
124-
memory: 1G
96+
<< : *LINUX_CONTAINER
12597
env:
12698
HOST: i686-linux-gnu
12799
ECDH: yes
@@ -139,11 +111,6 @@ task:
139111
CC: i686-linux-gnu-gcc
140112
- env:
141113
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
142-
matrix:
143-
- env:
144-
BIGNUM: gmp
145-
- env:
146-
BIGNUM: no
147114
<< : *MERGE_BASE
148115
test_script:
149116
- ./ci/cirrus.sh
@@ -153,8 +120,8 @@ task:
153120
name: "x86_64: macOS Catalina"
154121
macos_instance:
155122
image: catalina-base
156-
# As of d4ca81f48e tasks with valgrind enabled take about 60 minutes
157-
timeout_in: 90m
123+
# tasks with valgrind enabled take about 90 minutes
124+
timeout_in: 120m
158125
env:
159126
HOMEBREW_NO_AUTO_UPDATE: 1
160127
HOMEBREW_NO_INSTALL_CLEANUP: 1
@@ -181,8 +148,9 @@ task:
181148
## - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
182149
##
183150
brew_valgrind_pre_script:
151+
- brew update
184152
- brew config
185-
- brew tap --shallow LouisBrunner/valgrind
153+
- brew tap LouisBrunner/valgrind
186154
# Fetch valgrind source but don't build it yet.
187155
- brew fetch --HEAD LouisBrunner/valgrind/valgrind
188156
brew_valgrind_cache:
@@ -204,24 +172,20 @@ task:
204172
# If we haven't restored from cached (and just run brew install), this is a no-op.
205173
- brew link valgrind
206174
brew_script:
207-
- brew install automake libtool gmp gcc@9
175+
- brew install automake libtool gcc@9
208176
<< : *MERGE_BASE
209177
test_script:
210178
- ./ci/cirrus.sh
211179
<< : *CAT_LOGS
212180

213181
task:
214182
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
215-
container:
216-
dockerfile: ci/linux-debian.Dockerfile
217-
cpu: 1
218-
memory: 1G
183+
<< : *LINUX_CONTAINER
219184
env:
220-
QEMU_CMD: qemu-s390x
185+
WRAPPER_CMD: qemu-s390x
186+
SECP256K1_TEST_ITERS: 16
221187
HOST: s390x-linux-gnu
222-
BUILD:
223188
WITH_VALGRIND: no
224-
BIGNUM: no
225189
ECDH: yes
226190
RECOVERY: yes
227191
EXPERIMENTAL: yes
@@ -239,3 +203,148 @@ task:
239203
- rm /etc/ld.so.cache
240204
- ./ci/cirrus.sh
241205
<< : *CAT_LOGS
206+
207+
task:
208+
name: "ARM32: Linux (Debian stable, QEMU)"
209+
<< : *LINUX_CONTAINER
210+
env:
211+
WRAPPER_CMD: qemu-arm
212+
SECP256K1_TEST_ITERS: 16
213+
HOST: arm-linux-gnueabihf
214+
WITH_VALGRIND: no
215+
ECDH: yes
216+
RECOVERY: yes
217+
EXPERIMENTAL: yes
218+
SCHNORRSIG: yes
219+
CTIMETEST: no
220+
matrix:
221+
- env: {}
222+
- env: {ASM: arm}
223+
<< : *MERGE_BASE
224+
test_script:
225+
- ./ci/cirrus.sh
226+
<< : *CAT_LOGS
227+
228+
task:
229+
name: "ARM64: Linux (Debian stable, QEMU)"
230+
<< : *LINUX_CONTAINER
231+
env:
232+
WRAPPER_CMD: qemu-aarch64
233+
SECP256K1_TEST_ITERS: 16
234+
HOST: aarch64-linux-gnu
235+
WITH_VALGRIND: no
236+
ECDH: yes
237+
RECOVERY: yes
238+
EXPERIMENTAL: yes
239+
SCHNORRSIG: yes
240+
CTIMETEST: no
241+
<< : *MERGE_BASE
242+
test_script:
243+
- ./ci/cirrus.sh
244+
<< : *CAT_LOGS
245+
246+
task:
247+
name: "ppc64le: Linux (Debian stable, QEMU)"
248+
<< : *LINUX_CONTAINER
249+
env:
250+
WRAPPER_CMD: qemu-ppc64le
251+
SECP256K1_TEST_ITERS: 16
252+
HOST: powerpc64le-linux-gnu
253+
WITH_VALGRIND: no
254+
ECDH: yes
255+
RECOVERY: yes
256+
EXPERIMENTAL: yes
257+
SCHNORRSIG: yes
258+
CTIMETEST: no
259+
<< : *MERGE_BASE
260+
test_script:
261+
- ./ci/cirrus.sh
262+
<< : *CAT_LOGS
263+
264+
task:
265+
name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
266+
<< : *LINUX_CONTAINER
267+
env:
268+
WRAPPER_CMD: wine64-stable
269+
SECP256K1_TEST_ITERS: 16
270+
HOST: x86_64-w64-mingw32
271+
WITH_VALGRIND: no
272+
ECDH: yes
273+
RECOVERY: yes
274+
EXPERIMENTAL: yes
275+
SCHNORRSIG: yes
276+
CTIMETEST: no
277+
<< : *MERGE_BASE
278+
test_script:
279+
- ./ci/cirrus.sh
280+
<< : *CAT_LOGS
281+
282+
# Sanitizers
283+
task:
284+
timeout_in: 120m
285+
<< : *LINUX_CONTAINER
286+
env:
287+
ECDH: yes
288+
RECOVERY: yes
289+
EXPERIMENTAL: yes
290+
SCHNORRSIG: yes
291+
ECDSA_S2C: yes
292+
RANGEPROOF: yes
293+
WHITELIST: yes
294+
GENERATOR: yes
295+
MUSIG: yes
296+
ECDSAADAPTOR: yes
297+
CTIMETEST: no
298+
matrix:
299+
- name: "Valgrind (memcheck)"
300+
container:
301+
cpu: 2
302+
env:
303+
# 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)
304+
WRAPPER_CMD: "valgrind --error-exitcode=42"
305+
SECP256K1_TEST_ITERS: 2
306+
- name: "UBSan, ASan, LSan"
307+
container:
308+
memory: 2G
309+
env:
310+
CFLAGS: "-fsanitize=undefined,address -g"
311+
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
312+
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
313+
LSAN_OPTIONS: "use_unaligned=1"
314+
SECP256K1_TEST_ITERS: 32
315+
# Try to cover many configurations with just a tiny matrix.
316+
matrix:
317+
- env:
318+
ASM: auto
319+
- env:
320+
ASM: no
321+
ECMULTGENPRECISION: 2
322+
ECMULTWINDOW: 2
323+
matrix:
324+
- env:
325+
CC: clang
326+
- env:
327+
HOST: i686-linux-gnu
328+
CC: i686-linux-gnu-gcc
329+
<< : *MERGE_BASE
330+
test_script:
331+
- ./ci/cirrus.sh
332+
<< : *CAT_LOGS
333+
334+
task:
335+
name: "C++ -fpermissive"
336+
<< : *LINUX_CONTAINER
337+
env:
338+
# ./configure correctly errors out when given CC=g++.
339+
# We hack around this by passing CC=g++ only to make.
340+
CC: gcc
341+
MAKEFLAGS: -j4 CC=g++ CFLAGS=-fpermissive\ -g
342+
WERROR_CFLAGS:
343+
EXPERIMENTAL: yes
344+
ECDH: yes
345+
RECOVERY: yes
346+
SCHNORRSIG: yes
347+
<< : *MERGE_BASE
348+
test_script:
349+
- ./ci/cirrus.sh
350+
<< : *CAT_LOGS
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/precomputed_ecmult.c linguist-generated
2+
src/precomputed_ecmult_gen.c linguist-generated

0 commit comments

Comments
 (0)