From 37dd422b5cecad54db40a7304f03bff552d8d9fb Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 11 Jun 2025 01:01:34 +0100 Subject: [PATCH 01/21] cmake: Emulate Libtool's behavior on FreeBSD --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0e2a27b5..97b5b592 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,7 +43,7 @@ math(EXPR ${PROJECT_NAME}_soversion "${${PROJECT_NAME}_LIB_VERSION_CURRENT} - ${ set_target_properties(secp256k1 PROPERTIES SOVERSION ${${PROJECT_NAME}_soversion} ) -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$") set_target_properties(secp256k1 PROPERTIES VERSION ${${PROJECT_NAME}_soversion}.${${PROJECT_NAME}_LIB_VERSION_AGE}.${${PROJECT_NAME}_LIB_VERSION_REVISION} ) From b77aae9226b95d65da53dad3d418229adc25311a Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 19 Jun 2025 18:57:48 +0100 Subject: [PATCH 02/21] ci: Rename Docker image tag to reflect architecture --- .github/workflows/ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3108d6b..007e8ff9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: uses: docker/build-push-action@v5 with: file: ./ci/linux-debian.Dockerfile - tags: linux-debian-image + tags: x64-debian-image cache-from: type=gha cache-to: type=gha,mode=min @@ -106,7 +106,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -142,7 +142,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -174,7 +174,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -215,7 +215,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -258,7 +258,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -290,7 +290,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -333,7 +333,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -377,7 +377,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -428,7 +428,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -471,7 +471,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -678,7 +678,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image - name: Print logs uses: ./.github/actions/print-logs @@ -697,7 +697,7 @@ jobs: uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: linux-debian-image + tag: x64-debian-image command: | g++ -Werror include/*.h clang -Werror -x c++-header include/*.h From bcf77346b9d5b5084ff158c4d84f719da690d33c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 19 Jun 2025 19:09:18 +0100 Subject: [PATCH 03/21] ci: Add `arm64` architecture to `docker_cache` job --- .github/workflows/ci.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 007e8ff9..459875d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,18 @@ env: jobs: docker_cache: - name: "Build Docker image" - runs-on: ubuntu-latest + name: "Build ${{ matrix.arch }} Docker image" + runs-on: ${{ matrix.runner }} + + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + runner: ubuntu-latest + - arch: arm64 + runner: ubuntu-24.04-arm + steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -60,7 +70,7 @@ jobs: uses: docker/build-push-action@v5 with: file: ./ci/linux-debian.Dockerfile - tags: x64-debian-image + tags: ${{ matrix.arch }}-debian-image cache-from: type=gha cache-to: type=gha,mode=min From e814b79a8b7587b39432048a170e005c9efaa1cc Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 19 Jun 2025 20:08:32 +0100 Subject: [PATCH 04/21] ci: Switch `arm64_debian` from QEMU to native `arm64` Docker image --- .github/workflows/ci.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 459875d2..448475e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=min - linux_debian: + x86_64-debian: name: "x86_64: Linux (Debian stable)" runs-on: ubuntu-latest needs: docker_cache @@ -231,15 +231,13 @@ jobs: uses: ./.github/actions/print-logs if: ${{ !cancelled() }} - arm64_debian: - name: "ARM64: Linux (Debian stable, QEMU)" - runs-on: ubuntu-latest + arm64-debian: + name: "arm64: Linux (Debian stable)" + runs-on: ubuntu-24.04-arm needs: docker_cache env: - WRAPPER_CMD: 'qemu-aarch64' SECP256K1_TEST_ITERS: 16 - HOST: 'aarch64-linux-gnu' WITH_VALGRIND: 'no' ECDH: 'yes' RECOVERY: 'yes' @@ -248,27 +246,25 @@ jobs: MUSIG: 'yes' ELLSWIFT: 'yes' CTIMETESTS: 'no' + CC: ${{ matrix.cc }} strategy: fail-fast: false matrix: - configuration: - - env_vars: { } # gcc - - env_vars: # clang - CC: 'clang --target=aarch64-linux-gnu' - - env_vars: # clang-snapshot - CC: 'clang-snapshot --target=aarch64-linux-gnu' + cc: + - 'gcc' + - 'clang' + - 'clang-snapshot' steps: - name: Checkout uses: actions/checkout@v4 - name: CI script - env: ${{ matrix.configuration.env_vars }} uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: x64-debian-image + tag: arm64-debian-image - name: Print logs uses: ./.github/actions/print-logs From 5fafdfc30f3ed113d8037aa2e9ee12134e77df33 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 19 Jun 2025 20:09:01 +0100 Subject: [PATCH 05/21] ci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA --- .cirrus.yml | 18 ------------------ .github/workflows/ci.yml | 1 + 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 023cd191..b3a5cecb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -63,24 +63,6 @@ linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER test_script: - 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" -task: - name: "ARM64: Linux (Debian stable)" - persistent_worker: - labels: - type: arm64 - env: - ECDH: yes - RECOVERY: yes - EXTRAKEYS: yes - SCHNORRSIG: yes - MUSIG: yes - ELLSWIFT: yes - matrix: - # Currently only gcc-snapshot, the other compilers are tested on GHA with QEMU - - env: { CC: 'gcc-snapshot' } - << : *LINUX_ARM64_CONTAINER - << : *CAT_LOGS - task: name: "ARM64: Linux (Debian stable), Valgrind" persistent_worker: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 448475e7..d1e3096e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -254,6 +254,7 @@ jobs: cc: - 'gcc' - 'clang' + - 'gcc-snapshot' - 'clang-snapshot' steps: From 004f57fcd86de3ea8cb0e6a16f5bb665db9d1ed4 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 19 Jun 2025 20:09:36 +0100 Subject: [PATCH 06/21] ci: Move Valgrind build for `arm64` from Cirrus to GHA --- .cirrus.yml | 86 ---------------------------------------- .github/workflows/ci.yml | 38 +++++++++++++----- 2 files changed, 29 insertions(+), 95 deletions(-) delete mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index b3a5cecb..00000000 --- a/.cirrus.yml +++ /dev/null @@ -1,86 +0,0 @@ -env: - ### cirrus config - CIRRUS_CLONE_DEPTH: 1 - ### compiler options - HOST: - WRAPPER_CMD: - # Specific warnings can be disabled with -Wno-error=foo. - # -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual. - WERROR_CFLAGS: -Werror -pedantic-errors - MAKEFLAGS: -j4 - BUILD: check - ### secp256k1 config - ECMULTWINDOW: 15 - ECMULTGENKB: 22 - ASM: no - WIDEMUL: auto - WITH_VALGRIND: yes - EXTRAFLAGS: - ### secp256k1 modules - EXPERIMENTAL: no - ECDH: no - RECOVERY: no - EXTRAKEYS: no - SCHNORRSIG: no - MUSIG: no - ELLSWIFT: no - ### test options - SECP256K1_TEST_ITERS: 64 - BENCH: yes - SECP256K1_BENCH_ITERS: 2 - CTIMETESTS: yes - SYMBOL_CHECK: yes - VIRTUAL_ENV: /root/venv - # Compile and run the tests - EXAMPLES: yes - -cat_logs_snippet: &CAT_LOGS - always: - cat_tests_log_script: - - cat tests.log || true - cat_noverify_tests_log_script: - - cat noverify_tests.log || true - cat_exhaustive_tests_log_script: - - cat exhaustive_tests.log || true - cat_ctime_tests_log_script: - - cat ctime_tests.log || true - cat_bench_log_script: - - cat bench.log || true - cat_config_log_script: - - cat config.log || true - cat_test_env_script: - - cat test_env.log || true - cat_ci_env_script: - - env - -linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER - env_script: - - export PATH="$VIRTUAL_ENV/bin:$PATH" - - env | tee /tmp/env - build_script: - - DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm" - - docker image prune --force # Cleanup stale layers - test_script: - - 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" - -task: - name: "ARM64: Linux (Debian stable), Valgrind" - persistent_worker: - labels: - type: arm64 - env: - ECDH: yes - RECOVERY: yes - EXTRAKEYS: yes - SCHNORRSIG: yes - MUSIG: yes - ELLSWIFT: yes - WRAPPER_CMD: 'valgrind --error-exitcode=42' - SECP256K1_TEST_ITERS: 2 - matrix: - - env: { CC: 'gcc' } - - env: { CC: 'clang' } - - env: { CC: 'gcc-snapshot' } - - env: { CC: 'clang-snapshot' } - << : *LINUX_ARM64_CONTAINER - << : *CAT_LOGS diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1e3096e..69c7fdf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -305,18 +305,38 @@ jobs: valgrind_debian: - name: "Valgrind (memcheck)" - runs-on: ubuntu-latest + name: "Valgrind ${{ matrix.binary_arch }} (memcheck)" + runs-on: ${{ matrix.runner }} needs: docker_cache strategy: fail-fast: false matrix: - configuration: - - env_vars: { CC: 'clang', ASM: 'auto' } - - env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' } - - env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 } - - env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 } + include: + - docker_arch: x64 + runner: ubuntu-latest + binary_arch: x64 + env_vars: { CC: 'clang', ASM: 'auto' } + - docker_arch: x64 + runner: ubuntu-latest + binary_arch: i686 + env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' } + - docker_arch: arm64 + runner: ubuntu-24.04-arm + binary_arch: arm64 + env_vars: { CC: 'clang', ASM: 'auto' } + - docker_arch: x64 + runner: ubuntu-latest + binary_arch: x64 + env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 } + - docker_arch: x64 + runner: ubuntu-latest + binary_arch: i686 + env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 } + - docker_arch: arm64 + runner: ubuntu-24.04-arm + binary_arch: arm64 + env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 } env: # The `--error-exitcode` is required to make the test fail if valgrind found errors, @@ -336,11 +356,11 @@ jobs: uses: actions/checkout@v4 - name: CI script - env: ${{ matrix.configuration.env_vars }} + env: ${{ matrix.env_vars }} uses: ./.github/actions/run-in-docker-action with: dockerfile: ./ci/linux-debian.Dockerfile - tag: x64-debian-image + tag: ${{ matrix.docker_arch }}-debian-image - name: Print logs uses: ./.github/actions/print-logs From 7106dce6fd410043fc297139c6307cb6016d2a7b Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 27 Jun 2025 18:59:02 +0200 Subject: [PATCH 07/21] cmake: configure libsecp256k1.pc during install When installing to a given prefix, make sure that the .pc file contains that prefix rather than the value of CMAKE_INSTALL_PREFIX that the project was configured with. --- cmake/GeneratePkgConfigFile.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/GeneratePkgConfigFile.cmake b/cmake/GeneratePkgConfigFile.cmake index 9c1d7f1d..ff335957 100644 --- a/cmake/GeneratePkgConfigFile.cmake +++ b/cmake/GeneratePkgConfigFile.cmake @@ -1,8 +1,12 @@ function(generate_pkg_config_file in_file) - set(prefix ${CMAKE_INSTALL_PREFIX}) + set(prefix "@CMAKE_INSTALL_PREFIX@") set(exec_prefix \${prefix}) set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) set(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) set(PACKAGE_VERSION ${PROJECT_VERSION}) - configure_file(${in_file} ${PROJECT_NAME}.pc @ONLY) + configure_file(${in_file} ${PROJECT_NAME}.pc.in @ONLY) + install(CODE "configure_file( + \"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc.in\" + \"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc\" + @ONLY)" ALL_COMPONENTS) endfunction() From 0dfe387dbe345d92d12b3de5c41a685fb6654211 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Thu, 19 Jun 2025 10:02:23 +0200 Subject: [PATCH 08/21] cmake: support the use of launchers in ctest -S scripts --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02abaa97..26cc49b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ project(libsecp256k1 LANGUAGES C ) enable_testing() +include(CTestUseLaunchers) # Allow users to set CTEST_USE_LAUNCHERS in custom `ctest -S` scripts. list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # The library version is based on libtool versioning of the ABI. The set of From 44b205e9eeac216a1cd15a910709606aca633947 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Mon, 30 Jun 2025 16:49:14 +0200 Subject: [PATCH 09/21] Revert "cmake: configure libsecp256k1.pc during install" This reverts commit 7106dce6fd410043fc297139c6307cb6016d2a7b. This causes a regression for packaging, as the generated `.pc` file will contain the location that was used to build the package archive. --- cmake/GeneratePkgConfigFile.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmake/GeneratePkgConfigFile.cmake b/cmake/GeneratePkgConfigFile.cmake index ff335957..9c1d7f1d 100644 --- a/cmake/GeneratePkgConfigFile.cmake +++ b/cmake/GeneratePkgConfigFile.cmake @@ -1,12 +1,8 @@ function(generate_pkg_config_file in_file) - set(prefix "@CMAKE_INSTALL_PREFIX@") + set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix \${prefix}) set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) set(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) set(PACKAGE_VERSION ${PROJECT_VERSION}) - configure_file(${in_file} ${PROJECT_NAME}.pc.in @ONLY) - install(CODE "configure_file( - \"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc.in\" - \"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc\" - @ONLY)" ALL_COMPONENTS) + configure_file(${in_file} ${PROJECT_NAME}.pc @ONLY) endfunction() From 3352f9d667afd92e553d79604c7e884121e18aa5 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Thu, 10 Jul 2025 17:46:51 +0200 Subject: [PATCH 10/21] ci: enable musig module for native macOS arm64 job --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69c7fdf6..805281c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -573,13 +573,13 @@ jobs: fail-fast: false matrix: env_vars: - - { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' } + - { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes' } - { WIDEMUL: 'int128_struct', ECMULTGENPRECISION: 2, ECMULTWINDOW: 4 } - - { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' } + - { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes' } - { WIDEMUL: 'int128', RECOVERY: 'yes' } - - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' } - - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' } - - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY' } + - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes' } + - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' } + - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY' } - BUILD: 'distcheck' steps: From e5297f6d79b4fb91c8dae27e26958155811c33a9 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Wed, 2 Jul 2025 11:43:32 +0200 Subject: [PATCH 11/21] build: Refactor visibility logic --- include/secp256k1.h | 71 ++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/include/secp256k1.h b/include/secp256k1.h index 1d25a02a..d67d9642 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -121,45 +121,38 @@ typedef int (*secp256k1_nonce_function)( #endif /* Symbol visibility. */ -#if defined(_WIN32) - /* GCC for Windows (e.g., MinGW) accepts the __declspec syntax - * for MSVC compatibility. A __declspec declaration implies (but is not - * exactly equivalent to) __attribute__ ((visibility("default"))), and so we - * actually want __declspec even on GCC, see "Microsoft Windows Function - * Attributes" in the GCC manual and the recommendations in - * https://gcc.gnu.org/wiki/Visibility. */ -# if defined(SECP256K1_BUILD) -# if defined(DLL_EXPORT) || defined(SECP256K1_DLL_EXPORT) - /* Building libsecp256k1 as a DLL. - * 1. If using Libtool, it defines DLL_EXPORT automatically. - * 2. In other cases, SECP256K1_DLL_EXPORT must be defined. */ -# define SECP256K1_API extern __declspec (dllexport) -# else - /* Building libsecp256k1 as a static library on Windows. - * No declspec is needed, and so we would want the non-Windows-specific - * logic below take care of this case. However, this may result in setting - * __attribute__ ((visibility("default"))), which is supposed to be a noop - * on Windows but may trigger warnings when compiling with -flto due to a - * bug in GCC, see - * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116478 . */ -# define SECP256K1_API extern -# endif - /* The user must define SECP256K1_STATIC when consuming libsecp256k1 as a static - * library on Windows. */ -# elif !defined(SECP256K1_STATIC) - /* Consuming libsecp256k1 as a DLL. */ -# define SECP256K1_API extern __declspec (dllimport) -# endif -#endif -#ifndef SECP256K1_API -/* All cases not captured by the Windows-specific logic. */ -# if defined(__GNUC__) && (__GNUC__ >= 4) && defined(SECP256K1_BUILD) - /* Building libsecp256k1 using GCC or compatible. */ -# define SECP256K1_API extern __attribute__ ((visibility ("default"))) -# else - /* Fall back to standard C's extern. */ -# define SECP256K1_API extern -# endif +#if !defined(SECP256K1_API) +# if defined(SECP256K1_BUILD) + /* On Windows, assume a shared library only if explicitly requested. + * 1. If using Libtool, it defines DLL_EXPORT automatically. + * 2. In other cases, SECP256K1_DLL_EXPORT must be defined. */ +# if defined(_WIN32) && (defined(SECP256K1_DLL_EXPORT) || defined(DLL_EXPORT)) + /* GCC for Windows (e.g., MinGW) accepts the __declspec syntax for + * MSVC compatibility. A __declspec declaration implies (but is not + * exactly equivalent to) __attribute__ ((visibility("default"))), + * and so we actually want __declspec even on GCC, see "Microsoft + * Windows Function Attributes" in the GCC manual and the + * recommendations in https://gcc.gnu.org/wiki/Visibility . */ +# define SECP256K1_API extern __declspec(dllexport) + /* Avoid __attribute__ ((visibility("default"))) on Windows to get rid + * of warnings when compiling with -flto due to a bug in GCC, see + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116478 . */ +# elif !defined(_WIN32) && defined (__GNUC__) && (__GNUC__ >= 4) +# define SECP256K1_API extern __attribute__ ((visibility("default"))) +# else +# define SECP256K1_API extern +# endif +# else + /* On Windows, SECP256K1_STATIC must be defined when consuming + * libsecp256k1 as a static library. Note that SECP256K1_STATIC is a + * "consumer-only" macro, and it has no meaning when building + * libsecp256k1. */ +# if defined(_WIN32) && !defined(SECP256K1_STATIC) +# define SECP256K1_API extern __declspec(dllimport) +# else +# define SECP256K1_API extern +# endif +# endif #endif /* Warning attributes From ce7923874f3f51dd87f396e0be655e2b25ad4629 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Wed, 2 Jul 2025 11:56:40 +0200 Subject: [PATCH 12/21] build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES --- include/secp256k1.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/secp256k1.h b/include/secp256k1.h index d67d9642..f55a6ab9 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -121,6 +121,25 @@ typedef int (*secp256k1_nonce_function)( #endif /* Symbol visibility. */ +#if !defined(SECP256K1_API) && defined(SECP256K1_NO_API_VISIBILITY_ATTRIBUTES) + /* The user has requested that we don't specify visibility attributes in + * the public API. + * + * Since all our non-API declarations use the static qualifier, this means + * that the user can use -fvisibility= to set the visibility of the + * API symbols. For instance, -fvisibility=hidden can be useful *even for + * the API symbols*, e.g., when building a static library which is linked + * into a shared library, and the latter should not re-export the + * libsecp256k1 API. + * + * While visibility is a concept that applies only to shared libraries, + * setting visibility will still make a difference when building a static + * library: the visibility settings will be stored in the static library, + * solely for the potential case that the static library will be linked into + * a shared library. In that case, the stored visibility settings will + * resurface and be honored for the shared library. */ +# define SECP256K1_API extern +#endif #if !defined(SECP256K1_API) # if defined(SECP256K1_BUILD) /* On Windows, assume a shared library only if explicitly requested. From c82d84bb86f9769a4f9d958f40e86cd99e071bc7 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 2 Jul 2025 15:18:06 +0000 Subject: [PATCH 13/21] build: add CMake option for disabling symbol visibility attributes Co-authored-by: Tim Ruffing --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26cc49b1..98c51ac1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,8 @@ endif() option(SECP256K1_INSTALL "Enable installation." ${PROJECT_IS_TOP_LEVEL}) +option(SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES "Enable visibility attributes in the API." ON) + ## Modules # We declare all options before processing them, to make sure we can express @@ -312,6 +314,7 @@ else() set(cross_status "FALSE") endif() message("Cross compiling ....................... ${cross_status}") +message("API visibility attributes ............. ${SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES}") message("Valgrind .............................. ${SECP256K1_VALGRIND}") get_directory_property(definitions COMPILE_DEFINITIONS) string(REPLACE ";" " " definitions "${definitions}") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f1d2ee3..f9ede8b6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,10 @@ add_library(secp256k1_precomputed OBJECT EXCLUDE_FROM_ALL # from being exported. target_sources(secp256k1 PRIVATE secp256k1.c $) +if(NOT SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES) + target_compile_definitions(secp256k1 PRIVATE SECP256K1_NO_API_VISIBILITY_ATTRIBUTES) +endif() + # Create a helper lib that parent projects can use to link secp256k1 into a # static lib. add_library(secp256k1_objs INTERFACE) From bf082221ff55be706e162f1a15e9df3247ef7e7b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:37:09 +0100 Subject: [PATCH 14/21] cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` This change effectively adds `-DSECP256K1_STATIC` to usage requirements of `secp256k1_objs` on Windows, preventing LNK4217 linker warnings. --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f1d2ee3..7ec6045c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -86,7 +86,8 @@ target_include_directories(secp256k1 INTERFACE $>:${PROJECT_SOURCE_DIR}/include>> ) set_target_properties(secp256k1_objs PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "$" + INTERFACE_COMPILE_DEFINITIONS "$" + INTERFACE_INCLUDE_DIRECTORIES "$" ) # This emulates Libtool to make sure Libtool and CMake agree on the ABI version, From 983711cd6dcb21144d416321d679b25d2d641f7d Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Mon, 21 Jul 2025 14:44:57 +0200 Subject: [PATCH 15/21] musig/tests: Refactor vectors_signverify for improved readability --- src/modules/musig/tests_impl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/musig/tests_impl.h b/src/modules/musig/tests_impl.h index ce6ae178..e4c13cee 100644 --- a/src/modules/musig/tests_impl.h +++ b/src/modules/musig/tests_impl.h @@ -910,12 +910,14 @@ static void musig_test_vectors_signverify(void) { * the signing key does not belong to any pubkey. */ continue; } + expected = c->error != MUSIG_PUBKEY; CHECK(expected == musig_vectors_keyagg_and_tweak(&error, &keyagg_cache, NULL, vector->pubkeys, NULL, c->key_indices_len, c->key_indices, 0, NULL, NULL)); CHECK(expected || c->error == error); if (!expected) { continue; } + CHECK(secp256k1_ec_pubkey_parse(CTX, &pubkey, vector->pubkeys[0], sizeof(vector->pubkeys[0]))); expected = c->error != MUSIG_AGGNONCE; CHECK(expected == secp256k1_musig_aggnonce_parse(CTX, &aggnonce, vector->aggnonces[c->aggnonce_index])); @@ -924,9 +926,8 @@ static void musig_test_vectors_signverify(void) { } CHECK(secp256k1_musig_nonce_process(CTX, &session, &aggnonce, vector->msgs[c->msg_index], &keyagg_cache)); - CHECK(secp256k1_ec_pubkey_parse(CTX, &pubkey, vector->pubkeys[0], sizeof(vector->pubkeys[0]))); - musig_test_set_secnonce(&secnonce, vector->secnonces[c->secnonce_index], &pubkey); expected = c->error != MUSIG_SECNONCE; + musig_test_set_secnonce(&secnonce, vector->secnonces[c->secnonce_index], &pubkey); if (expected) { CHECK(secp256k1_musig_partial_sign(CTX, &partial_sig, &secnonce, &keypair, &keyagg_cache, &session)); } else { From 8d967a602b14c86d0f9e43a31fdfe76f39f32091 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Mon, 21 Jul 2025 14:47:57 +0200 Subject: [PATCH 16/21] musig/test: Remove dead code This avoids a compiler warning on clang-snapshot about &keypair being uninitialized. --- src/modules/musig/tests_impl.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/musig/tests_impl.h b/src/modules/musig/tests_impl.h index e4c13cee..361a989f 100644 --- a/src/modules/musig/tests_impl.h +++ b/src/modules/musig/tests_impl.h @@ -927,12 +927,9 @@ static void musig_test_vectors_signverify(void) { CHECK(secp256k1_musig_nonce_process(CTX, &session, &aggnonce, vector->msgs[c->msg_index], &keyagg_cache)); expected = c->error != MUSIG_SECNONCE; + CHECK(!expected); musig_test_set_secnonce(&secnonce, vector->secnonces[c->secnonce_index], &pubkey); - if (expected) { - CHECK(secp256k1_musig_partial_sign(CTX, &partial_sig, &secnonce, &keypair, &keyagg_cache, &session)); - } else { - CHECK_ILLEGAL(CTX, secp256k1_musig_partial_sign(CTX, &partial_sig, &secnonce, &keypair, &keyagg_cache, &session)); - } + CHECK_ILLEGAL(CTX, secp256k1_musig_partial_sign(CTX, &partial_sig, &secnonce, &keypair, &keyagg_cache, &session)); } for (i = 0; i < sizeof(vector->verify_fail_case)/sizeof(vector->verify_fail_case[0]); i++) { const struct musig_verify_fail_error_case *c = &vector->verify_fail_case[i]; From 40b4a0652078c797df3ceb66387b8cfe60e6dab8 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Wed, 16 Jul 2025 08:58:10 +0000 Subject: [PATCH 17/21] changelog: update Co-authored-by: Tim Ruffing --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12abd357..99925457 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +#### Added + - CMake: Added `secp256k1_objs` interface library to allow parent projects to embed libsecp256k1 object files into their own static libraries. + - build: Added `SECP256K1_NO_API_VISIBILITY_ATTRIBUTES` preprocessor flag (CMake option: `SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES`) that disables explicit "visibility" attributes for API symbols. Defining this macro enables the user to control the visibility of the API symbols via `-fvisibility=` when building libsecp256k1. (All non-API declarations will always have hidden visibility, even with `SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES` defined.) For instance, `-fvisibility=hidden` can be useful even for the API symbols, e.g., when building a static libsecp256k1 which is linked into a shared library, and the latter should not re-export the libsecp256k1 API. + +#### Changed + - The pointers `secp256k1_context_static` and `secp256k1_context_no_precomp` to the constant context object are now const. + - Removed `SECP256K1_WARN_UNUSED_RESULT` attribute (defined as `__attribute__ ((__warn_unused_result__))`) from several API functions that always return 1. Compilers will no longer warn if the return value is unused. + - CMake: Building with CMake is no longer considered experimental. + - CMake: The minimum required CMake version was increased to 3.22. + - CMake: Shared libraries built with CMake on FreeBSD now create the full versioned filename and symlink chain, matching the behavior of autotools builds. + #### Removed - Removed previously deprecated function aliases `secp256k1_ec_privkey_negate`, `secp256k1_ec_privkey_tweak_add` and `secp256k1_ec_privkey_tweak_mul`. Use `secp256k1_ec_seckey_negate`, `secp256k1_ec_seckey_tweak_add` and `secp256k1_ec_seckey_tweak_mul` instead. +#### ABI Compatibility +The symbols `secp256k1_ec_privkey_negate`, `secp256k1_ec_privkey_tweak_add`, and `secp256k1_ec_privkey_tweak_mul` were removed. +The pointers `secp256k1_context_static` and `secp256k1_context_no_precomp` have been made const. +Otherwise, the library maintains backward compatibility with version 0.6.0. + ## [0.6.0] - 2024-11-04 #### Added From cde4130898e9b661695b74e8a8344a7201e224ed Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 21 Jul 2025 14:08:23 +0000 Subject: [PATCH 18/21] musig/tests: initialize keypair The keypair is unused in musig_partial_sign, but clang-snapshot gives a compiler warning anyway. --- src/modules/musig/tests_impl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/musig/tests_impl.h b/src/modules/musig/tests_impl.h index 361a989f..4694c31a 100644 --- a/src/modules/musig/tests_impl.h +++ b/src/modules/musig/tests_impl.h @@ -918,6 +918,7 @@ static void musig_test_vectors_signverify(void) { continue; } CHECK(secp256k1_ec_pubkey_parse(CTX, &pubkey, vector->pubkeys[0], sizeof(vector->pubkeys[0]))); + CHECK(secp256k1_keypair_create(CTX, &keypair, vector->sk)); expected = c->error != MUSIG_AGGNONCE; CHECK(expected == secp256k1_musig_aggnonce_parse(CTX, &aggnonce, vector->aggnonces[c->aggnonce_index])); From f67b0ac1a0ac1b8fa5d574cd0662231f071435fc Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Mon, 21 Jul 2025 16:35:16 +0200 Subject: [PATCH 19/21] ci: Don't hardcode ABI version --- .github/workflows/ci.yml | 3 ++- ci/ci.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 805281c3..d5196c53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -652,10 +652,11 @@ jobs: - name: Symbol check if: ${{ matrix.configuration.symbol_check }} + shell: bash run: | py -3 --version py -3 -m pip install lief - py -3 .\tools\symbol-check.py build\bin\RelWithDebInfo\libsecp256k1-5.dll + py -3 ./tools/symbol-check.py build/bin/RelWithDebInfo/libsecp256k1-*.dll - name: Check run: | diff --git a/ci/ci.sh b/ci/ci.sh index 3285ecc9..08e84efd 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -113,7 +113,7 @@ then case "$HOST" in *mingw*) ls -l .libs - python3 ./tools/symbol-check.py .libs/libsecp256k1-5.dll + python3 ./tools/symbol-check.py .libs/libsecp256k1-*.dll ;; *) python3 ./tools/symbol-check.py .libs/libsecp256k1.so From a3e742d9478c202cbe93e721567e0f1dea1c8bde Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Mon, 21 Jul 2025 16:21:31 +0200 Subject: [PATCH 20/21] release: Prepare for 0.7.0 --- CHANGELOG.md | 8 ++++---- CMakeLists.txt | 6 +++--- configure.ac | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99925457..3e9e720c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [0.7.0] - 2025-07-21 #### Added - CMake: Added `secp256k1_objs` interface library to allow parent projects to embed libsecp256k1 object files into their own static libraries. - build: Added `SECP256K1_NO_API_VISIBILITY_ATTRIBUTES` preprocessor flag (CMake option: `SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES`) that disables explicit "visibility" attributes for API symbols. Defining this macro enables the user to control the visibility of the API symbols via `-fvisibility=` when building libsecp256k1. (All non-API declarations will always have hidden visibility, even with `SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES` defined.) For instance, `-fvisibility=hidden` can be useful even for the API symbols, e.g., when building a static libsecp256k1 which is linked into a shared library, and the latter should not re-export the libsecp256k1 API. #### Changed - - The pointers `secp256k1_context_static` and `secp256k1_context_no_precomp` to the constant context object are now const. + - The pointers `secp256k1_context_static` and `secp256k1_context_no_precomp` to the constant context objects are now `const`. - Removed `SECP256K1_WARN_UNUSED_RESULT` attribute (defined as `__attribute__ ((__warn_unused_result__))`) from several API functions that always return 1. Compilers will no longer warn if the return value is unused. - CMake: Building with CMake is no longer considered experimental. - CMake: The minimum required CMake version was increased to 3.22. @@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 #### ABI Compatibility The symbols `secp256k1_ec_privkey_negate`, `secp256k1_ec_privkey_tweak_add`, and `secp256k1_ec_privkey_tweak_mul` were removed. -The pointers `secp256k1_context_static` and `secp256k1_context_no_precomp` have been made const. +The pointers `secp256k1_context_static` and `secp256k1_context_no_precomp` have been made `const`. Otherwise, the library maintains backward compatibility with version 0.6.0. ## [0.6.0] - 2024-11-04 @@ -185,7 +185,7 @@ This version was in fact never released. The number was given by the build system since the introduction of autotools in Jan 2014 (ea0fe5a5bf0c04f9cc955b2966b614f5f378c6f6). Therefore, this version number does not uniquely identify a set of source files. -[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.6.0...HEAD +[0.7.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.6.0...v0.7.0 [0.6.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.5.1...v0.6.0 [0.5.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.4.1...v0.5.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 98c51ac1..a34f42d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(libsecp256k1 # The package (a.k.a. release) version is based on semantic versioning 2.0.0 of # the API. All changes in experimental modules are treated as # backwards-compatible and therefore at most increase the minor version. - VERSION 0.6.1 + VERSION 0.7.0 DESCRIPTION "Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1." HOMEPAGE_URL "https://github.com/bitcoin-core/secp256k1" LANGUAGES C @@ -21,8 +21,8 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # All changes in experimental modules are treated as if they don't affect the # interface and therefore only increase the revision. -set(${PROJECT_NAME}_LIB_VERSION_CURRENT 5) -set(${PROJECT_NAME}_LIB_VERSION_REVISION 1) +set(${PROJECT_NAME}_LIB_VERSION_CURRENT 6) +set(${PROJECT_NAME}_LIB_VERSION_REVISION 0) set(${PROJECT_NAME}_LIB_VERSION_AGE 0) #============================= diff --git a/configure.ac b/configure.ac index 406227fc..808aa79e 100644 --- a/configure.ac +++ b/configure.ac @@ -4,17 +4,17 @@ AC_PREREQ([2.60]) # the API. All changes in experimental modules are treated as # backwards-compatible and therefore at most increase the minor version. define(_PKG_VERSION_MAJOR, 0) -define(_PKG_VERSION_MINOR, 6) -define(_PKG_VERSION_PATCH, 1) -define(_PKG_VERSION_IS_RELEASE, false) +define(_PKG_VERSION_MINOR, 7) +define(_PKG_VERSION_PATCH, 0) +define(_PKG_VERSION_IS_RELEASE, true) # The library version is based on libtool versioning of the ABI. The set of # rules for updating the version can be found here: # https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # All changes in experimental modules are treated as if they don't affect the # interface and therefore only increase the revision. -define(_LIB_VERSION_CURRENT, 5) -define(_LIB_VERSION_REVISION, 1) +define(_LIB_VERSION_CURRENT, 6) +define(_LIB_VERSION_REVISION, 0) define(_LIB_VERSION_AGE, 0) AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_PATCH)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-dev]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1]) From 7ab8b0cc01dd30711a221969b194d3b7d870bc46 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 21 Jul 2025 17:55:16 +0000 Subject: [PATCH 21/21] release cleanup: bump version after 0.7.0 --- CHANGELOG.md | 3 +++ CMakeLists.txt | 4 ++-- configure.ac | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e9e720c..53c787b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [0.7.0] - 2025-07-21 #### Added @@ -185,6 +187,7 @@ This version was in fact never released. The number was given by the build system since the introduction of autotools in Jan 2014 (ea0fe5a5bf0c04f9cc955b2966b614f5f378c6f6). Therefore, this version number does not uniquely identify a set of source files. +[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.7.0...HEAD [0.7.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.6.0...v0.7.0 [0.6.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.5.1...v0.6.0 [0.5.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.5.0...v0.5.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index a34f42d2..25919fd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(libsecp256k1 # The package (a.k.a. release) version is based on semantic versioning 2.0.0 of # the API. All changes in experimental modules are treated as # backwards-compatible and therefore at most increase the minor version. - VERSION 0.7.0 + VERSION 0.7.1 DESCRIPTION "Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1." HOMEPAGE_URL "https://github.com/bitcoin-core/secp256k1" LANGUAGES C @@ -22,7 +22,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # All changes in experimental modules are treated as if they don't affect the # interface and therefore only increase the revision. set(${PROJECT_NAME}_LIB_VERSION_CURRENT 6) -set(${PROJECT_NAME}_LIB_VERSION_REVISION 0) +set(${PROJECT_NAME}_LIB_VERSION_REVISION 1) set(${PROJECT_NAME}_LIB_VERSION_AGE 0) #============================= diff --git a/configure.ac b/configure.ac index 808aa79e..ce24248f 100644 --- a/configure.ac +++ b/configure.ac @@ -5,8 +5,8 @@ AC_PREREQ([2.60]) # backwards-compatible and therefore at most increase the minor version. define(_PKG_VERSION_MAJOR, 0) define(_PKG_VERSION_MINOR, 7) -define(_PKG_VERSION_PATCH, 0) -define(_PKG_VERSION_IS_RELEASE, true) +define(_PKG_VERSION_PATCH, 1) +define(_PKG_VERSION_IS_RELEASE, false) # The library version is based on libtool versioning of the ABI. The set of # rules for updating the version can be found here: @@ -14,7 +14,7 @@ define(_PKG_VERSION_IS_RELEASE, true) # All changes in experimental modules are treated as if they don't affect the # interface and therefore only increase the revision. define(_LIB_VERSION_CURRENT, 6) -define(_LIB_VERSION_REVISION, 0) +define(_LIB_VERSION_REVISION, 1) define(_LIB_VERSION_AGE, 0) AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_PATCH)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-dev]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1])