Skip to content

Commit da4f67b

Browse files
committed
Merge #653: Update vendored lib secp256k1 to v0.4.0
80b2a8d Update vendored libsecp to v0.4.0 (Davidson Souza) d2285c9 ci: Remove MIPS* from CI (Davidson Souza) 0d58f50 ci: generalize grp in "illegal callback" test (Andrew Poelstra) acf9ac1 delete `test_manual_create_destroy` test (Andrew Poelstra) 04ce508 lib: fix bad unit test (Andrew Poelstra) e4cca90 gitignore: remove things that shouldn't be there (Andrew Poelstra) Pull request description: Replaces #645 and #652. Precedes #627. I'm basically using #652 but resolving the linking problems, My local CI is erring on windows cross-test, but I can compile without issue with `cargo build --target x86_64-pc-windows-gnu`. Some MIPS jobs failed before even installing cross, I think those aren't really related to this PR. Any ideas on what can be happening? ACKs for top commit: apoelstra: ACK 80b2a8d Tree-SHA512: 62c2e04348110e3995111fa666f10dcc403b963770d047361f9209cf45b45db8744a7eb6d9ee3278d18007412dab5131ac3e1dd3e3d704963c6a6f232d57199a
2 parents 302ff20 + 80b2a8d commit da4f67b

File tree

159 files changed

+21825
-8073
lines changed

Some content is hidden

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

159 files changed

+21825
-8073
lines changed

.github/workflows/cross.yml

-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ jobs:
2727
- arm-unknown-linux-gnueabi
2828
- arm-unknown-linux-gnueabihf
2929
- armv7-unknown-linux-gnueabihf
30-
- mips-unknown-linux-gnu
31-
- mips64-unknown-linux-gnuabi64
32-
- mips64el-unknown-linux-gnuabi64
33-
- mipsel-unknown-linux-gnu
3430
- powerpc-unknown-linux-gnu
3531
# - powerpc64-unknown-linux-gnu # not supported by cross
3632
- powerpc64le-unknown-linux-gnu

.gitignore

-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
11
target/
22
Cargo.lock
3-
4-
#IntelliJ project files
5-
.idea
6-
*.iml
7-
8-
CMakeLists.txt
9-
cmake-build-debug

Cargo-minimal.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ dependencies = [
273273

274274
[[package]]
275275
name = "secp256k1-sys"
276-
version = "0.8.1"
276+
version = "0.9.0"
277277
dependencies = [
278278
"cc",
279279
"libc",

Cargo-recent.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ dependencies = [
194194

195195
[[package]]
196196
name = "secp256k1-sys"
197-
version = "0.8.1"
197+
version = "0.9.0"
198198
dependencies = [
199199
"cc",
200200
"libc",

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ global-context = ["std"]
3535
global-context-less-secure = ["global-context"]
3636

3737
[dependencies]
38-
secp256k1-sys = { version = "0.8.1", default-features = false, path = "./secp256k1-sys" }
38+
secp256k1-sys = { version = "0.9.0", default-features = false, path = "./secp256k1-sys" }
3939
serde = { version = "1.0.103", default-features = false, optional = true }
4040

4141
# You likely only want to enable these if you explicitly do not want to use "std", otherwise enable

contrib/_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
# Test if panic in C code aborts the process (either with a real panic or with SIGILL)
2424
cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 \
2525
| tee /dev/stderr \
26-
| grep "SIGILL\\|\[libsecp256k1] illegal argument. !rustsecp256k1_v0_._._fe_is_zero(&ge->x)"
26+
| grep "SIGILL\\|\[libsecp256k1] illegal argument. "
2727

2828
# Make all cargo invocations verbose
2929
export CARGO_TERM_VERBOSE=true

secp256k1-sys/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-sys"
3-
version = "0.8.1"
3+
version = "0.9.0"
44
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
55
"Andrew Poelstra <[email protected]>",
66
"Steven Roose <[email protected]>" ]
@@ -12,7 +12,7 @@ description = "FFI for Pieter Wuille's `libsecp256k1` library."
1212
keywords = [ "secp256k1", "libsecp256k1", "ffi" ]
1313
readme = "README.md"
1414
build = "build.rs"
15-
links = "rustsecp256k1_v0_8_1"
15+
links = "rustsecp256k1_v0_9_0"
1616
edition = "2018"
1717

1818
[package.metadata.docs.rs]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
10c10,12
2+
<
3+
---
4+
> extern int secp256k1_ecdsa_signature_parse_compact(
5+
> const secp256k1_context *ctx,
6+
> secp256k1_ecdsa_signature *sig, const unsigned char *input64);
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file was automatically created by vendor-libsecp.sh
2-
21ffe4b22a9683cf24ae0763359e401d1284cc7a
2+
199d27cea32203b224b208627533c2e813cd3b21

secp256k1-sys/depend/secp256k1.c.patch

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
139,149d138
1+
140,150d139
22
< secp256k1_context* secp256k1_context_create(unsigned int flags) {
33
< size_t const prealloc_size = secp256k1_context_preallocated_size(flags);
44
< secp256k1_context* ctx = (secp256k1_context*)checked_malloc(&default_error_callback, prealloc_size);
@@ -10,27 +10,34 @@
1010
< return ctx;
1111
< }
1212
<
13-
164,174d152
13+
162,174d150
1414
< secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) {
1515
< secp256k1_context* ret;
1616
< size_t prealloc_size;
1717
<
1818
< VERIFY_CHECK(ctx != NULL);
19+
< ARG_CHECK(secp256k1_context_is_proper(ctx));
20+
<
1921
< prealloc_size = secp256k1_context_preallocated_clone_size(ctx);
2022
< ret = (secp256k1_context*)checked_malloc(&ctx->error_callback, prealloc_size);
2123
< ret = secp256k1_context_preallocated_clone(ctx, ret);
2224
< return ret;
2325
< }
2426
<
25-
183,189d160
27+
186,197d161
2628
< void secp256k1_context_destroy(secp256k1_context* ctx) {
27-
< if (ctx != NULL) {
28-
< secp256k1_context_preallocated_destroy(ctx);
29-
< free(ctx);
29+
< ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
30+
<
31+
< /* Defined as noop */
32+
< if (ctx == NULL) {
33+
< return;
3034
< }
35+
<
36+
< secp256k1_context_preallocated_destroy(ctx);
37+
< free(ctx);
3138
< }
3239
<
33-
206,215d176
40+
220,229d183
3441
< }
3542
<
3643
< secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) {
+27-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1-
226,228d225
2-
< SECP256K1_API secp256k1_context* secp256k1_context_create(
1+
236d235
2+
< SECP256K1_API const secp256k1_context *secp256k1_context_static;
3+
239,240d237
4+
< SECP256K1_API const secp256k1_context *secp256k1_context_no_precomp
5+
< SECP256K1_DEPRECATED("Use secp256k1_context_static instead");
6+
286,289d282
7+
< SECP256K1_API secp256k1_context *secp256k1_context_create(
38
< unsigned int flags
49
< ) SECP256K1_WARN_UNUSED_RESULT;
5-
231,233d227
6-
< SECP256K1_API secp256k1_context* secp256k1_context_clone(
7-
< const secp256k1_context* ctx
10+
<
11+
302,305d294
12+
< SECP256K1_API secp256k1_context *secp256k1_context_clone(
13+
< const secp256k1_context *ctx
814
< ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
9-
248,250d241
15+
<
16+
320,323d308
1017
< SECP256K1_API void secp256k1_context_destroy(
11-
< secp256k1_context* ctx
18+
< secp256k1_context *ctx
1219
< ) SECP256K1_ARG_NONNULL(1);
13-
327,330d317
14-
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create(
15-
< const secp256k1_context* ctx,
20+
<
21+
402,406d386
22+
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space *secp256k1_scratch_space_create(
23+
< const secp256k1_context *ctx,
1624
< size_t size
1725
< ) SECP256K1_ARG_NONNULL(1);
18-
338,341d324
26+
<
27+
413,417d392
1928
< SECP256K1_API void secp256k1_scratch_space_destroy(
20-
< const secp256k1_context* ctx,
21-
< secp256k1_scratch_space* scratch
29+
< const secp256k1_context *ctx,
30+
< secp256k1_scratch_space *scratch
2231
< ) SECP256K1_ARG_NONNULL(1);
32+
<
33+
636d610
34+
< SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_rfc6979;
35+
639d612
36+
< SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_default;

0 commit comments

Comments
 (0)