2760 Commits

Author SHA1 Message Date
Pieter Wuille
355bbdf38a Add changelog entry for signed-digit ecmult_const algorithm 2023-11-04 15:55:12 -04:00
Pieter Wuille
21f49d9bec Remove unused secp256k1_scalar_shr_int 2023-11-04 15:55:12 -04:00
Pieter Wuille
115fdc7232 Remove unused secp256k1_wnaf_const 2023-11-04 15:55:12 -04:00
Jonas Nick
aa9f3a3c00 ecmult_const: add/improve tests
* add test case for a=infinity

  The corresponding ecmult_const branch was not tested before this commit.

* add test for edge cases
2023-11-04 15:55:12 -04:00
Pieter Wuille
4d16e90111 Signed-digit based ecmult_const algorithm 2023-11-04 15:55:12 -04:00
Pieter Wuille
ba523be067 make SECP256K1_SCALAR_CONST reduce modulo exhaustive group order 2023-11-04 15:54:08 -04:00
Pieter Wuille
2140da9cd5 Add secp256k1_scalar_half for halving scalars (+ tests/benchmarks).
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-11-04 15:54:08 -04:00
Jonas Nick
2192e9d051
Merge elementsproject/secp256k1-zkp#272: surjectionproof: remove unused include
fcc0299fa50c19438d13a34c9281c9ca437633f3 surjectionproof: remove unused include (Jon Griffiths)

Pull request description:

ACKs for top commit:
  delta1:
    ACK fcc0299fa50c19438d13a34c9281c9ca437633f3
  jonasnick:
    ACK fcc0299fa50c19438d13a34c9281c9ca437633f3

Tree-SHA512: dbd5dd982796b99871f2fbd3ab8404c6817bd4970d8775a83bd3a3fd916a683ff9da70c334a377870063eaa5c8cfb73481edfdd0bd7279fc7dc7f8b5368bb5aa
2023-10-31 07:38:41 +00:00
Jon Griffiths
fcc0299fa5
surjectionproof: remove unused include
Following the merge of b627ba7050b608e869515a8ef622d71bf8c13b54 from
upstream, this include should have been deleted as well.
2023-10-31 16:53:26 +13:00
Tim Ruffing
1f1bb78b7f
Merge bitcoin-core/secp256k1#1430: README: remove CI badge
5dab0baa80d763b1de599e64307c090d1a3fb04d README: remove CI badge (Jonas Nick)

Pull request description:

ACKs for top commit:
  sipa:
    utACK 5dab0baa80d763b1de599e64307c090d1a3fb04d
  real-or-random:
    utACK 5dab0baa80d763b1de599e64307c090d1a3fb04d

Tree-SHA512: 56730fa8067cc48b8e5af6fc21b0cd6c47f615c5ebba9edcf29ca5eaf7b2359662a9af219612e80688d8f8939649c7c3c26136c0442ba47d56251a0d92cf984a
2023-10-23 17:49:43 +02:00
Jonas Nick
5dab0baa80
README: remove CI badge
We're not solely using cirrus anymore and github already displays the CI status
at a different location.
2023-10-22 11:50:09 +00:00
Tim Ruffing
d575ef9aca
Merge ElementsProject/secp256k1-zkp#270: Upstream PRs 1391, 1290, 1389, 1397, 1399, 1400, 1348, 1402, 1274, 1394, 1404, 1062, 1401, 1373, 1403, 1398, 1405, 1396, 1406, 1410, 1409, 1411, 1412, 1414, 1413, 1415, 1417, 1390, 1416, 1422, 1424, 1395
b41caaafd2f7308f99245bc833158cdc5836c52d bppp: replace memcmp in tests with secp256k1_memcmp_var (Jonas Nick)
6a3aae8f1de9d693cfcaa583a558148e1aa3b0a3 group_parse: use secp256k1_memcmp_var instead of memcmp (Jonas Nick)
e9d522fc6443a81a613fbb89c72f790d181e8d77 ci: turn on -zkp modules in macos-native job (Jonas Nick)
c45b7c4fbbf41b011f138c465a58322a36664fd3 refactor: introduce testutil.h (deduplicate `random_fe_`, `ge_equals_` helpers) (Sebastian Falbesoner)
dc5514144fb9d412aa3845432b053ee06a27da37 tests: simplify `random_fe_non_zero` (remove loop limit and unneeded normalize) (Sebastian Falbesoner)
d9d80fd155cd1eb26c1334ceb0d4cecdef640085 ci: Bump major versions for docker actions (Hennadii Stepanov)
421d84855aeb9324b4f131c3e6c7ee8cf4f5f4e5 ci: Align Autotools/CMake `CI_INSTALL` directory names (Hennadii Stepanov)
9f005c60d6067d94279a3e3e81ec178bf4e2f227 cmake: Install `libsecp256k1.pc` file (Hennadii Stepanov)
b0f7bfedc9fcb4f49fe965b16ae49d0e36c1d32b doc: Do not mention soname in CHANGELOG.md "ABI Compatibility" section (Hennadii Stepanov)
bd9d98d353e169eadb9b2fdba074417407442230 doc: Align documented scripts with CI ones (Hennadii Stepanov)
70303643cf42d18acbf1c020480c6bb23072dbd9 tests: add CHECK_ERROR_VOID and use it in scratch tests (Jonas Nick)
f8d7ea68dfb1a3cad1fbec2242e9affdf803fbbe tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID (Jonas Nick)
a1d52e3e125bb46dac2cf6daa699e9f15167e8d4 tests: remove unnecessary test in run_ec_pubkey_parse_test (Jonas Nick)
875b0ada2526be92100034c4c7de045203de7e3f tests: remove unnecessary set_illegal_callback (Jonas Nick)
9b118bc7fb12203e9bf98eb23bfdd5746adde2b3 release cleanup: bump version after 0.4.0 (Jonas Nick)
16339804c906a99a0b9bbe192d3de9fde021ff19 release: Prepare for 0.4.0 (Tim Ruffing)
d9a85065a91d07660559b4be3388139dccb39e1d changelog: Catch up in preparation of release (Tim Ruffing)
8659a01714c1b4fcd349ee1a7d733f6934c5d184 ci: Add `release` job (Hennadii Stepanov)
f9b38894baee6b726217e28a4d4591ffdf233e47 ci: Update `actions/checkout` version (Hennadii Stepanov)
2635068abf93ebcf7f200eef14acafc3300e32f7 ci/gha: Let MSan continue checking after errors in all jobs (Tim Ruffing)
e78c7b68eb7e91cf9b88408c053867f148d62ffa ci/Dockerfile: Reduce size of Docker image further (Tim Ruffing)
2f0d3bbffb288621f4232c90424f77d44cc69166 ci/Dockerfile: Warn if `ulimit -n` is too high when running Docker (Tim Ruffing)
4b8a647ad3a59c2421d1d4c6e653f21d453e2612 ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot (Tim Ruffing)
6ebe7d2bb39978e70d85a718919d4af31cc00bc2 ci/Dockerfile: Always use versioned clang packages (Tim Ruffing)
c223d7e33d50b1da0b3ba617c83534185428b3d5 ci: Switch macOS from Ventura to Monterey and add Valgrind (Hennadii Stepanov)
cce045630407e662c90279abb2b0e71161f24e74 ci: Make repetitive command the default one (Hennadii Stepanov)
317a4c48f058755019475de79896230dadc6474c ci: Move `git config ...` to `run-in-docker-action` (Hennadii Stepanov)
676ed8f9cf001ebaadf53d5c11e32f7a6b1e5649 ci: Move "C++ (public headers)" from Cirrus to GitHub Actions (Hennadii Stepanov)
61fc3a2dc883a5ffda43658337ec94d3306eb77f ci: Move "C++ -fpermissive..." from Cirrus to GitHub Actions (Hennadii Stepanov)
d51fb0a533e5ae34b216527ea32281ff498310dc ci: Move "MSan" from Cirrus to GitHub Actions (Hennadii Stepanov)
c22ac27529003e828d8a873ca6439f6978e2e1be ci: Move sanitizers task from Cirrus to GitHub Actions (Hennadii Stepanov)
ee1be62d84bf6d81e0ed574ef98e980d61a19227 ci: Use concurrency for pull requests only (Hennadii Stepanov)
fc3dea29eacc46926fed6428caf8355f732bdf5b ci: Move "ppc64le: Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
7782dc827657288e90fd4fdca5fbf077e50b06c5 ci: Move "ARM64: Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
0a16de671c0cb15cbdd31d56635d21ec95ed788d ci: Move "ARM32: Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
ea33914e00ef1d4117cdb608c96dd3d2d969aa72 ci: Move "s390x (big-endian): Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
880be8af99480e36f3af77b1ee1da17465a91df5 ci: Move "i686: Linux (Debian stable)" from Cirrus to GiHub Actions (Hennadii Stepanov)
e10878f58e4022dbac6e215a89c980a17b95044b ci, gha: Drop `driver-opts.network` input for `setup-buildx-action` (Hennadii Stepanov)
4ad4914bd15bd856eddb306d86588bdacabb1184 ci, gha: Add `retry_builder` Docker image builder (Hennadii Stepanov)
6617a620d95743f51486daf6c33be9cead89a32a ci: Remove "x86_64: Linux (Debian stable)" task from Cirrus CI (Hennadii Stepanov)
03c9e6508ccfaf2ed4150caa5d2d7e92abca5d5d ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job (Hennadii Stepanov)
ad3e65d9fed5ad65391447781c7997f137c8e3a7 ci: Remove GCC build files and sage to reduce size of Docker image (Tim Ruffing)
ef9fe959deb638228bca8f1068f078e87e271b02 ci: Drop no longer needed workaround (Hennadii Stepanov)
87d35f30c0a322e9b4bc5ee1addc1d0cd463562a ci: Rename `cirrus.sh` to more general `ci.sh` (Hennadii Stepanov)
d6281dd0086a37c77311b4acbbacad89738163c7 ci: Remove Windows tasks from Cirrus CI (Hennadii Stepanov)
2b6f9cd546ce688005184f1400bfded7a4a4bbf0 ci, gha: Add Windows jobs based on Linux image (Hennadii Stepanov)
b0886fd35c0ad05adee3fb8008e4315bf2f91f1f ci, gha: Ensure only a single workflow processes `github.ref` at a time (Hennadii Stepanov)
d23da6d55714271c720fee58fbff5e5ef2fe193f use secp256k1_scalar_verify checks (stratospher)
c7d0454932b42a9728b55033c94e000b1dbbb6f2 add verification for scalars (stratospher)
ad152151b06a40aaf6cd90561356ff451996455d update max scalar in scalar_cmov_test and fix schnorrsig_verify exhaustive test (stratospher)
d78bec7001fe6f5ed8d5b215bf61e7b74e3369ca ci: Remove Windows MSVC tasks from Cirrus CI (Hennadii Stepanov)
3545dc2b9bdbf856c1e0288120ef1cde99daa7ec ci, gha: Run all MSVC tests on Windows natively (Hennadii Stepanov)
54058d16feaa431520029335e2d56252859d3260 field: remove `secp256k1_fe_equal_var` (siv2r)
bb4efd6404960f9e8f93c15d7d001af068e5b5a4 tests: remove unwanted `secp256k1_fe_normalize_weak` call (siv2r)
c2f6435802dfaea43fa589fa72804e344c08cd6e ci: Add comment about switching macOS to M1 on GHA later (Tim Ruffing)
4a24fae0bc82738b4d6d44d378da8f15d4fce03e ci: Remove "arm64: macOS Ventura" task from Cirrus CI (Hennadii Stepanov)
8e54a346d2fa5aeedd6ba5201fcb084c281cf6a7 ci, gha: Run "x86_64: macOS Ventura" job on GitHub Actions (Hennadii Stepanov)
747ada35877d4392c453b7c7249465fb382125ea test: Silent noisy clang warnings about Valgrind code on macOS x86_64 (Hennadii Stepanov)
d62db57427f60da57f936cbe049ee27b10c3f8d4 ci: Use Homebrew's gcc in native macOS task (Hennadii Stepanov)
b7c685e74adbd83937990e90f076600fabf8ccf0 Save _normalize_weak calls in group add methods (Peter Dettman)
c83afa66e0c324e42d13adff0e4f7db9b2868788 Tighten group magnitude limits (Peter Dettman)
173e8d061a8d1526f80d9ae79dd7f0371d38f7e0 Implement current magnitude assumptions (Peter Dettman)
49afd2f5d8c323d32a21f2fe182823b6d7704eb2 Take use of _fe_verify_magnitude in field_impl.h (Sebastian Falbesoner)
4e9661fc426c6068b2472f52a772c312bc26acc9 Add _fe_verify_magnitude (no-op unless VERIFY is enabled) (Peter Dettman)
690b0fc05abd76cb7f6bd87e88bf7b8b0fd1ab70 add missing group element invariant checks (Sebastian Falbesoner)
9c91ea41b1987d73b9cbb7e569bb1f1e640a4110 ci: Enable ellswift module where it's missing (Tim Ruffing)
db32a247612d3d48c7c617b9dedf067649f82083 ctimetests: Use new SECP256K1_CHECKMEM macros also for ellswift (Tim Ruffing)
8408dfdc4cfcc5cf87ac0a7d229f8a1c1d63128a Revert "ci: Run sage prover on CI" (Hennadii Stepanov)
c8d9914fb1bf2790e6837794111614b640757ea3 ci, gha: Run "SageMath prover" job on GitHub Actions (Hennadii Stepanov)
f1774e5ec4a49db5762ecccbabd7fb5db0a7fb2b ci, gha: Make MSVC job presentation more explicit (Hennadii Stepanov)
5ee039bb58962745e5f861ae6603b5961adcd1e3 ci: Remove "Windows (VS 2022)" task from Cirrus CI (Hennadii Stepanov)
a2f7ccdecc4721d972f36d6aacc5f0c85ce0557d ci: Run "Windows (VS 2022)" job on GitHub Actions (Hennadii Stepanov)
175db31149fff4b3dc3d3dab021f289d7e98381c ci: Drop no longer needed `PATH` variable update on Windows (Hennadii Stepanov)
116d2ab3df630455f23a7b21f50237689879ecc0 cmake: Set `ENVIRONMENT` property for examples on Windows (Hennadii Stepanov)
cef373997c29c5e6077b9367c92812bcc99bc8bf cmake, refactor: Use helper function instead of interface library (Hennadii Stepanov)
a1bd4971d6c6113f140143275141adb336fc3702 refactor: take use of `secp256k1_scalar_{zero,one}` constants (part 2) (Sebastian Falbesoner)

Pull request description:

  [bitcoin-core/secp256k1#1391]: refactor: take use of `secp256k1_scalar_{zero,one}` constants (part 2)
  [bitcoin-core/secp256k1#1290]: cmake: Set `ENVIRONMENT` property for examples on Windows
  [bitcoin-core/secp256k1#1389]: ci: Run "Windows (VS 2022)" job on GitHub Actions
  [bitcoin-core/secp256k1#1397]: ci: Remove "Windows (VS 2022)" task from Cirrus CI
  [bitcoin-core/secp256k1#1399]: ci, gha: Run "SageMath prover" job on GitHub Actions
  [bitcoin-core/secp256k1#1400]: ctimetests: Use new SECP256K1_CHECKMEM macros also for ellswift
  [bitcoin-core/secp256k1#1348]: tighten group magnitude limits, save normalize_weak calls in group add methods (revival of #1032)
  [bitcoin-core/secp256k1#1402]: ci: Use Homebrew'\''s gcc in native macOS task
  [bitcoin-core/secp256k1#1274]: test: Silent noisy clang warnings about Valgrind code on macOS x86_64
  [bitcoin-core/secp256k1#1394]: ci, gha: Run "x86_64: macOS Ventura" job on GitHub Actions
  [bitcoin-core/secp256k1#1404]: ci: Remove "arm64: macOS Ventura" task from Cirrus CI
  [bitcoin-core/secp256k1#1062]: Removes `_fe_equal_var`, and unwanted `_fe_normalize_weak` calls (in tests)
  [bitcoin-core/secp256k1#1401]: ci, gha: Run all MSVC tests on Windows natively
  [bitcoin-core/secp256k1#1373]: Add invariant checking for scalars
  [bitcoin-core/secp256k1#1403]: ci, gha: Ensure only a single workflow processes `github.ref` at a time
  [bitcoin-core/secp256k1#1398]: ci, gha: Add Windows jobs based on Linux image
  [bitcoin-core/secp256k1#1405]: ci: Drop no longer needed workaround
  [bitcoin-core/secp256k1#1396]: ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job
  [bitcoin-core/secp256k1#1406]: ci, gha: Move more non-x86_64 tasks from Cirrus CI to GitHub Actions
  [bitcoin-core/secp256k1#1410]: ci: Use concurrency for pull requests only
  [bitcoin-core/secp256k1#1409]: ci: Move remained task from Cirrus to GitHub Actions
  [bitcoin-core/secp256k1#1411]: ci: Make repetitive command the default one
  [bitcoin-core/secp256k1#1412]: ci: Switch macOS from Ventura to Monterey and add Valgrind
  [bitcoin-core/secp256k1#1414]: ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot
  [bitcoin-core/secp256k1#1413]: ci: Add `release` job
  [bitcoin-core/secp256k1#1415]: release: Prepare for 0.4.0
  [bitcoin-core/secp256k1#1417]: release cleanup: bump version after 0.4.0
  [bitcoin-core/secp256k1#1390]: tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID
  [bitcoin-core/secp256k1#1416]: doc: Align documented scripts with CI ones
  [bitcoin-core/secp256k1#1422]: cmake: Install `libsecp256k1.pc` file
  [bitcoin-core/secp256k1#1424]: ci: Bump major versions for docker actions
  [bitcoin-core/secp256k1#1395]: tests: simplify `random_fe_non_zero` (remove loop limit and unneeded normalize)

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range ee7aaf213ea3eb42fc8960c7d178b5ffb286440f`.
  Tip: Use `git show --remerge-diff` to show the changes manually added to the merge commit.' --web

  - Replace fe_equal_var with fe_equal
  - Use CHECK_ILLEGAL instead of CHECK/ecount
  - Turn on secp256k1-zkp specific modules in CI

ACKs for top commit:
  real-or-random:
    ACK b41caaafd2f7308f99245bc833158cdc5836c52d

Tree-SHA512: e8994fa2590d6e277d60a130d3f11b0256dc7fbe67e8a2b85463d9849d3f9fbfccf366b17b3904f1974f8b7b27a24128d2a04a3337c1b8409d000d136714bf90
2023-10-12 17:14:20 +02:00
Jonas Nick
b41caaafd2
bppp: replace memcmp in tests with secp256k1_memcmp_var 2023-10-12 13:10:05 +00:00
Jonas Nick
6a3aae8f1d
group_parse: use secp256k1_memcmp_var instead of memcmp 2023-10-12 11:18:21 +00:00
Jonas Nick
e9d522fc64
ci: turn on -zkp modules in macos-native job 2023-10-12 08:10:49 +00:00
Tim Ruffing
b314cf2833
Merge bitcoin-core/secp256k1#1426: ci/cirrus: Add native ARM64 jobs
fa4d6c76b6dc249d02c926ad75725556614fdddd ci/cirrus: Add native ARM64 persistent workers (MarcoFalke)
2262d0eaab2aa1181f900acd2d8cd568047599b6 ci/cirrus: Bring back skeleton .cirrus.yml without jobs (Tim Ruffing)

Pull request description:

ACKs for top commit:
  real-or-random:
    ACK fa4d6c76b6dc249d02c926ad75725556614fdddd
  hebasto:
    re-ACK fa4d6c76b6dc249d02c926ad75725556614fdddd, only last two commits have been squashed since my recent [review](https://github.com/bitcoin-core/secp256k1/pull/1426#pullrequestreview-1636119941).

Tree-SHA512: d1fee99d54a41a4126f7eb72695a56137c925dc9ce7cd692a60ea1262ac0789bbd6aa4e4dfc030f0d97d06aeeae0724a5f2d794a85ff533c6cf3cd215f6a4b7a
2023-09-20 23:14:07 +00:00
MarcoFalke
fa4d6c76b6
ci/cirrus: Add native ARM64 persistent workers
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-09-20 17:09:54 +00:00
Jonas Nick
775f5e242b
Merge commits '1b13415d 374e2b54 96294c00 8d2960c8 ce765a5b b2f6712d eedd7810 b327abfc 5d8fa825 3d05c86d bcffeb14 de657c20 060e32cb 0ba2b945 48b1d939 6b9507ad 5373693e 2e6cf9ba 6ee14550 26a98992 4d7fe609 ea26b71c 65c79fe2 727bec5b 0b4640ae 199d27ce cbf3053f 49be5be9 b10ddd2b 4fd00f4b ba9cb6f3 ee7aaf21 ' into temp-merge-1395
- Replace fe_equal_var with fe_equal
- Use CHECK_ILLEGAL instead of CHECK/ecount
- Turn on secp256k1-zkp specific modules in CI
2023-09-20 09:38:36 +00:00
Tim Ruffing
ee7aaf213e
Merge bitcoin-core/secp256k1#1395: tests: simplify random_fe_non_zero (remove loop limit and unneeded normalize)
c45b7c4fbbf41b011f138c465a58322a36664fd3 refactor: introduce testutil.h (deduplicate `random_fe_`, `ge_equals_` helpers) (Sebastian Falbesoner)
dc5514144fb9d412aa3845432b053ee06a27da37 tests: simplify `random_fe_non_zero` (remove loop limit and unneeded normalize) (Sebastian Falbesoner)

Pull request description:

  `random_fe_non_zero` contains a loop iteration limit that ensures that we abort if `random_fe` ever yielded zero more than ten times in a row. This construct was first introduced in PR #19 (commit 09ca4f32) for random non-square field elements and was later refactored into the non-zero helper in PR #25 (commit 6d6102fe). The copy-over to the exhaustive tests happened recently in PR #1118 (commit 0f864207).

  This case seems to be practically irrelevant and I'd argue for keeping things simple and removing it (which was already suggested in https://github.com/bitcoin-core/secp256k1/pull/1118#discussion_r1067259954); if there's really a worry that the test's random generator is heavily biased towards certain values or value ranges then there should consequently be checks at other places too (e.g. directly in `random_fe` for 256-bit values that repeatedly overflow, i.e. >= p).

  Also, the _fe_normalize call is not needed and can be removed, as the result of `random_fe` is already normalized.

ACKs for top commit:
  real-or-random:
    utACK c45b7c4fbbf41b011f138c465a58322a36664fd3
  siv2r:
    ACK `c45b7c4` (reviewed the changes and tests for both the commits passed locally).

Tree-SHA512: 4ffa66dd0b8392d7d0083a71e7b0682ad18f9261fd4ce8548c3059b497d3462db97e16114fded9787661ca447a877a27f5b996bd7d47e6f91c4454079d28a8ac
2023-09-14 15:06:41 +02:00
Tim Ruffing
ba9cb6f378
Merge bitcoin-core/secp256k1#1424: ci: Bump major versions for docker actions
d9d80fd155cd1eb26c1334ceb0d4cecdef640085 ci: Bump major versions for docker actions (Hennadii Stepanov)

Pull request description:

  See:
  - https://github.com/docker/build-push-action/releases/tag/v5.0.0
  - https://github.com/docker/setup-buildx-action/releases/tag/v3.0.0

ACKs for top commit:
  real-or-random:
    ACK d9d80fd155cd1eb26c1334ceb0d4cecdef640085

Tree-SHA512: b1266e46cd02f8e893b4ce3b4bf51f7fb2ea7c6ae54a5c24a4bc5df4f6e97e99afaf90cf598d4321e8b83a250ba5fd7d43c34d53a8cc71f70f6c6e05cc973d6f
2023-09-13 14:49:13 +02:00
Hennadii Stepanov
d9d80fd155
ci: Bump major versions for docker actions
https://github.com/docker/build-push-action/releases/tag/v5.0.0
https://github.com/docker/setup-buildx-action/releases/tag/v3.0.0
2023-09-12 10:18:39 +01:00
Tim Ruffing
4fd00f4bfe
Merge bitcoin-core/secp256k1#1422: cmake: Install libsecp256k1.pc file
421d84855aeb9324b4f131c3e6c7ee8cf4f5f4e5 ci: Align Autotools/CMake `CI_INSTALL` directory names (Hennadii Stepanov)
9f005c60d6067d94279a3e3e81ec178bf4e2f227 cmake: Install `libsecp256k1.pc` file (Hennadii Stepanov)

Pull request description:

  This PR allows downstream projects to use pkg-config to search for the libsecp256k1 library that is built with CMake.

  Addressed https://github.com/bitcoin-core/secp256k1/discussions/1419#discussioncomment-6922896:
  > We could just ship the pkg-config file also in CMake builds.

ACKs for top commit:
  real-or-random:
    ACK 421d84855a I compared the generated pc files and they match in autotools and CMake

Tree-SHA512: 8e54eb7c76bc727ab18715258c06cc2a419c6c04892a2bd7bfe34392f9a3223f673ff84d2d21b00b3c222b357f02296ec49c872532d98ea0a2f17ef1ed6b6ac1
2023-09-12 10:14:48 +02:00
Hennadii Stepanov
421d84855a
ci: Align Autotools/CMake CI_INSTALL directory names 2023-09-07 20:58:28 +01:00
Hennadii Stepanov
9f005c60d6
cmake: Install libsecp256k1.pc file
This change allows downstream projects to use pkg-config to search for
the libsecp256k1 library that is built with CMake.
2023-09-07 20:47:57 +01:00
Tim Ruffing
2262d0eaab ci/cirrus: Bring back skeleton .cirrus.yml without jobs 2023-09-05 13:45:43 +02:00
Jonas Nick
b10ddd2bd2
Merge bitcoin-core/secp256k1#1416: doc: Align documented scripts with CI ones
b0f7bfedc9fcb4f49fe965b16ae49d0e36c1d32b doc: Do not mention soname in CHANGELOG.md "ABI Compatibility" section (Hennadii Stepanov)
bd9d98d353e169eadb9b2fdba074417407442230 doc: Align documented scripts with CI ones (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  sipa:
    ACK b0f7bfedc9fcb4f49fe965b16ae49d0e36c1d32b
  real-or-random:
    ACK b0f7bfedc9fcb4f49fe965b16ae49d0e36c1d32b

Tree-SHA512: 99cbc065cf9610923a863bac34e607ce4f2b1fe71fc32cb96fed33203e42c914ef29924cd9eade89859f63fdd95ffb214c5a2a1066bfca9c202e85aec5f7c16e
2023-09-04 17:27:23 +00:00
Tim Ruffing
49be5be9e8
Merge bitcoin-core/secp256k1#1390: tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID
70303643cf42d18acbf1c020480c6bb23072dbd9 tests: add CHECK_ERROR_VOID and use it in scratch tests (Jonas Nick)
f8d7ea68dfb1a3cad1fbec2242e9affdf803fbbe tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID (Jonas Nick)
a1d52e3e125bb46dac2cf6daa699e9f15167e8d4 tests: remove unnecessary test in run_ec_pubkey_parse_test (Jonas Nick)
875b0ada2526be92100034c4c7de045203de7e3f tests: remove unnecessary set_illegal_callback (Jonas Nick)

Pull request description:

  Fixes #1167

ACKs for top commit:
  siv2r:
    reACK 7030364 (tests pass locally)
  real-or-random:
    reACK 70303643cf42d18acbf1c020480c6bb23072dbd9

Tree-SHA512: 0ca1f1c92a1c3a93b412433e53e882be56f3c7c55d4cbf12683ab7d9b8a916231b6508270099bfed0bfaa9d0af19cb8fdf0fe3274112ab48d33a0bd2356f2fa7
2023-09-04 18:58:57 +02:00
Tim Ruffing
cbf3053ff1
Merge bitcoin-core/secp256k1#1417: release cleanup: bump version after 0.4.0
9b118bc7fb12203e9bf98eb23bfdd5746adde2b3 release cleanup: bump version after 0.4.0 (Jonas Nick)

Pull request description:

  based on #1415

ACKs for top commit:
  sipa:
    ACK 9b118bc7fb12203e9bf98eb23bfdd5746adde2b3
  hebasto:
    ACK 9b118bc7fb12203e9bf98eb23bfdd5746adde2b3
  real-or-random:
    ACK 9b118bc7fb12203e9bf98eb23bfdd5746adde2b3

Tree-SHA512: 76df87c41bdc3379df4e88619645f5110010d7713ebe20bad3e7c99472bd62b90f4bd3c6b558ad5a23119acc4734e39383d96a9800e4a43dfadc086ef66fd0ab
2023-09-04 18:37:41 +02:00
Jonas Nick
9b118bc7fb
release cleanup: bump version after 0.4.0 2023-09-04 16:27:38 +00:00
Jonas Nick
199d27cea3
Merge bitcoin-core/secp256k1#1415: release: Prepare for 0.4.0
16339804c906a99a0b9bbe192d3de9fde021ff19 release: Prepare for 0.4.0 (Tim Ruffing)
d9a85065a91d07660559b4be3388139dccb39e1d changelog: Catch up in preparation of release (Tim Ruffing)

Pull request description:

ACKs for top commit:
  hebasto:
    re-ACK 16339804c906a99a0b9bbe192d3de9fde021ff19.
  sipa:
    ACK 16339804c906a99a0b9bbe192d3de9fde021ff19
  jonasnick:
    ACK 16339804c906a99a0b9bbe192d3de9fde021ff19

Tree-SHA512: 9b29edc8beece44cb8456de9844bf22e13f41b43bb5567b3f37dcbdcb7cd5ca6a976a0f805973ddfa7666509aa452247a4d8297e3cfb362acaf4f0fa942daa21
2023-09-04 16:26:47 +00:00
Jonas Nick
70303643cf
tests: add CHECK_ERROR_VOID and use it in scratch tests 2023-09-04 16:19:49 +00:00
Jonas Nick
f8d7ea68df
tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID
This commit also explicitly initializes shortpubkey. For some reason, removing
surrounding, unrelated lines results in gcc warnings when configured with
--enable-ctime-tests=no --with-valgrind=no.
2023-09-04 16:19:40 +00:00
Tim Ruffing
16339804c9 release: Prepare for 0.4.0 2023-09-04 18:18:24 +02:00
Tim Ruffing
d9a85065a9 changelog: Catch up in preparation of release 2023-09-04 18:18:19 +02:00
Hennadii Stepanov
b0f7bfedc9
doc: Do not mention soname in CHANGELOG.md "ABI Compatibility" section
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-09-04 17:05:53 +01:00
Hennadii Stepanov
bd9d98d353
doc: Align documented scripts with CI ones 2023-09-04 16:05:29 +01:00
Tim Ruffing
0b4640aedd
Merge bitcoin-core/secp256k1#1413: ci: Add release job
8659a01714c1b4fcd349ee1a7d733f6934c5d184 ci: Add `release` job (Hennadii Stepanov)
f9b38894baee6b726217e28a4d4591ffdf233e47 ci: Update `actions/checkout` version (Hennadii Stepanov)

Pull request description:

  This PR introduces a new "Release" job that conducts sanity checks as defined in [`doc/release-process.md`](https://github.com/bitcoin-core/secp256k1/blob/master/doc/release-process.md#sanity-checks).

ACKs for top commit:
  sipa:
    ACK 8659a01714c1b4fcd349ee1a7d733f6934c5d184
  real-or-random:
    ACK 8659a01714c1b4fcd349ee1a7d733f6934c5d184

Tree-SHA512: 84e03fa07f8c41aec0f6d1ccb4ac3643e85d370ef7e388b335365deadb555f2d9ef7e5d80e1255a18e790a774e04ca66f265b9441402b183d4c535a97688f20f
2023-09-04 16:27:14 +02:00
Hennadii Stepanov
8659a01714
ci: Add release job
The new job runs checks outlined in the `doc/release-process.md`.
2023-09-04 15:04:37 +01:00
Hennadii Stepanov
f9b38894ba
ci: Update actions/checkout version 2023-09-04 14:58:01 +01:00
Jonas Nick
a1d52e3e12
tests: remove unnecessary test in run_ec_pubkey_parse_test
This test tested whether setting the callback works correctly which should be
tested in the context tests.
2023-09-04 12:52:19 +00:00
Jonas Nick
875b0ada25
tests: remove unnecessary set_illegal_callback 2023-09-04 12:50:32 +00:00
Tim Ruffing
727bec5bc2
Merge bitcoin-core/secp256k1#1414: ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot
2635068abf93ebcf7f200eef14acafc3300e32f7 ci/gha: Let MSan continue checking after errors in all jobs (Tim Ruffing)
e78c7b68eb7e91cf9b88408c053867f148d62ffa ci/Dockerfile: Reduce size of Docker image further (Tim Ruffing)
2f0d3bbffb288621f4232c90424f77d44cc69166 ci/Dockerfile: Warn if `ulimit -n` is too high when running Docker (Tim Ruffing)
4b8a647ad3a59c2421d1d4c6e653f21d453e2612 ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot (Tim Ruffing)
6ebe7d2bb39978e70d85a718919d4af31cc00bc2 ci/Dockerfile: Always use versioned clang packages (Tim Ruffing)

Pull request description:

  Solves one item in https://github.com/bitcoin-core/secp256k1/issues/1392.

  This PR also has a few tweaks to the Dockerfile, see individual commits.

  ---

  I'll follow up soon with a PR for ARM64/gcc. This will rely on Cirrus CI.

ACKs for top commit:
  hebasto:
    ACK 2635068abf93ebcf7f200eef14acafc3300e32f7.

Tree-SHA512: d290bdd8e8e2a2a2b6ccb1b25ecdc9662c51dab745068a98044b9abed75232d13cb9d2ddc2c63c908dcff6a12317f0c7a35db3288c57bc3b814793f7fce059fd
2023-09-04 08:59:14 +02:00
Tim Ruffing
2635068abf ci/gha: Let MSan continue checking after errors in all jobs 2023-09-03 11:31:35 +02:00
Tim Ruffing
e78c7b68eb ci/Dockerfile: Reduce size of Docker image further
- No need to have wget installed
 - Clean up rm -rf /var/lib/apt/lists/, see
   https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get
2023-09-03 11:31:35 +02:00
Tim Ruffing
2f0d3bbffb ci/Dockerfile: Warn if ulimit -n is too high when running Docker
The underlying issue does not affect our CI hosts, but is an issue on my
development machine (Arch Linux). In particular, this affects the vanilla
configuration of Docker on systemd, which has effectively no limit:
11400a3f5a/pkg/docker-engine/common/systemd/docker.service (L31)

I hope this saves future generations some precious hours of their life.
2023-09-03 11:31:35 +02:00
Tim Ruffing
4b8a647ad3 ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot 2023-09-03 11:31:35 +02:00
Tim Ruffing
6ebe7d2bb3 ci/Dockerfile: Always use versioned clang packages
This commit switches to a new strategy to make sure we're installing the
most recent LLVM packages. Before this commit, we used the unversioned
LLVM packages (e.g., `clang` instead of `clang-18`), which are supposed
to provide the latest snapshot, but this is broken for arm64 [1],
which we want to add in a later PR.

Anyway, the new approach is cleaner because it does not require us to
fiddle with the installed `clang` package by removing a symlink.

[1] https://github.com/llvm/llvm-project/issues/64790

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2023-09-03 11:29:44 +02:00
Tim Ruffing
65c79fe2d0
Merge bitcoin-core/secp256k1#1412: ci: Switch macOS from Ventura to Monterey and add Valgrind
c223d7e33d50b1da0b3ba617c83534185428b3d5 ci: Switch macOS from Ventura to Monterey and add Valgrind (Hennadii Stepanov)

Pull request description:

  This PR switches the macOS native job from Ventura to Monterey, which allows to support Valgrind.

  Both runners--`macos-12` and `macos-13`--have the same clang compilers installed:
  - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
  - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md

  But Valgrind works fine on macOS Monterey, but not on Ventura.

  See: https://github.com/bitcoin-core/secp256k1/issues/1392#issuecomment-1693685610.

  The Homebrew's Valgrind package is cached once it has been built (as it was before https://github.com/bitcoin-core/secp256k1/pull/1152). Therefore, the `actions/cache@*` action is needed to be added to the list of the allowed actions.

  https://github.com/bitcoin-core/secp256k1/pull/1412#issuecomment-1695716350:
  > By the way, this solves #1151.

ACKs for top commit:
  real-or-random:
    ACK c223d7e33d50b1da0b3ba617c83534185428b3d5 I tested that a cttest failure makes CI fail: https://github.com/real-or-random/secp256k1/actions/runs/6010365844

Tree-SHA512: 5e72d89fd4d82acbda8adeda7106db0dad85162cca03abe8eae9a40393997ba36a84ad7b12c4b32aec5e9230f275738ef12169994cd530952e2b0b963449b231
2023-08-29 14:59:47 +02:00
Hennadii Stepanov
c223d7e33d
ci: Switch macOS from Ventura to Monterey and add Valgrind 2023-08-28 17:49:45 +01:00
Tim Ruffing
ea26b71c3a
Merge bitcoin-core/secp256k1#1411: ci: Make repetitive command the default one
cce045630407e662c90279abb2b0e71161f24e74 ci: Make repetitive command the default one (Hennadii Stepanov)
317a4c48f058755019475de79896230dadc6474c ci: Move `git config ...` to `run-in-docker-action` (Hennadii Stepanov)

Pull request description:

  This PR addresses the https://github.com/bitcoin-core/secp256k1/pull/1409#discussion_r1301767281:
  > couldn't we add this to `run-in-docker-action` to avoid duplication?

ACKs for top commit:
  real-or-random:
    ACK cce045630407e662c90279abb2b0e71161f24e74

Tree-SHA512: 793cec3d99853a23e06680fe35a7cae2dc8771f22e3940c4a4f36357273164f2d92e196768118d146e956ffca9ef59d4e5f86e1cba5576ebfdc59343581c9924
2023-08-24 10:46:07 +02:00