Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vendored lib secp256k1 to v0.4.0 #653

Merged
merged 6 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ jobs:
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabihf
- mips-unknown-linux-gnu
- mips64-unknown-linux-gnuabi64
- mips64el-unknown-linux-gnuabi64
- mipsel-unknown-linux-gnu
- powerpc-unknown-linux-gnu
# - powerpc64-unknown-linux-gnu # not supported by cross
- powerpc64le-unknown-linux-gnu
Expand Down
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
target/
Cargo.lock

#IntelliJ project files
.idea
*.iml

CMakeLists.txt
cmake-build-debug
2 changes: 1 addition & 1 deletion Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ dependencies = [

[[package]]
name = "secp256k1-sys"
version = "0.8.1"
version = "0.9.0"
dependencies = [
"cc",
"libc",
Expand Down
2 changes: 1 addition & 1 deletion Cargo-recent.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is automatically @generated by Cargo.

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - beta toolchain

Dependencies could be updated

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - nightly toolchain

Dependencies could be updated

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - stable toolchain

Dependencies could be updated

Check warning on line 1 in Cargo-recent.lock

View workflow job for this annotation

GitHub Actions / Test - 1.48.0 toolchain

Dependencies could be updated
# It is not intended for manual editing.
version = 3

Expand Down Expand Up @@ -194,7 +194,7 @@

[[package]]
name = "secp256k1-sys"
version = "0.8.1"
version = "0.9.0"
dependencies = [
"cc",
"libc",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ global-context = ["std"]
global-context-less-secure = ["global-context"]

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

# You likely only want to enable these if you explicitly do not want to use "std", otherwise enable
Expand Down
2 changes: 1 addition & 1 deletion contrib/_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi
# Test if panic in C code aborts the process (either with a real panic or with SIGILL)
cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 \
| tee /dev/stderr \
| grep "SIGILL\\|\[libsecp256k1] illegal argument. !rustsecp256k1_v0_._._fe_is_zero(&ge->x)"
| grep "SIGILL\\|\[libsecp256k1] illegal argument. "

# Make all cargo invocations verbose
export CARGO_TERM_VERBOSE=true
Expand Down
4 changes: 2 additions & 2 deletions secp256k1-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "secp256k1-sys"
version = "0.8.1"
version = "0.9.0"
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
"Andrew Poelstra <[email protected]>",
"Steven Roose <[email protected]>" ]
Expand All @@ -12,7 +12,7 @@ description = "FFI for Pieter Wuille's `libsecp256k1` library."
keywords = [ "secp256k1", "libsecp256k1", "ffi" ]
readme = "README.md"
build = "build.rs"
links = "rustsecp256k1_v0_8_1"
links = "rustsecp256k1_v0_9_0"
edition = "2018"

[package.metadata.docs.rs]
Expand Down
6 changes: 6 additions & 0 deletions secp256k1-sys/depend/lax_der_parsing.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
10c10,12
<
---
> extern int secp256k1_ecdsa_signature_parse_compact(
> const secp256k1_context *ctx,
> secp256k1_ecdsa_signature *sig, const unsigned char *input64);
2 changes: 1 addition & 1 deletion secp256k1-sys/depend/secp256k1-HEAD-revision.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file was automatically created by vendor-libsecp.sh
21ffe4b22a9683cf24ae0763359e401d1284cc7a
199d27cea32203b224b208627533c2e813cd3b21
21 changes: 14 additions & 7 deletions secp256k1-sys/depend/secp256k1.c.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
139,149d138
140,150d139
< secp256k1_context* secp256k1_context_create(unsigned int flags) {
< size_t const prealloc_size = secp256k1_context_preallocated_size(flags);
< secp256k1_context* ctx = (secp256k1_context*)checked_malloc(&default_error_callback, prealloc_size);
Expand All @@ -10,27 +10,34 @@
< return ctx;
< }
<
164,174d152
162,174d150
< secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) {
< secp256k1_context* ret;
< size_t prealloc_size;
<
< VERIFY_CHECK(ctx != NULL);
< ARG_CHECK(secp256k1_context_is_proper(ctx));
<
< prealloc_size = secp256k1_context_preallocated_clone_size(ctx);
< ret = (secp256k1_context*)checked_malloc(&ctx->error_callback, prealloc_size);
< ret = secp256k1_context_preallocated_clone(ctx, ret);
< return ret;
< }
<
183,189d160
186,197d161
< void secp256k1_context_destroy(secp256k1_context* ctx) {
< if (ctx != NULL) {
< secp256k1_context_preallocated_destroy(ctx);
< free(ctx);
< ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
<
< /* Defined as noop */
< if (ctx == NULL) {
< return;
< }
<
< secp256k1_context_preallocated_destroy(ctx);
< free(ctx);
< }
<
206,215d176
220,229d183
< }
<
< secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) {
Expand Down
40 changes: 27 additions & 13 deletions secp256k1-sys/depend/secp256k1.h.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
226,228d225
< SECP256K1_API secp256k1_context* secp256k1_context_create(
236d235
< SECP256K1_API const secp256k1_context *secp256k1_context_static;
239,240d237
< SECP256K1_API const secp256k1_context *secp256k1_context_no_precomp
< SECP256K1_DEPRECATED("Use secp256k1_context_static instead");
286,289d282
< SECP256K1_API secp256k1_context *secp256k1_context_create(
< unsigned int flags
< ) SECP256K1_WARN_UNUSED_RESULT;
231,233d227
< SECP256K1_API secp256k1_context* secp256k1_context_clone(
< const secp256k1_context* ctx
<
302,305d294
< SECP256K1_API secp256k1_context *secp256k1_context_clone(
< const secp256k1_context *ctx
< ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
248,250d241
<
320,323d308
< SECP256K1_API void secp256k1_context_destroy(
< secp256k1_context* ctx
< secp256k1_context *ctx
< ) SECP256K1_ARG_NONNULL(1);
327,330d317
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create(
< const secp256k1_context* ctx,
<
402,406d386
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space *secp256k1_scratch_space_create(
< const secp256k1_context *ctx,
< size_t size
< ) SECP256K1_ARG_NONNULL(1);
338,341d324
<
413,417d392
< SECP256K1_API void secp256k1_scratch_space_destroy(
< const secp256k1_context* ctx,
< secp256k1_scratch_space* scratch
< const secp256k1_context *ctx,
< secp256k1_scratch_space *scratch
< ) SECP256K1_ARG_NONNULL(1);
<
636d610
< SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_rfc6979;
639d612
< SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_default;
Loading
Loading