Commit Graph

4462 Commits

Author SHA1 Message Date
Jose Storopoli 1948995443
ci: semver-check for non-additive cargo features
Co-authored-by: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com>
2024-07-25 12:19:54 -03:00
Jose Storopoli b5180732e6
io: add not_unwind_safe as PhantomData 2024-07-25 12:19:48 -03:00
merge-script d218848b36
Merge rust-bitcoin/rust-bitcoin#3037: `primitives`: Re-export `units` types
991c73cdf9 primitives: Re-export everything from units (Tobin C. Harding)
7a44908aee primitives: Use wildard re-export in locktimes (Tobin C. Harding)
d1c876eda5 Remove rustfmt attribute (Tobin C. Harding)
e3d9376a9b units: Remove serde re-export (Tobin C. Harding)

Pull request description:

  Re-export `units` types by doing:

  - Patch 1: Remove the public re-export of `serde` so that it does not shadow the private one in `primitives`
  - Patch2: Fix formatting (remove attribute and format)
  - Patch 3 and 4: Use wildcard re-exports

ACKs for top commit:
  Kixunil:
    ACK 991c73cdf9
  apoelstra:
    ACK 991c73cdf9

Tree-SHA512: dd71aa97fe5718a1229bfe26b776a72ebdd745a15a0e8ce8dae421c3a4c49f0f1e27d676056b24c35318cc3643a2ce712b4a69cc09f42b7c43259680bea931f3
2024-07-25 14:16:54 +00:00
Tobin C. Harding 6e6a0578de
Merge rust-bitcoin/rust-bitcoin#3101: Automated daily update to rustc (to nightly-2024-07-24)
33d0a95b8c Automated update to Github CI to rustc nightly-2024-07-24 (Update Nightly Rustc Bot)

Pull request description:

  Automated update to Github CI workflow `rust.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK 33d0a95b8c

Tree-SHA512: a33ed623396222f73f145187297a7f6f44532790328d4d6d6821067e6d5fa3a21d7d285e420aec5101af9e5b54c778f12812cfff418bc1526d63000f007e3c26
2024-07-24 22:39:31 -05:00
Update Nightly Rustc Bot 33d0a95b8c Automated update to Github CI to rustc nightly-2024-07-24 2024-07-25 01:33:20 +00:00
merge-script 1b83763cdc
Merge rust-bitcoin/rust-bitcoin#3083: Fix rustdocs in `blockdata`
3b15ef6d27 Fix rustdocs in `blockdata` (Jamil Lambert, PhD)

Pull request description:

  Following up on the [comment](https://github.com/rust-bitcoin/rust-bitcoin/pull/2646#discussion_r1548848611) in #2646 the rustdocs formatting was fixed in `blockdata`.

ACKs for top commit:
  Kixunil:
    ACK 3b15ef6d27
  tcharding:
    ACK 3b15ef6d27

Tree-SHA512: 509aa2b8ae559f5a7f8230c016c0866f468cc147773238e226b9a975784d7a424c41a5d966ddcf9b3f8f8d4fe197a4f272b5777c61f3cc53051803abb520b95e
2024-07-23 13:29:27 +00:00
Tobin C. Harding 991c73cdf9
primitives: Re-export everything from units
We recently decided to make everything in `units` available at the same
path as in `primitives` and not re-export the actual `units` crate.

Re-export everything from the `units` crate root at the `primitives`
crate root using a wildcard.
2024-07-23 02:04:11 -05:00
Tobin C. Harding 7a44908aee
primitives: Use wildard re-export in locktimes
We recently decided to use wildcard re-exports when re-exporting things
from an identically named module in a sub crate, ie. to mirror the
directory structure structure ala core/std.

In the `primitives::locktime` modules re-export everything from the
`units::locktime` modules using a wildcard.
2024-07-23 01:50:44 -05:00
Tobin C. Harding d1c876eda5
Remove rustfmt attribute
There are no other use statements so we do not need to keep the public
ones separate with a `rustfmt` attribute.

Remove the attribute and run the formatter.
2024-07-23 01:48:20 -05:00
Tobin C. Harding e3d9376a9b
units: Remove serde re-export
We re-export to help users keep their dependencies in sync but `serde`
is at `v1.0` so this is not really a problem.

Remove the public re-export of `serde` (and with current MSRV we don't
need the `extern crate` at all).
2024-07-23 01:41:41 -05:00
merge-script e7af76f1cd
Merge rust-bitcoin/rust-bitcoin#2936: Bump honggfuzz version
43360bdd74 Bump honggfuzz version (yancy)

Pull request description:

  Bump hongfuzz version

ACKs for top commit:
  apoelstra:
    ACK 43360bdd74
  tcharding:
    ACK 43360bdd74

Tree-SHA512: fe0e9e5a54fa2d4205a3d9974c19b86e57bfd5e525cd7f379c3c1b7ed15d37b03e6808a7cbf5c15b35bf69df820bd302fb81b5a8525fd3a09102aef13f3abf0d
2024-07-22 21:57:14 +00:00
Tobin C. Harding c82c052407
Merge rust-bitcoin/rust-bitcoin#3089: Automated daily update to rustc (to nightly-2024-07-21)
dbb5917128 Automated update to Github CI to rustc nightly-2024-07-21 (Update Nightly Rustc Bot)

Pull request description:

  Automated update to Github CI workflow `rust.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK dbb5917128

Tree-SHA512: 6f9a7939ff2eea6d07338cb75e393e319b2d38009dbad35e408bd23534e6240ef8c95a268b2316f7b81045eba7031e4269918a3841fe3353da966605ea752407
2024-07-22 14:26:55 -05:00
merge-script 5d20f2ec4c
Merge rust-bitcoin/rust-bitcoin#3085: Automated nightly rustfmt (2024-07-21)
61d46fffa8 2024-07-21 automated rustfmt nightly (Fmt Bot)

Pull request description:

  Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK 61d46fffa8
  apoelstra:
    ACK 61d46fffa8

Tree-SHA512: 405120e45a94687504796c0cfcfa613eb4b29037a5a10d263dccc22f501a6e8f91ddb832964fc8eac804c3007b73bddbbd41c14356647d14c15a81b5da0c0829
2024-07-22 19:20:03 +00:00
Update Nightly Rustc Bot dbb5917128 Automated update to Github CI to rustc nightly-2024-07-21 2024-07-22 01:36:12 +00:00
Fmt Bot 61d46fffa8 2024-07-21 automated rustfmt nightly 2024-07-21 01:11:38 +00:00
merge-script 84ed27b194
Merge rust-bitcoin/rust-bitcoin#3056: CONTRIBUTING: error/expect messages
0beefda7ea CONTRIBUTING: error/expect messages (Jose Storopoli)

Pull request description:

  - adds an item that all error messages
    should be lower case, except for proper nouns and variable names.
  - adds a section on expect messages,
    following discussion in #3019 and #3053.

  Closes #3053.

ACKs for top commit:
  tcharding:
    ACK 0beefda7ea
  Kixunil:
    ACK 0beefda7ea
  apoelstra:
    ACK 0beefda7ea

Tree-SHA512: b924245e5d18d4f627d4998073422003def789c87502bca121d5db443f5bbe387bfe951664458c9495a6ea0995b6ccf6e28d1784e19dfb876d7eddf3c6209727
2024-07-19 17:07:01 +00:00
merge-script e1478b1802
Merge rust-bitcoin/rust-bitcoin#3069: Remove re-export of `ParseIntError`
ab581a90f8 Remove re-export of ParseIntError (Tobin C. Harding)

Pull request description:

  In d242125 I claimed that `ParseIntError` was somehow special, I no longer thing this is the case. As we pin down the re-export policy (for errors and other types) it is hard if we have one non-typical re-export.

  We have https://github.com/rust-bitcoin/rust-bitcoin/issues/3068 to discuss the policy, for now just remove the unusual re-export.

ACKs for top commit:
  Kixunil:
    ACK ab581a90f8
  shinghim:
    ACK ab581a90f8
  apoelstra:
    ACK ab581a90f8

Tree-SHA512: 5ac4123aeb27c8cee78e5760f21e70be8035d526ba7e14e72759cba27f98b51cc2cba9b2bf0eeb99e0f6b7210ec4a750986bb6c5dc0725ed892730fdec8a7e06
2024-07-19 15:36:21 +00:00
merge-script ff5d437d42
Merge rust-bitcoin/rust-bitcoin#3067: Move `params` to the `network` module
54c30556a2 Move params to network module (Tobin C. Harding)
045a661ebe Create network directory (Tobin C. Harding)

Pull request description:

  Discussed in #2779. Patch one moves `network.rs` to `network/mod.rs`, and patch 2 moves the `params` module over there.

ACKs for top commit:
  apoelstra:
    ACK 54c30556a2 Yeah, this seems like a good place for it
  Kixunil:
    ACK 54c30556a2

Tree-SHA512: 134813419db21323d303d465b12fcbf37fd61dc1baf3305e156d324eafd822379e63dede02877ee99dce41540193a29e6e13acd13f9121f3e2fe11096524aa5e
2024-07-19 14:10:26 +00:00
Tobin C. Harding 1c3f39e99e
Merge rust-bitcoin/rust-bitcoin#3080: Automated daily update to rustc (to nightly-2024-07-17)
04bcb7950d Automated update to Github CI to rustc nightly-2024-07-17 (Update Nightly Rustc Bot)

Pull request description:

  Automated update to Github CI workflow `rust.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK 04bcb7950d

Tree-SHA512: 2b2a02fd5eb5dfcc1e8b1551ef66180d76019655262a5eebeb6e849885db5e37c495cd9d1108ce550b9401c446a5abf2ca30508eb3d1139a807188b668d232ef
2024-07-19 08:06:42 +10:00
merge-script 128684e0da
Merge rust-bitcoin/rust-bitcoin#3058: Improve `define_extension_trait`
386ad93253 Manually format function parameters (Tobin C. Harding)
871f4398b9 Add optional comma to function parameter list (Tobin C. Harding)

Pull request description:

  During #2955 I was lazy and did not think through why the macro didn't handle function parameters on individual lines, I just manually re-formatted all function calls onto a single LOC. This was a bit slack of me.

  - Patch 1: Fix the macro.
  - Patch 2: Revert the manual formatting.

ACKs for top commit:
  jamillambert:
    ACK 386ad93253
  Kixunil:
    ACK 386ad93253
  apoelstra:
    ACK 386ad93253

Tree-SHA512: 577154668a4cd0bad225a5b306193a5cd3d38d275dd5df22b4a29737e0d2c910c695da33c0ed77265f6c5d876c162316e444f8eca80f9c30788d110d989493e3
2024-07-18 21:48:19 +00:00
merge-script 8804fa63b4
Merge rust-bitcoin/rust-bitcoin#3064: Remove public error re-export
beea3c1e5d Remove public error re-export (Tobin C. Harding)

Pull request description:

  We do not have a policy to re-export things from other modules just because they are in the public API - I don't see any other reason to re-export this error, users should go to the `validation` module directly to get the error type.

  Raising this trivial change as a separate PR so that we can really pin down our re-export policy. Please review the policy implications as well as the code change.

  Note please that this change was introduced in 7d695f6b4 by me, and buried in a PR that did not mention the change. This was wrong, as in the code change was wrong and also the patching method was wrong.

ACKs for top commit:
  Kixunil:
    ACK beea3c1e5d

Tree-SHA512: 5fc072f3fb8a727f30751211c6bc85dc268d413ee62937c714bdf9f47405dfdbc93cfff3df76c201493c39f49d5d315907fc9e7e4fa0d927652c01038815fdc5
2024-07-18 15:48:47 +00:00
merge-script a28f11c9fb
Merge rust-bitcoin/rust-bitcoin#3062: Add more unit test coverage for relative LockTime
a76c13f675 Add more unit test coverage for relative LockTime (Shing Him Ng)

Pull request description:

  Adding some test cases for `from_seconds_floor` and one more for `from_seconds_ceil`

ACKs for top commit:
  tcharding:
    ACK a76c13f675
  Kixunil:
    ACK a76c13f675

Tree-SHA512: 5d773a30fa56842af21109d232ec3eae7fde7ce38aca93dadccc7bfbf14d5207ea329ef737f847e45ba755fd22e1862c3e78e7e64a8a0babebcb0e27a2bb7a90
2024-07-18 14:21:46 +00:00
Jamil Lambert, PhD 3b15ef6d27 Fix rustdocs in `blockdata`
Following up on the comment in #2646 the rustdocs formatting was fixed.
2024-07-18 11:04:35 +01:00
Update Nightly Rustc Bot 04bcb7950d Automated update to Github CI to rustc nightly-2024-07-17 2024-07-18 01:25:40 +00:00
Jose Storopoli 0beefda7ea
CONTRIBUTING: error/expect messages
- adds an item that all error messages
  should be lower case, except for proper nouns and variable names.
- adds a section on expect messages,
  following discussion in #3019 and #3053.
2024-07-17 16:07:05 -03:00
Tobin C. Harding ab581a90f8
Remove re-export of ParseIntError
In d242125 I claimed that `ParseIntError` was somehow special, I no
longer thing this is the case. As we pin down the re-export policy (for
errors and other types) it is hard if we have one non-typical re-export.

We have https://github.com/rust-bitcoin/rust-bitcoin/issues/3068 to
discuss the policy, for now just remove the unusual re-export.
2024-07-17 08:01:32 +10:00
Tobin C. Harding 54c30556a2
Move params to network module
The `Params` struct is currently defined in the `consensus` module which
has become a collection of orthogonal consensus-ish things. We would
like to put things in more descriptive places.

The `Params` struct defines constants that are network specific so it
makes sense to put it in the `network` module. As soft proof of this
argument note in this patch how often the `Params` type is imported
along with the `Network` type.

API break:

The type is no longer available at `bitcoin::consensus::Params` but
rather is re-exported at `bitcoin::network::Params`.
2024-07-17 07:39:34 +10:00
Tobin C. Harding 045a661ebe
Create network directory
In preparation for moving the `Params` struct to the `network` module
add a directory and move `network.rs` to `network/mod.rs`.
2024-07-17 07:19:27 +10:00
Tobin C. Harding beea3c1e5d
Remove public error re-export
We do not have a policy to re-export things from other modules just
because they are in the public API - I don't see any other reason to
re-export this error, users should go to the `validation` module
directly to get the error type.
2024-07-17 06:52:15 +10:00
merge-script 59c806996c
Merge rust-bitcoin/rust-bitcoin#3028: ci: fix semver-checks master
6ab8f99731 ci: fix semver-checks master (Jose Storopoli)

Pull request description:

  Ok now I think I've nailed this! 🚀
  Closes #3018.

  ## Summary

  This PR fix the permissions by adding a secondary job, `semver-checks-pr-label`, that runs only if the `semver-checks` completes and does not fail, i.e. we have either Semver API breaks.
  This is a secure job according to internal discussions and https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run

  ## Implementation notes

  We split the semver checks into the actual check and labeling. This is due to the fact that we were having several permission issues and the original implementation was insecure. Also it is currently failing on several PRs.
  1. `semver-checks.yml`: checks for API semver breaks. Upon finding API semver-checks, it creates a file named `semver-break` that has the PR number inside. If this file is present we upload an artifact representing that the API semver was broken with the PR number.
  2. `semver-checks-pr-label.yml`: runs after the `semver-checks.yml` is completed. It uses `actions/github-script` (in JavaScript) to list the previous workflow artifacts and, if finds that an API semver break is present, adds a corresponding label and a comment to the PR that is inside the file `semver-break`. We sanitize the hell out of the thing to be a number only, both in BASH but also in JavaScript.

  ## How I tested this?

  1. I merged this PR to my `master` branch in my `storopoli/rust-bitcoin` repo.
  2. I've set the following settings in the repo settings to mimic what we have for `rust-bitcoin`:

     ![image](https://github.com/user-attachments/assets/7bea176f-c67c-4c0c-94ba-d7775af9fdb5)

  3. I've made a PR (cherry-picked from Toby) that breaks semver, see https://github.com/storopoli/rust-bitcoin/pull/10. It correctly labelled as `API break` and added a comment to the PR

    ![image](https://github.com/user-attachments/assets/b64fba4f-e78a-4989-b9b6-a5f67b914174)

ACKs for top commit:
  Kixunil:
    ACK 6ab8f99731
  apoelstra:
    ACK 6ab8f99731 thanks for sticking with this\!\!

Tree-SHA512: 27385d6d4a40b5ffc3b95f00ad34010fabe5f1f9442d258b4cb433807bc663fc70b98c7c632048f05929cad073fd81ac6217f72016740b72db7575dac9d3939b
2024-07-16 20:19:06 +00:00
Tobin C. Harding 386ad93253
Manually format function parameters
Now that the `define_extension_trait` can handle function parameters on
individual lines revert the manual formatting that was introduced in
PR #2955.

Refactor only, no logic changes.
2024-07-17 06:15:37 +10:00
Tobin C. Harding 871f4398b9
Add optional comma to function parameter list
The `define_extension_trait` macro currently does not allow for a
trailing comma in the function paramater list, this occurs when the
function paramaters are put on individual lines (eg by `rustfmt`).

Extend the macro to support function paramaters being on individual
lines. This should have been done originally instead of my manual
override of formatting - bad Tobin no biscuit.
2024-07-17 06:15:32 +10:00
Shing Him Ng a76c13f675 Add more unit test coverage for relative LockTime 2024-07-16 12:19:13 -05:00
merge-script 2cfa570639
Merge rust-bitcoin/rust-bitcoin#3047: Remove unused variable from LockTime example
86f82b487d Remove unused variable from LockTime example (Shing Him Ng)

Pull request description:

  Following up on [a comment](https://github.com/rust-bitcoin/rust-bitcoin/pull/3026#discussion_r1676744486) from #3026 and removing an unused variable from the LockTime example

ACKs for top commit:
  tcharding:
    ACK 86f82b487d
  Kixunil:
    ACK 86f82b487d

Tree-SHA512: 526d42e68297e9670953f7aadfbf624b7bc20f1bf95b3e5ff66a58871967e38eca917d9ee9c385cf40ed7d9a867cb081ef17f2aa3683138f6fc55a74414a83f6
2024-07-16 16:17:50 +00:00
merge-script 8eb5d8fad0
Merge rust-bitcoin/rust-bitcoin#3019: Fix error messages
2169b75bba Use lower case error messages (Jamil Lambert, PhD)

Pull request description:

  Error messages should be lower case, except for proper nouns and variable names.  These have all been changed.

  ~~They should also state what went wrong.  Some expect error messages were positive, giving the correct behaviour or correct input.  These have been changed so that they are now negative, i.e. saying what went wrong.~~

  EDIT: After further discussion it was decided not to change the expect messages.

ACKs for top commit:
  Kixunil:
    ACK 2169b75bba
  tcharding:
    ACK 2169b75bba

Tree-SHA512: 92442c869e0141532425f6fca5195fd319b65026f68c4230a65ad70253565d98931b2b44ee202975c307280525c505147e272297dc81207312e40c43d007021c
2024-07-16 15:30:26 +00:00
merge-script f765deb160
Merge rust-bitcoin/rust-bitcoin#3052: Throw error instead of panic when from_second_ceil input is too large
7874db8fc3 Throw error instead of panic when from_second_ceil input is too large (Shing Him Ng)

Pull request description:

  Update `from_second_ceil` per [comment](https://github.com/rust-bitcoin/rust-bitcoin/issues/3029#issuecomment-2227459248) and add unit tests

  Resolves #3029

ACKs for top commit:
  Kixunil:
    ACK 7874db8fc3
  tcharding:
    ACK 7874db8fc3

Tree-SHA512: 0d60397f867d4536ff00b81441c27ea3dc4bf9e5ecc2fb5afbe50cb3153101df54c2bb5056da1916d83c3e84367f987f5bac07a381b7433a5701a0ea8a587f95
2024-07-16 13:36:23 +00:00
merge-script 3980d6e6e4
Merge rust-bitcoin/rust-bitcoin#3051: Automated daily update to rustc (to nightly-2024-07-14)
580c2cf246 Automated update to Github CI to rustc nightly-2024-07-14 (Update Nightly Rustc Bot)

Pull request description:

  Automated update to Github CI workflow `rust.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK 580c2cf246

Tree-SHA512: 0b01575733d6b4d70be9b00d55d53670db33324498cef991e5beca052a3b59bcbb128351a677ab83773855b3b57cacd4c7f08e93079387d67229d1014666cfae
2024-07-16 09:49:50 +10:00
merge-script 12f47c72c5
Merge rust-bitcoin/rust-bitcoin#3030: Rename variable assignment
84dd04cf60 Rename variable assignment (yancy)

Pull request description:

  The type created after assignment is a Weight type.  Using a var name vb which is short for virtual byte is incorrect.

  Pulled this out of stale PR 2215

ACKs for top commit:
  shinghim:
    ACK 84dd04cf60
  apoelstra:
    ACK 84dd04cf60
  Kixunil:
    ACK 84dd04cf60

Tree-SHA512: 1bfc875f53037b2c1e8da25fe44e9ca3303981bdce4e48661a8fb2061833e3cd90318d854f7119c805e861cd8a591697378f829f32eb74ac99a71dc4c947abde
2024-07-15 22:40:37 +00:00
Shing Him Ng 86f82b487d Remove unused variable from LockTime example 2024-07-15 17:03:12 -05:00
merge-script 36d5c471cf
Merge rust-bitcoin/rust-bitcoin#3032: Move impl above tests
301fe9fad9 Move impl above tests (yancy)

Pull request description:

  It's common in other modules for the tests to be at the end of the file. Moving the tests to the bottom helps the code base uniformity.

  Pulled from stale PR 2215

ACKs for top commit:
  shinghim:
    ACK 301fe9fad9
  tcharding:
    ACK 301fe9fad9
  Kixunil:
    ACK 301fe9fad9

Tree-SHA512: c749c4c2c5fba2c8a57fe034d4ef5d34ff26baddb1b2148b9778dc554c955ad31c7bc83b89a3647228bf5f175adddb03105a1e494b28f5a7955369abaa11cfd1
2024-07-15 21:57:36 +00:00
merge-script 6d483585df
Merge rust-bitcoin/rust-bitcoin#2991: Move locktimes and `Sequence` to `primitives`
64c31cfb97 Move locktimes and Sequence to primitives (Tobin C. Harding)

Pull request description:

  The `absolute` and `relative` locktimes as well as the `Sequence` are all primitive bitcoin types.

  Move the `Sequence`, and `locktime` stuff over to `primitives`.

  There is nothing surprising here, the consensus encoding stuff stays in `bitcoin` and we re-export everything from `blockdata`.

  Note please `Sequence` is no longer publicly available at `bitcoin::transaction::Sequence` but it is available at `bitcoin::Sequence`.

ACKs for top commit:
  Kixunil:
    ACK 64c31cfb97
  apoelstra:
    ACK 64c31cfb97

Tree-SHA512: 968aa595bfb53e8fcfa860dae797ec5381ed49c67326a8ef9494086ec65d737502dffe4b24143e159042d07c59c5109d50103029082f87e1c3c26671e975f1b3
2024-07-15 21:13:41 +00:00
merge-script e137a2cfb6
Merge rust-bitcoin/rust-bitcoin#3048: Rename key field in Key to key_data
02e7933fe4 Rename key field in Key to key_data (Shing Him Ng)

Pull request description:

  Follow-up change from [a comment](https://github.com/rust-bitcoin/rust-bitcoin/pull/3022#issuecomment-2226166039) in #3022 that updates the `key` field in the PSBT `Key` to `key_data`, which more closely follows the doc

ACKs for top commit:
  tcharding:
    ACK 02e7933fe4
  Kixunil:
    ACK 02e7933fe4

Tree-SHA512: 67cc621e9f5b326f96c3f08e340acecf60b1d03d25bbd012998bab34f49e96c4dca9f5dc24047f743f1a1b6fcaa5d3c166f2e4cf2ea96d4375c9b1b041d3196f
2024-07-15 17:50:41 +00:00
yancy 84dd04cf60 Rename variable assignment
The type created after assighnment is a Weight type.  Using a var name
vb which is short for virtual byte is incorrect.
2024-07-15 10:05:47 -05:00
merge-script c50796c238
Merge rust-bitcoin/rust-bitcoin#2981: Remove to/from/as_raw_hash functions
2b56f763d0 hashes: Remove to/from/as_raw_hash (Tobin C. Harding)

Pull request description:

  In an effort to shrink the API of `hashes` remove the `from_raw_hash`, `to_raw_hash`, and `as_raw_hash` inherent functions from types created with the `hash_newtype` macro.

  There are a few reasons why this is favourable:

  - It allows stable crates to use the macro and not expose unstable `hashes` types in their API.
  - It makes types created with the macro less "general" in the sense that its more obscure to just hash any data into them. This allows us to write cleaner APIs in `rust-bitcoin`.

ACKs for top commit:
  Kixunil:
    ACK 2b56f763d0
  apoelstra:
    ACK 2b56f763d0

Tree-SHA512: 3d73aa8250dd775994623c9201dd819256acf2ec82526b3537da74c9e19c2ac5e8bba358a2171f7b02342804cb6b4d5ac4dca88d912b3d46d14e3bc35dd5cb91
2024-07-15 13:53:37 +00:00
Shing Him Ng 7874db8fc3 Throw error instead of panic when from_second_ceil input is too large 2024-07-15 07:55:41 -05:00
Jose Storopoli 6ab8f99731
ci: fix semver-checks master 2024-07-15 12:21:04 +00:00
Jamil Lambert, PhD 2169b75bba Use lower case error messages
Error messages should start with a lower case character unless it is a
proper noun.

This has been changed everywhere.
2024-07-15 09:25:08 +01:00
Update Nightly Rustc Bot 580c2cf246 Automated update to Github CI to rustc nightly-2024-07-14 2024-07-15 01:35:29 +00:00
Shing Him Ng 02e7933fe4 Rename key field in Key to key_data 2024-07-14 18:12:24 -05:00
Tobin C. Harding 64c31cfb97
Move locktimes and Sequence to primitives
The `absolute` and `relative` locktimes as well as the `Sequence` are
all primitive bitcoin types.

Move the `Sequence`, and `locktime` stuff over to `primitives`.

There is nothing surprising here, the consensus encoding stuff stays in
`bitcoin` and we re-export everything from `blockdata`.
2024-07-15 08:53:51 +10:00