Skip to content

Commit 2bba8f9

Browse files
committed
secp256k1-sys: Vendor latest secp256k1
Vendor the latest secp256k1 `v0.4.1`. Bump the version number of `secp256k1-sys` to `v0.10.0` and run the vendor script. Also depend on the new version in `rust-secp256k1`, and add a changelog entry.
1 parent a05078f commit 2bba8f9

File tree

132 files changed

+8089
-8160
lines changed

Some content is hidden

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

132 files changed

+8089
-8160
lines changed

Cargo-minimal.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ dependencies = [
273273

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

Cargo-recent.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ dependencies = [
194194

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ global-context = ["std"]
3636
global-context-less-secure = ["global-context"]
3737

3838
[dependencies]
39-
secp256k1-sys = { version = "0.9.2", default-features = false, path = "./secp256k1-sys" }
39+
secp256k1-sys = { version = "0.10.0", default-features = false, path = "./secp256k1-sys" }
4040
serde = { version = "1.0.103", default-features = false, optional = true }
4141

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

secp256k1-sys/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# Unreleased
1+
# 0.10.0 - 2024-03-28
22

3-
* Bump MSRV to Rust `v1.56.1`
3+
* Bump MSRV to Rust `v1.56.1` [#693](https://github.com/rust-bitcoin/rust-secp256k1/pull/693)
4+
* Vendor `secp256k1 v0.4.1` [#688](https://github.com/rust-bitcoin/rust-secp256k1/pull/688)
45

56
# 0.9.2 - 2023-12-18
67

secp256k1-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-sys"
3-
version = "0.9.2"
3+
version = "0.10.0"
44
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
55
"Andrew Poelstra <apoelstra@wpsoftware.net>",
66
"Steven Roose <steven@stevenroose.org>" ]
@@ -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_9_2"
15+
links = "rustsecp256k1_v0_10_0"
1616
edition = "2021"
1717
rust-version = "1.56.1"
1818

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file was automatically created by vendor-libsecp.sh
2-
199d27cea32203b224b208627533c2e813cd3b21
2+
1ad5185cd42c0636104129fcc9f6a4bf9c67cc40
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
env:
2+
### cirrus config
3+
CIRRUS_CLONE_DEPTH: 1
4+
### compiler options
5+
HOST:
6+
WRAPPER_CMD:
7+
# Specific warnings can be disabled with -Wno-error=foo.
8+
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
9+
WERROR_CFLAGS: -Werror -pedantic-errors
10+
MAKEFLAGS: -j4
11+
BUILD: check
12+
### secp256k1 config
13+
ECMULTWINDOW: auto
14+
ECMULTGENPRECISION: auto
15+
ASM: no
16+
WIDEMUL: auto
17+
WITH_VALGRIND: yes
18+
EXTRAFLAGS:
19+
### secp256k1 modules
20+
EXPERIMENTAL: no
21+
ECDH: no
22+
RECOVERY: no
23+
SCHNORRSIG: no
24+
ELLSWIFT: no
25+
### test options
26+
SECP256K1_TEST_ITERS:
27+
BENCH: yes
28+
SECP256K1_BENCH_ITERS: 2
29+
CTIMETESTS: yes
30+
# Compile and run the tests
31+
EXAMPLES: yes
32+
33+
cat_logs_snippet: &CAT_LOGS
34+
always:
35+
cat_tests_log_script:
36+
- cat tests.log || true
37+
cat_noverify_tests_log_script:
38+
- cat noverify_tests.log || true
39+
cat_exhaustive_tests_log_script:
40+
- cat exhaustive_tests.log || true
41+
cat_ctime_tests_log_script:
42+
- cat ctime_tests.log || true
43+
cat_bench_log_script:
44+
- cat bench.log || true
45+
cat_config_log_script:
46+
- cat config.log || true
47+
cat_test_env_script:
48+
- cat test_env.log || true
49+
cat_ci_env_script:
50+
- env
51+
52+
linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER
53+
env_script:
54+
- env | tee /tmp/env
55+
build_script:
56+
- DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm"
57+
- docker image prune --force # Cleanup stale layers
58+
test_script:
59+
- docker run --rm --mount "type=bind,src=./,dst=/ci_secp256k1" --env-file /tmp/env --replace --name "ci_secp256k1_arm" "ci_secp256k1_arm" bash -c "cd /ci_secp256k1/ && ./ci/ci.sh"
60+
61+
task:
62+
name: "ARM64: Linux (Debian stable)"
63+
persistent_worker:
64+
labels:
65+
type: arm64
66+
env:
67+
ECDH: yes
68+
RECOVERY: yes
69+
SCHNORRSIG: yes
70+
ELLSWIFT: yes
71+
matrix:
72+
# Currently only gcc-snapshot, the other compilers are tested on GHA with QEMU
73+
- env: { CC: 'gcc-snapshot' }
74+
<< : *LINUX_ARM64_CONTAINER
75+
<< : *CAT_LOGS
76+
77+
task:
78+
name: "ARM64: Linux (Debian stable), Valgrind"
79+
persistent_worker:
80+
labels:
81+
type: arm64
82+
env:
83+
ECDH: yes
84+
RECOVERY: yes
85+
SCHNORRSIG: yes
86+
ELLSWIFT: yes
87+
WRAPPER_CMD: 'valgrind --error-exitcode=42'
88+
SECP256K1_TEST_ITERS: 2
89+
matrix:
90+
- env: { CC: 'gcc' }
91+
- env: { CC: 'clang' }
92+
- env: { CC: 'gcc-snapshot' }
93+
- env: { CC: 'clang-snapshot' }
94+
<< : *LINUX_ARM64_CONTAINER
95+
<< : *CAT_LOGS

secp256k1-sys/depend/secp256k1/.github/actions/run-in-docker-action/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ inputs:
1414
runs:
1515
using: "composite"
1616
steps:
17-
- uses: docker/setup-buildx-action@v2
17+
- uses: docker/setup-buildx-action@v3
1818

19-
- uses: docker/build-push-action@v4
19+
- uses: docker/build-push-action@v5
2020
id: main_builder
2121
continue-on-error: true
2222
with:
@@ -26,7 +26,7 @@ runs:
2626
load: true
2727
cache-from: type=gha
2828

29-
- uses: docker/build-push-action@v4
29+
- uses: docker/build-push-action@v5
3030
id: retry_builder
3131
if: steps.main_builder.outcome == 'failure'
3232
with:

secp256k1-sys/depend/secp256k1/.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ jobs:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@v2
50+
uses: docker/setup-buildx-action@v3
5151
with:
5252
# See: https://github.com/moby/buildkit/issues/3969.
5353
driver-opts: |
5454
network=host
5555
5656
- name: Build container
57-
uses: docker/build-push-action@v4
57+
uses: docker/build-push-action@v5
5858
with:
5959
file: ./ci/linux-debian.Dockerfile
6060
tags: linux-debian-image
@@ -792,7 +792,7 @@ jobs:
792792

793793
- name: Check installation with Autotools
794794
env:
795-
CI_INSTALL: ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}
795+
CI_INSTALL: ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}/install
796796
run: |
797797
./autogen.sh && ./configure --prefix=${{ env.CI_INSTALL }} && make clean && make install && ls -RlAh ${{ env.CI_INSTALL }}
798798
gcc -o ecdsa examples/ecdsa.c $(PKG_CONFIG_PATH=${{ env.CI_INSTALL }}/lib/pkgconfig pkg-config --cflags --libs libsecp256k1) -Wl,-rpath,"${{ env.CI_INSTALL }}/lib" && ./ecdsa

secp256k1-sys/depend/secp256k1/CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.4.1] - 2023-12-21
9+
10+
#### Changed
11+
- The point multiplication algorithm used for ECDH operations (module `ecdh`) was replaced with a slightly faster one.
12+
- Optional handwritten x86_64 assembly for field operations was removed because modern C compilers are able to output more efficient assembly. This change results in a significant speedup of some library functions when handwritten x86_64 assembly is enabled (`--with-asm=x86_64` in GNU Autotools, `-DSECP256K1_ASM=x86_64` in CMake), which is the default on x86_64. Benchmarks with GCC 10.5.0 show a 10% speedup for `secp256k1_ecdsa_verify` and `secp256k1_schnorrsig_verify`.
13+
14+
#### ABI Compatibility
15+
The ABI is backward compatible with versions 0.4.0 and 0.3.x.
16+
817
## [0.4.0] - 2023-09-04
918

1019
#### Added
@@ -104,7 +113,7 @@ This version was in fact never released.
104113
The number was given by the build system since the introduction of autotools in Jan 2014 (ea0fe5a5bf0c04f9cc955b2966b614f5f378c6f6).
105114
Therefore, this version number does not uniquely identify a set of source files.
106115

107-
[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.4.0...HEAD
116+
[0.4.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.4.0...v0.4.1
108117
[0.4.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.2...v0.4.0
109118
[0.3.2]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.1...v0.3.2
110119
[0.3.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.0...v0.3.1

0 commit comments

Comments
 (0)