Commit Graph

1185 Commits

Author SHA1 Message Date
Tobin C. Harding b9cb37d69f
Add a verify function to PublicKey
To be uniform with `XOnlyPublicKey` add a `verify` function to the
`PublicKey`.
2023-08-11 11:49:09 +10:00
Andrew Poelstra 14e82186d1
Merge rust-bitcoin/rust-secp256k1#644: Improve `Message` constructors
cd40ae7f19 Improve Message constructors (Tobin C. Harding)

Pull request description:

  Observe:

  - The word "hash" can be a verb or a noun, its usage in function names is therefore at times ambiguous.
  - The function name `from_slice` gives no indication as to what the slice input is.

  Improve Message constructors by doing:

  - Add a constructor `Message::from_digest` that takes a 32 byte array as input.
  - Rename `Message::from_slice` to `Message::from_digest_slice` (deprecate `from_slice` and add `from_digest_slice`)
  - Improve the docs while we are at it.

  ### Note

  The original PR conflate 2 separate issues, the `Message` constructor naming clarity issue and the upgrade difficulty issue, PR is now only a solution to the first. The second will be done as a separate PR.

ACKs for top commit:
  apoelstra:
    ACK cd40ae7f19

Tree-SHA512: 4e5aeccf15cca95073f4c3a518b9e1f54f0e33c92c45dfecd1daa31d052022cd28c71bb6df6cff8a6548993e3e22788f11cd2633214ab5a580c753e66d2ea749
2023-08-10 15:05:43 +00:00
Andrew Poelstra 090f073772
Merge rust-bitcoin/rust-secp256k1#641: Fix CI
92778efe92 CI: Pin cc in ASAN no_std_test crate (Tobin C. Harding)
5e6dd8a467 CI: Use bash instead of sh (Tobin C. Harding)
cf5f1034ca Target panic message at lib users (Tobin C. Harding)
ec9c9643d7 Allow stuff after unconditional panic (Tobin C. Harding)
3bbf08348e no_std_test: Remove internal_features (Tobin C. Harding)
cff7a3dae7 CI: Grep for exact error message (Tobin C. Harding)
79e184f08a CI: Update MSRV pins (Tobin C. Harding)

Pull request description:

  CI has a bunch of things broken.

  This is #640 followed by #639 followed by  a few addition fixes to get CI green again. Includes clippy warnings in feature gated code which is not strictly necessary and a fix to a panic message, also not strictly necessary.

ACKs for top commit:
  apoelstra:
    ACK 92778efe92

Tree-SHA512: f99b01e17fade7df394299bdb6bf385bec3f88d6568d43962238049b33a94c364d48c266acb358e72a48dd55a4aac6300ace6478b0821275b89cb86eba639d8b
2023-08-10 15:01:20 +00:00
Tobin C. Harding 92778efe92
CI: Pin cc in ASAN no_std_test crate
Looks like a recent version of `cc` breaks our ASAN job. Pin to the
previous version.
2023-08-10 09:54:50 +10:00
Tobin C. Harding 5e6dd8a467
CI: Use bash instead of sh
In preparation for using `pushd`/`popd` use `bash` to run the CI script
instead of `sh`.
2023-08-10 09:48:40 +10:00
Tobin C. Harding cf5f1034ca
Target panic message at lib users
Currently the panic message refers to stuff related to development of
the library, this is meaningless for users of the lib. Target panic
message at secp users instead.
2023-08-10 09:16:13 +10:00
Tobin C. Harding ec9c9643d7
Allow stuff after unconditional panic
We have an unconditional panic for some combination of features, this
causes clippy to give a bunch of useless warnings.

Add allow attributes to quieten down clippy.
2023-08-10 09:16:13 +10:00
Tobin C. Harding 3bbf08348e
no_std_test: Remove internal_features
Remove the `internal_features` attribute, not sure what it was supposed
to be doing but the crate works without it.
2023-08-10 09:16:13 +10:00
Tobin C. Harding cff7a3dae7
CI: Grep for exact error message
`cargo +nightly` output of panic recently changed breaking our grep
statement by adding the code line and a newline.

Grep for the exact second line of the error message.
2023-08-10 09:16:13 +10:00
Tobin C. Harding 79e184f08a
CI: Update MSRV pins
Pinning is broken again, update the pins it CI so that the following
sequence of commands would work

```bash
rm Cargo.lock
cargo +1.48 update -p wasm-bindgen-test --precise 0.3.34
cargo +1.48 update -p serde_test --precise 1.0.175
cargo +1.48 test --all-features
```

Note, solely out of interest, `cargo +1.48 build` does not need
pinning (at the moment :)
2023-08-10 08:50:45 +10:00
Tobin C. Harding cd40ae7f19
Improve Message constructors
Observe:

- The word "hash" can be a verb or a noun, its usage in function names
  is therefore at times ambiguous.
- The function name `from_slice` gives no indication as to what the
  slice input is.

Improve Message constructors by doing:

- Add a constructor `Message::from_digest` that takes a 32 byte array as
  input.
- Rename `Message::from_slice` to `Message::from_digest_slice`
  (deprecate `from_slice` and add `from_digest_slice`)
- Improve the docs while we are at it.
2023-08-10 08:20:46 +10:00
Andrew Poelstra 29e1a0c44e
Merge rust-bitcoin/rust-secp256k1#624: Fix broken stuff
567c39c7f1 Revert "WIP: Add toolchain matrix to job" (Tobin C. Harding)
e6643c083d CI: Pin dependencies for MSRV build ... properly (Tobin C. Harding)

Pull request description:

  Goodness me, I made a mess.

  Commit `0e0dcb7f CI: Pin dependencies required for MSRV build` is totally wrong, why did it get through CI?

  Fix broken stuff in the CI script by doing:

  - `serde_json` is not a dependency of `secp256k1`, remove the pinning
  - Put the pinning _before_ any call to `cargo`
  - Pin the transient dependency `wasm-bindgen-test`

  And then `Revert "WIP: Add toolchain matrix to job"`

  Fix: #626

ACKs for top commit:
  apoelstra:
    ACK 567c39c7f1

Tree-SHA512: f60a95e1c840e265dba1d10d2e87b970f1ebc5f01514ef9edaaf0475d833dbce15b8e715a6c53052786036b1dbbba73a2be0e470afd0d37320f540081c51c8e8
2023-07-14 19:11:59 +00:00
Tobin C. Harding 567c39c7f1
Revert "WIP: Add toolchain matrix to job"
This reverts commit 77808b7d83.

dtolnay/rust-toolchain does not support using a matrix as far as I can
tell. Since the PR brief description contains "WIP" it looks like the
original author (me) was testing this using CI, no idea how this patch
got merged.
2023-07-14 12:57:14 +10:00
Tobin C. Harding e6643c083d
CI: Pin dependencies for MSRV build ... properly
Commit `0e0dcb7f CI: Pin dependencies required for MSRV build` is
totally wrong, why did it get through CI?

In the CI script do:

- `serde_json` is not a dependency of `secp256k1`, remove the pinning
- Put the pinning _before_ any call to `cargo`
- Pin the transient dependency `wasm-bindgen-test`
2023-07-14 12:57:11 +10:00
Andrew Poelstra 8e48e15d32
Merge rust-bitcoin/rust-secp256k1#625: Remove docsrs cfg_attributes
81b154fed5 Remove docsrs cfg_attributes (Tobin C. Harding)

Pull request description:

  We no longer need to manually configure the docsrs build to highlight feature guards since we use the `doc_auto_cfg` feature. Somehow when we added usage of that feature we forgot to remove the other attributes.

  Found in CI fail of #624

ACKs for top commit:
  sanket1729:
    utACK 81b154fed5. I don't follow this completely, but yay for removing unnecessary code.
  apoelstra:
    ACK 81b154fed5

Tree-SHA512: 9decdc3f71d8f592047eee89f7f4aaf3a08b2643148c6bc5ad7de9edf61acab0ee56bf3c6dbc14493a9d089d492e31f1d379539e256b5eb96c8873c3be702256
2023-07-13 16:42:10 +00:00
Tobin C. Harding 81b154fed5
Remove docsrs cfg_attributes
We no longer need to manually configure the docsrs build to highlight
feature guards since we use the `doc_auto_cfg` feature. Somehow when we
added usage of that feature we forgot to remove the other attributes.
2023-07-13 10:36:58 +10:00
Andrew Poelstra 9b76e13eea
Merge rust-bitcoin/rust-secp256k1#623: CI: Pin dependencies required for MSRV build
0e0dcb7f54 CI: Pin dependencies required for MSRV build (Tobin C. Harding)

Pull request description:

  Whinge, whinge, whinge, and pin the dependencies.

ACKs for top commit:
  apoelstra:
    ACK 0e0dcb7f54

Tree-SHA512: 3eb65a844f632ea324705fe371c3876b96d62ddabe17085ed1bf32183eb491ff5006836c3945f4b0e11886049e9bd62245d2eb2c646cbf1a2f10cbff5c54bd53
2023-07-12 15:44:36 +00:00
Tobin C. Harding 0e0dcb7f54
CI: Pin dependencies required for MSRV build
Whinge, whinge, whinge, and pin the dependencies.
2023-07-12 15:55:55 +10:00
Andrew Poelstra 31237ffd60
Merge rust-bitcoin/rust-secp256k1#622: Add changelog entry for removal of ONE_KEY
3b8a82eb2b Add changelog entry for removal of ONE_KEY (Tobin C. Harding)

Pull request description:

  In the 0.25.0 release we removed the `ONE_KEY` const but did not mention it in the release notes. This makes upgrade harder than it should be.

  In hindsight we should have deprecated the const then removed it.

  Add a changelog entry to the 0.25.0 release mentioning the removal and the work around.

ACKs for top commit:
  apoelstra:
    ACK 3b8a82eb2b

Tree-SHA512: 0bbf47a2f0e5221719b3d04a895c8f784623e31fd149911cf1b92afa2487037ee9619cedc94ea1d22bffd540ef5aa94a56e98daa56751c94274c973825ec9d5d
2023-07-09 18:03:28 +00:00
Andrew Poelstra 408c1244ef
Merge rust-bitcoin/rust-secp256k1#618: Add a verify function to PublicKey
d60b891126 Add a verify function to PublicKey (Tobin C. Harding)

Pull request description:

  Expose signature verification functionality for schnorr signatures on the `XOnlyPublicKey` type.

  Idea from Kixunil: https://github.com/rust-bitcoin/rust-bitcoin/pull/1744#issuecomment-1534200841

ACKs for top commit:
  apoelstra:
    ACK d60b891126

Tree-SHA512: 2ffa3de528b857c5b0a402815b71b35da913c668bea53b63801705fa6a86eb6d44766aa2395c02f67a4712b451c77caf627af9450183ae70957abf246a63c279
2023-07-09 16:10:55 +00:00
Tobin C. Harding 3b8a82eb2b
Add changelog entry for removal of ONE_KEY
In the 0.25.0 release we removed the `ONE_KEY` const but did not mention
it in the release notes. This makes upgrade harder than it should be.

In hindsight we should have deprecated the const then removed it.

Add a changelog entry to the 0.25.0 release mentioning the removal and
the work around.
2023-07-08 10:52:52 +10:00
Tobin C. Harding d60b891126
Add a verify function to PublicKey
Expose signature verification functionality for schnorr signatures on
the `XOnlyPublicKey` type.
2023-06-21 09:49:32 +10:00
Andrew Poelstra 7c8270a850
Merge rust-bitcoin/rust-secp256k1#566: Improve the README
47aa740c74 Improve the README files (Tobin C. Harding)

Pull request description:

  Improve the README files

  Improve the secp256k1 readme by:

  - ~Use a top level markdown header (level 1)~ Use HTML for header and badges
  - Add a link to the SECG's website (www.secg.org)
  - Add a link for `secp256k1` to bitcoin.it explaining the curve

  Improve the secp256k1-sys readme by:

  - Use HTML for header and badges (a subset of the badges used in `rust-secp256k1` readme)
  - Basic cleanup
       - Use 100 column width
       - Use backticks
       - Use capitals

ACKs for top commit:
  apoelstra:
    ACK 47aa740c74

Tree-SHA512: 8f818ffcda93424430abd72da68d86215c2313479449775e9851aff854d3691180aadfe5052338c2695d85c6cac32e764c4f789301867407eef64d8c3990ef10
2023-05-16 16:39:02 +00:00
Tobin C. Harding 47aa740c74
Improve the README files
Improve the secp256k1 readme by:

- Use a top level markdown header (level 1)
- Add a link to the SECG's website (www.secg.org)
- Add a link for `secp256k1` to bitcoin.it explaining the curve

Improve the secp256k1-sys readme by:

- Mirror secp256k1 readme badges, heading, docs link
- Basic cleanup
 - Use 100 column width
 - Use backticks
 - Use capitals
2023-05-16 08:49:03 +10:00
Andrew Poelstra 5817d3227d
Merge rust-bitcoin/rust-secp256k1#607: Add serialize function for schnorr::Signature
8af2cf12da add .serialize() function to schnorr signature (isaac-asdf)

Pull request description:

  convert from Signature to a byte_array

ACKs for top commit:
  Kixunil:
    ACK 8af2cf12da
  tcharding:
    ACK 8af2cf12da
  apoelstra:
    ACK 8af2cf12da

Tree-SHA512: b69d58646cdba4d83a79189f18628590970f471771feef0e11e089d73bd934777e3554a448b88a3643203522fde98084fd7570a5cec400516166583a3433c000
2023-05-10 14:30:08 +00:00
Andrew Poelstra ecdec75f3c
Merge rust-bitcoin/rust-secp256k1#612: rustfmt: Use now config option fn_params_layout
7467b23a8d rustfmt: Use now config option fn_params_layout (Tobin C. Harding)

Pull request description:

  `rustfmt` warns:

   Warning: the `fn_args_layout` option is deprecated. Use
   `fn_params_layout`. instead

  As suggested, use now config option `fn_params_layout`.

ACKs for top commit:
  apoelstra:
    ACK 7467b23a8d

Tree-SHA512: c786607200f550839300234d72e387e76e648b51ccebb96d8fc7a3b607b1702e8410dca486930cf71321f7e0a0546ad55f589da58395c8b3e86d783b40f776a7
2023-05-10 13:42:42 +00:00
Tobin C. Harding 7467b23a8d
rustfmt: Use now config option fn_params_layout
`rustfmt` warns:

 Warning: the `fn_args_layout` option is deprecated. Use
 `fn_params_layout`. instead

As suggested, use now config option `fn_params_layout`.
2023-05-10 08:16:33 +10:00
isaac-asdf 8af2cf12da add .serialize() function to schnorr signature 2023-05-08 21:29:12 -05:00
Andrew Poelstra be7f9398fa
Merge rust-bitcoin/rust-secp256k1#609: Introduce SPDX license identifiers
896e6c7f2d Introduce SPDX license identifiers (Tobin C. Harding)

Pull request description:

  Licenses are boring as hell, so is are all the comments at the top of each file. This patch makes no comment on the merit of license comments in each file, rather this patch reduces the license comment to the minimum possible with no loss of meaning - an SPDX license identifier.

  Note also please that we remove the "written by" comments as well for the following reasons (discussed recently on rust-bitcoin repo):

  - they are not descriptive because many devs contributed
  - they have a tendency to include the wrong date because of cut'n'pasta
  - all this info is in the git history

  ref: https://spdx.dev/ids/#how

  cc elichai because this PR removes your name but you were not explicitly part of the conversation on `rust-bitcoin` about this topic. Here is the issue: https://github.com/rust-bitcoin/rust-bitcoin/issues/1816 also for more on SPDX see https://github.com/rust-bitcoin/rust-bitcoin/pull/1076

ACKs for top commit:
  Kixunil:
    ACK 896e6c7f2d
  apoelstra:
    ACK 896e6c7f2d

Tree-SHA512: 6f0ff7ec2632aed510df362e2fb9cf25fe02cae347bdd4a481804a3ea2b9e060c4ec2c85de3e9d1d40920e4b9c4eecfab127e61f3d076886fe8f2fb4bff9f5a7
2023-05-04 18:17:24 +00:00
Andrew Poelstra 3baa3980f5
Merge rust-bitcoin/rust-secp256k1#610: Use doc_auto_cfg
b6d0c3bfcd Use doc_auto_cfg (Tobin C. Harding)

Pull request description:

  We can build docs using feature markers by using `doc_auto_cfg` now, no need to manually call the `doc` attribute.

ACKs for top commit:
  Kixunil:
    ACK b6d0c3bfcd
  apoelstra:
    ACK b6d0c3bfcd

Tree-SHA512: ab95968dcb664543d6e1ab5f00866fda1ac2862b86793bda0e19cdc354fbf22471c46a044ceabe8cba2d2fc32671604219fdcb5e96107e14096d20d2aceab0f3
2023-05-04 16:41:48 +00:00
Tobin C. Harding b6d0c3bfcd
Use doc_auto_cfg
We can build docs using feature markers by using `doc_auto_cfg` now, no
need to manually call the `doc` attribute.
2023-05-03 12:06:25 +10:00
Tobin C. Harding 896e6c7f2d
Introduce SPDX license identifiers
Licenses are boring as hell, so is are all the comments at the top of
each file. This patch makes no comment on the merit of license comments
in each file, rather this patch reduces the license comment to the
minimum possible with no loss of meaning - an SPDX license identifier.

Note also please that we remove the "written by" comments as well for
the following reasons (discussed recently on rust-bitcoin repo):

- they are not descriptive because many devs contributed
- they have a tendency to include the wrong date because of cut'n'pasta
- all this info is in the git history

ref: https://spdx.dev/ids/#how
2023-05-03 11:37:07 +10:00
Andrew Poelstra be2999ad58
Merge rust-bitcoin/rust-secp256k1#608: change --cfg=fuzzing to --cfg=secp256k1_fuzzing
9bdab89562 change --cfg=fuzzing to --cfg=secp256k1_fuzz (Andrew Poelstra)

Pull request description:

  Companion PR to https://github.com/rust-bitcoin/rust-bitcoin/pull/1821

ACKs for top commit:
  sanket1729:
    ACK 9bdab89562

Tree-SHA512: 9ff5ce4cae99089f85a73a845cd5dca7b7d0ad9e73c0ee180e73fd9a55c6b92f21ad0192c8c0976e2e590be9d5d899b113b8b2006a3c53e0146a3ce5ba1450ec
2023-05-01 20:26:57 +00:00
Andrew Poelstra 9bdab89562
change --cfg=fuzzing to --cfg=secp256k1_fuzz 2023-05-01 16:11:44 +00:00
Andrew Poelstra 74e6ced6de
Merge rust-bitcoin/rust-secp256k1#604: Clarify the documentation of `normalize_s`
f6c68ec329 Clarify the documentation of `normalize_s` (Matt Corallo)

Pull request description:

  I was reading the docs for `normalize_s` and got confused what the point was - it says that libsecp "will only accept" signatures that are normalized, which led me to believe it would refuse to deserialize such signatures. This is untrue, it only refuses to *validate* such signatures.

ACKs for top commit:
  apoelstra:
    ACK f6c68ec329

Tree-SHA512: 27ac2f8819638fb889d0fbfb4bc1c07059854b8a15bf2dc2c4140eaf805eb15665fe3d87cadefd56c7b6200ef39818e8d6602e87d7ae7c1d4a4229d4829ea3d0
2023-04-20 23:33:09 +00:00
Andrew Poelstra b0626b789f
Merge rust-bitcoin/rust-secp256k1#603: Add toolchain matrix to WASM job
77808b7d83 WIP: Add toolchain matrix to job (Tobin C. Harding)

Pull request description:

  Recently I changed CI to use the dtolnay runner and in doing so introduced a regression (knowingly) whereby we only ran the WASM tests with the stable toolchain.

  Run the WASM tests with multiple toolchains
  - stable
  - beta
  - 1.48.0
  - nightly

ACKs for top commit:
  apoelstra:
    ACK 77808b7d83

Tree-SHA512: c55fc31977082ad8332a7ae05267ca464294227a6542c251ea9ae367b6935e41a3ae27e8505c88ba69a85eca4a8600d46fed189be5033f7a7b85093038cf8590
2023-04-20 05:46:53 +00:00
Matt Corallo f6c68ec329 Clarify the documentation of `normalize_s`
I was reading the docs for `normalize_s` and got confused what the
point was - it says that libsecp "will only accept" signatures that
are normalized, which led me to believe it would refuse to
deserialize such signatures. This is untrue, it only refuses to
*validate* such signatures.
2023-04-20 02:46:18 +00:00
Tobin C. Harding 77808b7d83
WIP: Add toolchain matrix to job 2023-04-20 09:11:43 +10:00
Andrew Poelstra 141b874e65
Merge rust-bitcoin/rust-secp256k1#599: Rework GitHub actions
3c1b576f47 ci: Rework github actions script (Tobin C. Harding)
d41bcc81d3 ci: Use dtonlnay runner for WASM (Tobin C. Harding)

Pull request description:

  Rework the github actions script in line with `rust-bitcoin`, notably:

  - Only run WASM test using stable toolchain (is this ok? cargo-cult-programmed from rust-bitcoin)
  - Use dtonlay runner
  - Split jobs up by toolchain
  - Add Arch32bit job
  - Add Cross test job
  - Run linter as part of the test script
  - Test docs build using stable toolchain and nightly toolchain

ACKs for top commit:
  apoelstra:
    ACK 3c1b576f47

Tree-SHA512: 9b7ec90fc0815de9433231a74af3993fa64f0308623f73bf3fcd1be34e48785088f4de19825fa86d140bb658eacfd606d124556fc389fbcd7fa37c0cafb8fd0a
2023-04-18 20:22:46 +00:00
Tobin C. Harding 3c1b576f47
ci: Rework github actions script
Rework the github actions script in line with `rust-bitcoin`, notably:

- Use dtonlay runner
- Split jobs up by toolchain
- Add Arch32bit job
- Add Cross test job
- Run linter as part of the test script
- Test docs build using stable toolchain and nightly toolchain
2023-04-18 16:02:50 +10:00
Tobin C. Harding d41bcc81d3
ci: Use dtonlnay runner for WASM
Use the newer github action cargo runner from dtolnay.

Note, with this applied we only run the WASM tests using the stable
toolchain.
2023-04-18 15:49:09 +10:00
Andrew Poelstra 493eaf723f
Merge rust-bitcoin/rust-secp256k1#594: Rewrite revendoring script
2ae7ca9cf2 secp-sys: update README for new vendoring script (Andrew Poelstra)
4b02e9c405 run new vendor-libsecp.sh; fix upstream CHANGELOG. (Andrew Poelstra)
b58a60fd6c rewrite ./vendor-libsecp.sh (Andrew Poelstra)

Pull request description:

  For Nix purposes I need the revendoring script to work without network access and without user interaction. I also realized it would be convenient if the script could figure out what the right version prefix is supposed to be. Then I noticed some shellcheck issues.

  Anyway I just rewrote the whole thing. I'm now able to run this script within nix and vet that the current contents of the `depend/` directory are consistent with the secp256k1-HEAD-revision.txt, for all commits.

ACKs for top commit:
  tcharding:
    ACK 2ae7ca9cf2
  sanket1729:
    reACK 2ae7ca9cf2

Tree-SHA512: ea3028e3517b2dbe0f34bcf20685945ecf543fc42e01f10d435432ad290088586b2a2b0f0e94bc3ce59ec38727656eb04eef57c5df6a34da77070e0f288b1d84
2023-03-31 21:26:24 +00:00
Andrew Poelstra 1ad3107e80
Merge rust-bitcoin/rust-secp256k1#595: Bump MSRV to 1.48
7bba2bc3b5 secp256k1-sys: Remove custom implementations of Eq, Ord and friends (Tobin C. Harding)
a815272bfc secp256k1: Remove custom implementations of Eq, Ord and friends (Tobin C. Harding)
ee83c3a4f9 Bump MSRV to 1.48 (Tobin C. Harding)
0e2579fb96 Fix release date in changelogs (Tobin C. Harding)

Pull request description:

  As per ecosystem wide change, bump the MSRV of both crates to 1.48

  Patch 1 is a typo fix to the changelog, I don't see changelogs cached on crates.io in any way so this fix should be able to quietly go in.

  Note before this is applied there is no mention of the MSRV in secp256k1-sys, was that intentional? If not, with this applied, we have a mention in the readme.

  CI needs some more fixes (wasm job) but because patching CI often leads to me doing 300 pushes I'm leaving it to a separate PR.

ACKs for top commit:
  apoelstra:
    ACK 7bba2bc3b5

Tree-SHA512: 4e575c7e4f7d4a36e024eee407f8a757ad35be7225d8b8de71d57248c40801b05aeb12abf27ea9ce63215561527c8edb4d1807b09388b9d1dcdb52f453cd0981
2023-03-31 00:48:57 +00:00
Tobin C. Harding 7bba2bc3b5
secp256k1-sys: Remove custom implementations of Eq, Ord and friends
Note: Only effects code when fuzzing is enabled, as such does not
include a mention in the changelog.

Now that we have Rust 1.48 as the MSRV we no longer need the custom
implementations of `PartialEq`, `Eq`, `PartialOrd`, `Ord`, and `Hash`.
We can just let users of the `impl_array_newtype` macro derive these
traits if they want them.

Remove the custom implementations and add derives to our two users of
the macro.
2023-03-31 09:43:52 +11:00
Tobin C. Harding a815272bfc
secp256k1: Remove custom implementations of Eq, Ord and friends
Now that we have Rust 1.48 as the MSRV we no longer need the custom
implementations of `PartialEq`, `Eq`, `PartialOrd`, `Ord`, and `Hash`.
We can just let users of the `impl_array_newtype` macro derive these
traits if they want them.

Remove the custom implementations and add derives to our two users of
the macro.
2023-03-31 09:43:52 +11:00
Tobin C. Harding ee83c3a4f9
Bump MSRV to 1.48
We are upgrading the MSRV across the whole Rust Bitcoin ecosystem.

Update the README, clippy config file, and CI to use the new MSRV.
Changes to use the new MSRV will be done later.

Add mention of MSRV to `secp256k1-sys`, add unreleased section to both
changelogs.
2023-03-31 09:43:50 +11:00
Tobin C. Harding 0e2579fb96
Fix release date in changelogs
We have a typo in the release date of the cahngelogs, release was in
March not in the mythical 13th month.
2023-03-31 09:42:33 +11:00
Andrew Poelstra 11b8786a68
Merge rust-bitcoin/rust-secp256k1#591: Commit "minimal" and "latest" lockfiles
bd9d3c9de7 test: pin 'half' dependency on 1.41.1. (Andrew Poelstra)
7fc84191ee cargo fmt (Andrew Poelstra)
1b12cc5f58 contrib: commit "minimal" and "latest" tested lockfiles (Andrew Poelstra)
0494f50b1a fix correct minimal versions for serde crates (Andrew Poelstra)
b03602bfaa tests: replace cbor with more-recently-deprecated serde_cbor (Andrew Poelstra)

Pull request description:

  This is a proposed strategy for maintaining tested lockfiles in the rust-bitcoin ecosystem. The idea is that we would have both a "minimal" and a "latest" lockfile, and in both cases we have trusted crev reviews for all dependencies (this is not implemented here, I'd like to start by committing the lockfiles so we can agree what to review).

  Periodically we can update the "latest" one to reflect new versions of deps that we've gotten around to reviewing.

  I have local nix build scripts that are able to test every commit of proposed PRs against both lockfiles. In CI it is probably reasonable to at least do `cargo test --locked --all-features` with both of them, to make sure that the tests at least pass on each PR with them.

  Thoughts?

ACKs for top commit:
  sanket1729:
    ACK bd9d3c9de7. Verified the lockfiles. The latest one has a couple lines diff, but that is expected :) . minimal one is the same

Tree-SHA512: 6f14406a595aa6a6006b35828080b00b1b87209cb3dd6512c0e08eb92ae1ff27df005494189504cd5654eac1607cc98e902ccdd62b221cb865652c29dd958463
2023-03-30 21:36:11 +00:00
Andrew Poelstra 2ae7ca9cf2
secp-sys: update README for new vendoring script
Also a couple minor tweaks to the vendoring script itself.
2023-03-30 12:40:18 +00:00
Andrew Poelstra 4b02e9c405
run new vendor-libsecp.sh; fix upstream CHANGELOG. 2023-03-29 23:48:15 +00:00