Commit Graph

6629 Commits

Author SHA1 Message Date
merge-script cc66dde4f4
Merge rust-bitcoin/rust-bitcoin#4518: Release tracking for chacha20-poly1305 v0.1.2
ea0a31876f release: prep chacha20-poly1305 crate for 0.1.2 (Nick Johnson)

Pull request description:

  Getting out this big bug fix for performance: https://github.com/rust-bitcoin/rust-bitcoin/pull/4083

ACKs for top commit:
  tcharding:
    ACK ea0a31876f
  apoelstra:
    ACK ea0a31876f7111d865d30ba0448801f4049aa42a; successfully ran local tests

Tree-SHA512: b6667cc3dd3c5ef1498bbcc7907e620c32b62333b1b2cc4b5afb041e41d362d3731bb72f4cbfe6fc7801fd4523d98c54d9497aa51efc0281acbfb418dbd8e3cf
2025-05-19 16:50:54 +00:00
merge-script 0160ac59ce
Merge rust-bitcoin/rust-bitcoin#4512: Remove Display/FromStr for FeeRate
29b12bec6b Remove Display/FromStr for FeeRate (Tobin C. Harding)

Pull request description:

  Parsing and displaying strings is a PITA. `FeeRate` is likely not that heavily used at the moment and users can always just call `to_sat_per_kwu()` to format it.

  So we can get the `units-1.0-alpha.0` release out the door just remove the `Display` and `FromStr` impls for now. They can be added back in later when we have time to get #4339 in.

ACKs for top commit:
  apoelstra:
    ACK 29b12bec6b34148d6df9a4e6207132a667c53b4c; successfully ran local tests

Tree-SHA512: ffb49ab5d4f98be603eb1ca2f2e9d28ff7eaae66607eb9d2d5fef1f98ba2ac284a0007a86c3cae88f06e5b44f1e3e3ecb2014323b82ad4007e8ec59d6d04759b
2025-05-19 14:06:53 +00:00
frankomosh ade7ea5fcf psbt: replace the fee rate magic numbers with named constants in tests
Replace a hardcoded fee rate numbers in PSBT high-fee checks test with named
constants.

Close #4378
2025-05-18 22:04:41 +03:00
Fmt Bot d9ec934251 2025-05-18 automated rustfmt nightly 2025-05-18 01:40:39 +00:00
merge-script e541221950
Merge rust-bitcoin/rust-bitcoin#4521: feat(p2p): add `AddrV2` <> `SocketAddr` conversions
a1d4bc31e5 test(p2p): add tests for `AddrV2` <> `SocketAddr` conversions (Luis Schwab)
64387f566e feat(p2p): add `AddrV2` <> `SocketAddr` conversions (Luis Schwab)

Pull request description:

  Closes #4436.

  Note: I made the `AddrV2::Cjdns` to `SocketAddr` conversion throw the `CjdnsNotRecommended` error. Do we want this behavior or just assume the user knows what he is doing? cc Kixunil

  ### Changelog
  - Implement `From<SocketAddr> for AddrV2`.
  - Implement `TryFrom<AddrV2> for SocketAddr`.
  - Implement `AddrV2ConversionError` enum and it's `fmt::Display`.
  - Tests for these conversions.

ACKs for top commit:
  apoelstra:
    ACK a1d4bc31e5c7cfe0227db64aec8671efcc0c6677; successfully ran local tests
  tcharding:
    ACK a1d4bc31e5

Tree-SHA512: c11f3053428d2c8ca971bbc6bc4ad4619260fe95cba055586f4889d7397733f7d286dcafa111234a6be4a739fd56cdd7e64dbf71b106a71d2483794ca7018105
2025-05-17 18:23:56 +00:00
merge-script a095580fbb
Merge rust-bitcoin/rust-bitcoin#4523: Automated daily update to rustc (to nightly-2025-05-16)
0cd224deba Automated update to Github CI to rustc nightly-2025-05-16 (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 0cd224deba

Tree-SHA512: a9e1b4bccddfe1dfb02e4f664668594800605882b773435b79d17b952df7cb77babada76a25153712ad386ab11ecd21e7c1f465869412ca69920b72fab8394b5
2025-05-17 14:52:30 +00:00
merge-script 8985c9e5c4
Merge rust-bitcoin/rust-bitcoin#4522: fix(taproot): raname `from_key_and_tweak` to `from_key_and_merkle_root`
d74eede260 fix(taproot): raname `from_key_and_tweak` to `from_key_and_merkle_root` (Luis Schwab)

Pull request description:

  Closes #4236.

  ### Changelog
  - Rename `TapTweakHash::from_key_and_tweak` to `TapTweakHash::from_key_and_merkle_root`. The naming was just wrong, since a TapTweak takes in a public key and a Merkle root to produce a tweak.

ACKs for top commit:
  apoelstra:
    ACK d74eede26064a40d70c7aeb3335b9a4a28eb6bd9; successfully ran local tests
  tcharding:
    ACK d74eede260

Tree-SHA512: 03fdb73758f965290c083165b23a0345325e475f159aa76ff141a9aa3251960041366ddf195b74cada7b289d4493190cf9b17130736002d48b6fac68941012fb
2025-05-17 11:54:47 +00:00
Update Nightly Rustc Bot 0cd224deba Automated update to Github CI to rustc nightly-2025-05-16 2025-05-17 01:53:56 +00:00
merge-script 27caa6bb21
Merge rust-bitcoin/rust-bitcoin#4517: Automated weekly update to rustc stable (to 1.87.0)
86089691bf Automated update to Github CI to rustc stable-1.87.0 (Update Stable Rustc Bot)

Pull request description:

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

ACKs for top commit:
  tcharding:
    ACK 86089691bf

Tree-SHA512: 9ef62016ed9224f8cb34ba0071274c00440de1991ba570e97fda4b698a2696882332ffef407a18ed081afe2012e3a7ba3629c4f8b492a2c5f4b186f974d998bc
2025-05-17 01:52:17 +00:00
Luis Schwab d74eede260
fix(taproot): raname `from_key_and_tweak` to `from_key_and_merkle_root` 2025-05-16 19:51:59 -03:00
Tobin C. Harding 29b12bec6b
Remove Display/FromStr for FeeRate
Parsing and displaying strings is a PITA. `FeeRate` is likely not that
heavily used at the moment and users can always just call
`to_sat_per_kwu()` to format it.

So we can get the `units-1.0-alpha.0` release out the door just remove
the `Display` and `FromStr` impls for now. They can be added back in
later when we have time to get #4339 in.
2025-05-17 08:20:17 +10:00
merge-script 532345bd11
Merge rust-bitcoin/rust-bitcoin#4508: units: Make block-related types have private inner fields
9a9b41008f units: Make block-related types have private inner fields (Tobin C. Harding)

Pull request description:

  We recently added a bunch of types in the `block` module that are wrappers around `u32`. When we did we slapped `pub` on the inner fields.

  Lets be more mindful and make the inner fields private. Note all these types have `to_u32`, `from_u32` and `From` in both directions.

ACKs for top commit:
  apoelstra:
    ACK 9a9b41008f72cb8a00cfed2890d839aea2ea27c7; successfully ran local tests

Tree-SHA512: d4719bef57944000142ec110d4701486b4a7e5c5b24426379ed596ad83555ca1f75191fe618cc62f12b78b9d7a1ac5d18eff96bc407c9688b1210529c25329b3
2025-05-16 19:54:28 +00:00
merge-script e619364f5c
Merge rust-bitcoin/rust-bitcoin#4503: Fix up script to/from hex
2c0f388108 Fix up script to/from hex (Tobin C. Harding)

Pull request description:

  We (I) have recently done to PRs patching the way we handle converting scripts to and from hex.

  In doing these I made a mess of the deprecation because after both PRs were in I had managed to change the return type and the behaviour of the deprecated function.

  On top of that the docs were either outright wrong or not that clear.

  Props to Kix for doing post merge review and finding my mistakes.

  Close #4498

ACKs for top commit:
  apoelstra:
    ACK 2c0f3881085ba540d517de121d4ba005f9e73a8c; successfully ran local tests

Tree-SHA512: 8bd8590c07efdbfcf113bfcb4b96dc01992c4f215a11e4a1b1f907c8ae9fa47d83c29298bd9b2afc2628b12eb51afd023a48f241a456a0e02a37854b41f6654b
2025-05-16 19:14:34 +00:00
Nick Johnson ea0a31876f
release: prep chacha20-poly1305 crate for 0.1.2 2025-05-15 19:40:15 -07:00
Update Stable Rustc Bot 86089691bf Automated update to Github CI to rustc stable-1.87.0 2025-05-16 01:04:31 +00:00
Luis Schwab a1d4bc31e5
test(p2p): add tests for `AddrV2` <> `SocketAddr` conversions 2025-05-15 21:42:54 +00:00
Luis Schwab 64387f566e
feat(p2p): add `AddrV2` <> `SocketAddr` conversions 2025-05-15 21:21:21 +00:00
merge-script ef5e3256df
Merge rust-bitcoin/rust-bitcoin#4509: fix: add author to the chacha20_poly1305 crate
b17452b77a fix: add authors to the chacha20_poly1305 crate (Nick Johnson)

Pull request description:

  Closes #4501

ACKs for top commit:
  rustaceanrob:
    ACK b17452b77a
  tcharding:
    ACK b17452b77a
  apoelstra:
    ACK b17452b77a2034074d97673450b61f7d9f9b6039; successfully ran local tests

Tree-SHA512: 7c47affbcfc1cfa8a7591076d8b74e15e936af9251ba0d375ce0701175f9966e86b56fed5202945df96b7294d431d3b02dc3c7fc2749c96ac96afa3888f2039f
2025-05-15 18:16:54 +00:00
merge-script 35a49993c8
Merge rust-bitcoin/rust-bitcoin#4083: Improve chacha20 cipher performance
1ca55ac77d chacha20_poly1305: inline simd functions (Nick Johnson)
30920c4d84 chacha20_poly1305: drop mutable requirement (Nick Johnson)
415945cd2b chacha20_poly1305: avoid duplicate block work (Nick Johnson)
33dc1b95fa chacha20_poly1305: swap tuple for array (Nick Johnson)
dadd1d7224 chacha20_poly1305: remove alignment (Nick Johnson)
36d45bf360 chacha20_poly1305: remove mod operator (Nick Johnson)

Pull request description:

  Inspired by JeremiahR's new benchmark on the chacha20 module, I dug in and found a few tweaks (and a larger refactor) which help a lot with performance.

  The tweaks are broken down by commit. One of the relatively fruitful ones (5% increase) was refactoring the U32x4's rotation methods to use hardcoded matches instead of the mod operator. Others saw more modest performance gains.

  The big change though was to *not* calculate two blocks for each keystream call (oops). I refactored the logic to handle the offset state (which is technically not required for BIP324, but as seen here, can be confusing to not have) and now we always calculate just the required amount of a keystream. This about doubles the performance.

  For the curious, the SIMD performance isn't very impressive at this point, just a modest increase. But I have some hope that the experimental core library U32x4 will bring a nice bump (it is implemented with some unsafe hacking) and be an easy refactor.

ACKs for top commit:
  apoelstra:
    ACK 1ca55ac77db698f3816d8b7ed4051ddb5a579a29; successfully ran local tests
  tcharding:
    ACK 1ca55ac77d

Tree-SHA512: 8db1c6144d172775164859ffd0d97021f90d9123d06b5cccde21800aec4dcea75a5753d547933288ae233caf82e92849f894fb7019537d188baf10fbf7019684
2025-05-15 12:47:00 +00:00
Nick Johnson b17452b77a
fix: add authors to the chacha20_poly1305 crate 2025-05-14 20:51:34 -07:00
Tobin C. Harding 9a9b41008f
units: Make block-related types have private inner fields
We recently added a bunch of types in the `block` module that are
wrappers around `u32`. When we did we slapped `pub` on the inner fields.

Lets be more mindful and make the inner fields private. Note all these
types have `to_u32`, `from_u32` and `From` in both directions.
2025-05-15 12:58:15 +10:00
merge-script 11ceadb242
Merge rust-bitcoin/rust-bitcoin#4504: CI: Manually remove trailing whitespace
64844131de CI: Manually remove trailing whitespace (Tobin C. Harding)

Pull request description:

  `rustfmt` bad robot, remove trailing whitespace already.

ACKs for top commit:
  apoelstra:
    ACK 64844131dee5c6f02a345648674a8962e2586c61; successfully ran local tests

Tree-SHA512: d131fdbfdb049223d4f89c31b7138ba4fd9a32b469d4631e5efec9ec5405564ceec4ed5fb6253ca4eb99505e2b78c78717115ad57f3c648e837d4a4853b5f023
2025-05-14 21:30:36 +00:00
merge-script 1b709eb460
Merge rust-bitcoin/rust-bitcoin#4506: units: Manually implement serde traits
e2d03fef72 units: Manually implement serde traits (Tobin C. Harding)

Pull request description:

  For types that have private inner fields we would like to manually implement `serde` traits instead of deriving them.

  This hardens the crate against making future mistakes if we want to change the inner fields.

  Do so for:

  - `Weight`
  - `BlockTime`
  - `NumberOfBlocks`
  - `NumberOf512seconds`

ACKs for top commit:
  apoelstra:
    ACK e2d03fef72f4fcbdacd1cbecc0c2dddfbdeb3031; successfully ran local tests

Tree-SHA512: 6d3cc4106e44e08d59f8da6f8f3285923408ed05d1c0b2f6f2d83a22718744a38bf67381177856b5713810a5f5318d929daa2d12447c722628e0576fcd075e3d
2025-05-14 16:13:10 +00:00
merge-script 5533d3ee79
Merge rust-bitcoin/rust-bitcoin#4505: units: `serde` cleanup
980365097d Fix expecting string for amount types (Tobin C. Harding)
3658865a18 Fix expecting string for fee_rate (Tobin C. Harding)
d6940497fd Simplify fee_rate serde deserialize opt (Tobin C. Harding)
87d6f1718c Make serde attribute usage more terse (Tobin C. Harding)

Pull request description:

  Clean up the `serde` stuff for `FeeRate` and `Amount`. This is all pretty trivial.

ACKs for top commit:
  apoelstra:
    ACK 980365097d44fc8ebb8e0b1327058a59ae62a439; successfully ran local tests

Tree-SHA512: 70d3b5245f69c87b03ed2259bb6eefc93d075c6246f1fae3e4cc14934f41bbcf6cb6d69b3a3986b3b382bb00f3457a2f7be91e8b805823db4f802a086f2f27e4
2025-05-14 15:27:25 +00:00
Tobin C. Harding e2d03fef72
units: Manually implement serde traits
For types that have private inner fields we would like to manually
implement `serde` traits instead of deriving them.

This hardens the crate against making future mistakes if we want to
change the inner fields.

Do so for:

- `Weight`
- `BlockTime`
- `NumberOfBlocks`
- `NumberOf512seconds`
2025-05-14 14:31:39 +10:00
Tobin C. Harding 980365097d
Fix expecting string for amount types
According to the `serde` docs:

> This is used in error messages. The message should complete the
> sentence “This Visitor expects to receive …”, for example the message
> could be “an integer between 0 and 64”. The message should not be
> capitalized and should not end with a period.

Use a lower case character to start the string.
2025-05-14 12:31:16 +10:00
Tobin C. Harding 3658865a18
Fix expecting string for fee_rate
According to the `serde` docs:

> This is used in error messages. The message should complete the
> sentence “This Visitor expects to receive …”, for example the message
> could be “an integer between 0 and 64”. The message should not be
> capitalized and should not end with a period.

However we have the `expecting` str using the converted type not the
thing the visitor expects.

Use `u64` instead of `FeeRate` since that is what is being parsed. Note
that in `amount` we got it _almost_ correct, subsequent patch will fix
the case.
2025-05-14 12:30:37 +10:00
Tobin C. Harding d6940497fd
Simplify fee_rate serde deserialize opt
We can just call through to the `deserialize` function. Reduces code
duplication and increases maintainability.

Refactor only, no logic change.
2025-05-14 12:25:33 +10:00
Tobin C. Harding 87d6f1718c
Make serde attribute usage more terse
The `serde` attribute can be made more terse in docs and tests with no
loss of clarity.

Refactor and docs only, no logic change.
2025-05-14 12:13:38 +10:00
merge-script 4e094d6e81
Merge rust-bitcoin/rust-bitcoin#4500: refactor: Use map combinator instead of match
642c414f56 refactor: Use map combinator instead of match (yancy)

Pull request description:

  Use map combinator instead of match

ACKs for top commit:
  apoelstra:
    ACK 642c414f56b03222d25fb9f11260029c5ffb6a9a; successfully ran local tests
  tcharding:
    ACK 642c414f56

Tree-SHA512: b107315bb3ac944b71b2aa0de60005e5c9cfd2affda725e795dae9e4c190a5ccabf657211199bd2e884aed63e5335ffe79281e9060025103e14d5c7604f229d1
2025-05-14 01:46:29 +00:00
Tobin C. Harding 64844131de
CI: Manually remove trailing whitespace
`rustfmt` bad robot, remove trailing whitespace already.
2025-05-14 11:08:24 +10:00
merge-script fc373f3a37
Merge rust-bitcoin/rust-bitcoin#4461: Implementing Div<NonZeroU64|I64> for Amount, SignedAmount, FeeRate, and and Weight
fe577cd04e Implement Div<NonZeroU64|I64> for Amount, SignedAmount, FeeRate, and Weight (frankomosh)

Pull request description:

  The pr implements `Div<NonZeroU64>` and `Div<NonZeroI64>` for the following types in `units` crate: `Amount`, `SignedAmount`, `FeeRate`, `Weight`

  For handling owned/borrowed variants, each impl is wrapped in the existing `impl_op_for_references!` macro, which generates: `T  / NonZero*` , `&T / NonZero*`, `T  / &NonZero*`, `&T / &NonZero*`

  close: #4442

ACKs for top commit:
  Kixunil:
    ACK fe577cd04e
  apoelstra:
    ACK fe577cd04e64488371aa62b872e2b88050d4948f; successfully ran local tests
  tcharding:
    ACK fe577cd04e

Tree-SHA512: b9b4a9f46d2fcf559d0a7f62ec397b6c2b174dd8ca9d80b37c0c393894ab4bc32019d64e2afcad1f780442b16aa3d15240ce607fc14b5e17b112243f7556b5b4
2025-05-14 00:56:25 +00:00
Tobin C. Harding 2c0f388108
Fix up script to/from hex
We (I) have recently done to PRs patching the way we handle converting
scripts to and from hex.

In doing these I made a mess of the deprecation because after both PRs
were in I had managed to change the return type and the behaviour of the
deprecated function.

On top of that the docs were either outright wrong or not that clear.

Props to Kix for doing post merge review and finding my mistakes.
2025-05-14 10:29:29 +10:00
merge-script 3bf87d8bae
Merge rust-bitcoin/rust-bitcoin#4489: Fix link to BIP-113
c3102f04de Fix link to BIP-113 (Tobin C. Harding)

Pull request description:

  Current rustdocs link is not correct. Just remove the brackets because we have a fully labelled link right below.

ACKs for top commit:
  apoelstra:
    ACK c3102f04dea27388e830e619a43e8b1130bd2d08; successfully ran local tests

Tree-SHA512: 71e41b3bd929fd8ed4e6aa790d73ba33132856dc1b3b7d36afde73f94c1953898814f851caf7004ba1a456d3af107513733a4df810c1b1ce74a3e332b156d97b
2025-05-14 00:10:34 +00:00
yancy 642c414f56 refactor: Use map combinator instead of match 2025-05-13 15:49:44 -05:00
merge-script bc93498b3e
Merge rust-bitcoin/rust-bitcoin#4485: Add `Builder::with_capacity()`
d003d48592 Add `Builder::with_capacity()` (Daniel Roberts)
e492f94289 Update `ScriptBuf::with_capacity` docs (Daniel Roberts)

Pull request description:

  Enable the creation of `bitcoin::script::Builder` with a preallocated capacity.

  This is pretty minor, but it provides a small speedup if used correctly. I've observed a 0.4% speedup and a 0.7% speedup in two code bases that create lots of outputs (on the order of tens to hundreds of thousands). It provided a much larger speedup (5% or so) in the latter code base before some other optimizations dwarfed it.

  I have a branch that also uses it for `ScriptBufExt::new_*()` but while it provides a small performance improvement for all script types except one, `ScriptBufExt::new_p2tr()` actually causes a small performance regression. Since the only use case I have for creating lots and lots of scripts is in taproot with CHECKTEMPLATEVERIFY, I'm holding back that change if/until I figure out what's going on exactly (and hopefully resolve it).

ACKs for top commit:
  tcharding:
    ACK d003d48592
  apoelstra:
    ACK d003d4859251abb01929ccab6009a02e0c96b0cd; successfully ran local tests

Tree-SHA512: 51137574ca3d9dc5c319df124f470abd0f82413c093a5636af0439eb0fc2ad01dcf83df366a02279fc7d28feed24aa8c7db33b3c474d8bde7a9b6636343f8e9a
2025-05-13 17:16:54 +00:00
frankomosh fe577cd04e Implement Div<NonZeroU64|I64> for Amount, SignedAmount, FeeRate, and Weight
Adds an implementation of div by NonZeroU64 for Amount, FeeRate, and Weight
types. Also adds a div by NonZeroI64 for SignedAmount. The operations
helps to prevent div-by-zero errors at compile time, rather than runtime.

It follows same pattern as existing div operations
but leverages safety guarantees offered by non-zero types
2025-05-13 20:01:11 +03:00
merge-script 525e1a4d1f
Merge rust-bitcoin/rust-bitcoin#4495: test: Add constructor test
3fbd6fb6b3 test: Add constructor test (yancy)

Pull request description:

  The constructor currently has no test coverage.

ACKs for top commit:
  apoelstra:
    ACK 3fbd6fb6b3c6dc1f1d5c14b3f3486140a781d0f0; successfully ran local tests
  tcharding:
    ACK 3fbd6fb6b3

Tree-SHA512: 9819bd058b84a7b633279d12da48c9af7af765fd8dca5d297787872badc431769c026e57b03bf6d907c89a7b7a5c116cda1be98cb6261dd2a6c331276e627cc3
2025-05-13 16:40:00 +00:00
merge-script c5d8803148
Merge rust-bitcoin/rust-bitcoin#4484: Introduce `map` function for `NumOpResult`
a66ff8f8b1 Introduce `map` function for `NumOpResult` (Shing Him Ng)

Pull request description:

  Closes #4476

ACKs for top commit:
  Kixunil:
    ACK a66ff8f8b1
  apoelstra:
    ACK a66ff8f8b143ebebb80ddc6b052cbc55e8dbb070; successfully ran local tests

Tree-SHA512: 63c79666685895033b9df0c46004fa4b042d038cc61e5ef443f56690be268ac6dd1ba461ab4f7d97c684e68623dfa53cdd37091f40ff7e6a5d3e53920c3fd40c
2025-05-13 16:00:55 +00:00
merge-script c3ee5f8491
Merge rust-bitcoin/rust-bitcoin#4478: test: push int minimality
873880b192 test: push int minimality (ChrisCho-H)

Pull request description:

  Integrate the minimality test of `push_int` into that of `push_slice`. This increases test coverage.

ACKs for top commit:
  apoelstra:
    utACK 873880b192
  tcharding:
    ACK 873880b192

Tree-SHA512: 8bbd0b7ec4c69faaadb9ab4bae7429bbebd66d1d718b80f19b323a1059a983ea1b41f743a920b6fdacce213e66708ed1028227246021457601bce968b8bf3f22
2025-05-13 13:47:43 +00:00
Shing Him Ng a66ff8f8b1 Introduce `map` function for `NumOpResult` 2025-05-13 07:34:17 -05:00
merge-script fb44e4a7c6
Merge rust-bitcoin/rust-bitcoin#4483: Fix argument check in labeler script
03b8e08752 Fix argument check in labeler script (Fallengirl)

Pull request description:

  ### Description

  Removed unnecessary quotes around the `!=` operator in the Bash test expression, so the `--force` flag is now evaluated correctly instead of always passing.

ACKs for top commit:
  apoelstra:
    ACK 03b8e08752e77742374b367a3947d987b81797fa; successfully ran local tests

Tree-SHA512: 479763d384a2ee06dc2a2fdd4cf3d35d1731ffccdee8888104bf0fd4bc778ee493d2e4e56f33c544c66e987a637c994036b237661e21ec02d4d86e0586ba8cb4
2025-05-13 03:30:50 +00:00
ChrisCho-H 873880b192 test: push int minimality
Integrate the minimality test of push_int into that of push_slice. This increases test coverage.
2025-05-13 11:54:14 +09:00
merge-script fb38e1bf2a
Merge rust-bitcoin/rust-bitcoin#4487: Automated nightly rustfmt (2025-05-11)
37d2f7eff1 2025-05-11 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 37d2f7eff1
  apoelstra:
    ACK 37d2f7eff146b223f5f61a99aee6110d05e932a5; successfully ran local tests

Tree-SHA512: 6a3902cf487ec5a4639700034dcaf04214188f79abf0e9ae08191acd57e151084d74b3145471ccadfa942057235621fe2a46d3c21c7b5dcf295133cdcf0fc9d7
2025-05-12 16:31:13 +00:00
merge-script a8e85b61aa
Merge rust-bitcoin/rust-bitcoin#4472: Change the return type of effective_value
b038520c4d Change the return type of effective_value (yancy)

Pull request description:

  Prefer the more informative return type NumOpResult over Option.  Also a returns section was added which describes the different possible returns.

  The api of NumOpResult could probably be extended to cleanup the match statement.  Also consider api addition for unchecked calculations natively.

ACKs for top commit:
  tcharding:
    ACK b038520c4d
  apoelstra:
    ACK b038520c4dc8c2f92cb40a9fd272608ae2e9b799; successfully ran local tests

Tree-SHA512: 2e66a3ca83514f0ad011660178f8e5ea9d9b1de03dc030e7c57f558e08a42261724251364bb7a746b6970b4288a45539a33d3b36b114c855b6246a56fee3c61c
2025-05-12 15:53:49 +00:00
merge-script 5ecb8880f1
Merge rust-bitcoin/rust-bitcoin#4474: Mark method as constant
fd90c8782a Mark method as constant (yancy)

Pull request description:

  Allow external const calls to access this method

  Followup from https://github.com/rust-bitcoin/rust-bitcoin/pull/4428

ACKs for top commit:
  tcharding:
    ACK fd90c8782a
  apoelstra:
    ACK fd90c8782ab602861a715c72ca1481ed963e5c39; successfully ran local tests

Tree-SHA512: 2d04da9bddd58040972942e70096b2714405740236889f0909c00cb6993e38f3ae51ff05bbda13792a31243d3598f5976649590eecb0572c4f00c166f717399d
2025-05-12 15:01:01 +00:00
yancy 3fbd6fb6b3 test: Add constructor test
The constructor currently has no test coverage.
2025-05-12 08:44:12 -05:00
merge-script 76e9a3e433
Merge rust-bitcoin/rust-bitcoin#4467: units: Use functional style
f732b1d3cc units: Use functional style (Tobin C. Harding)

Pull request description:

  This is Rust not C, use functional style.

  Close: #4464

ACKs for top commit:
  apoelstra:
    ACK f732b1d3cc2b3f9d012b3eeecc70d007666d4f1d; successfully ran local tests

Tree-SHA512: 65f523d4632c78bb166b9e4fb49e715e92da28fc2d07d54a3df8e0db7097277958dfbde0989cf1e443e6f56635001298b47fef3eb5e76b8350041b1ee7be46a6
2025-05-12 11:53:39 +00:00
merge-script 9578ad3e50
Merge rust-bitcoin/rust-bitcoin#4469: Iterate on the script hex APIs
3b8164139f primitives: Add docs section for script hex API (Tobin C. Harding)
6b90e42e78 Finalize the script hex APIs (Tobin C. Harding)

Pull request description:

  In #4316 we made some 'improvements' to what script functions and trait implementations do and do not include the length prefix. Iterate again on it as described here: https://github.com/rust-bitcoin/rust-bitcoin/pull/4316#issuecomment-2847710436

  - Patch 1 does the changes
  - Patch 2 adds some more docs, requires a grammarian to check my Aussie lingua

ACKs for top commit:
  apoelstra:
    ACK 3b8164139f6ecebc97b66a299b4a87c2288d8a76; successfully ran local tests

Tree-SHA512: 481db88ae1b6f5751e81e4cd126f545cfc34bef6dcfcf857f1c7464aeb41f5de95fc4582c015abde04372fe025efa13cdf2906e75517f62cff3ddec05c4d9711
2025-05-12 11:13:50 +00:00
Tobin C. Harding 4ccecf5dec
Fix stale Height type link
`units::locktime::relative::Height` type is now deprecated, use the new
name in rustdoc.
2025-05-12 12:57:08 +10:00