ec38860b65 Add a test to kill mutants in MathOp (Jamil Lambert, PhD)
Pull request description:
Weekly mutation testing found mutants in `is_overflow` and `is_divide_by_zero`.
Add a test to kill them.
Closes#4310Closes#4334
ACKs for top commit:
tcharding:
ACK ec38860b65
apoelstra:
ACK ec38860b65d01d09bf9189cc1b2d043e4b36a140; successfully ran local tests
Tree-SHA512: 05d46d5792cb355d8b79f197bcb397d762c8f5593005589f46b9d085f357d168b767e6deaf30b8bf61434652f9f1db1a09b5f753f30c2e22d7e80450cef61182
7e1369b3f1 Cover all TryFrom implementations in Script (Jamil Lambert, PhD)
6dfa3d8f4d Update test to increase coverage (Jamil Lambert, PhD)
Pull request description:
Update test in borrowed to cover the `default` implementation of `Script`.
Add tests to cover all `TryFrom` implementations in `Script`
ACKs for top commit:
apoelstra:
ACK 7e1369b3f1a7789b2757951c2e3ff58937442200; successfully ran local tests
tcharding:
ACK 7e1369b3f1
Tree-SHA512: 766b8eb63abbb1f10670f42b3789a8a4d4d73470ade13f14a1140d4cdd93b49d79865645d49f404774d8ff7aeb22b68059275902dc063d2baaf79fc8a89dca95
267deee60d Automated update to Github CI to rustc nightly-2025-04-11 (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 267deee60d
Tree-SHA512: 88f6af37da2557ced9004819b953634644df72c3952296874417616f1ae6a4b06859ffed00feafe28fbf3a1c9147dc1065ca63bd7c39b68aee10287b33e74467
b669a93eab Add tests to kill mutants (Jamil Lambert, PhD)
Pull request description:
New mutants found in weekly mutation testing in `Witness`.
Add a test to kill the mutants in From impl, and expand the test to kill PartialEq mutants.
Closes#4296
ACKs for top commit:
apoelstra:
ACK b669a93eabc89f7b25d37570eef20675668289ea; successfully ran local tests
Tree-SHA512: 1b23c37c7a0e9c9d2f6f982cc4f5f9923ffbfa255e2b3d7b24d07f2c07273313d4563af9ab8c6f972f2d814cde05bd1af7c2cd4cdee6e03453be81631be52d0e
1654d2e899 Update array.rs (FT)
Pull request description:
This PR corrects a typo in the documentation comment for the array splitting method in `internals/src/array.rs`. Changed "overlaping" to the correct spelling "overlapping".
ACKs for top commit:
apoelstra:
ACK 1654d2e89934059afb3c4a61b5064672d2f3a80a; successfully ran local tests
Tree-SHA512: b59257dbdd1764b4c99d97b158bedb8a1b87e98eb58b7400d8bc54186960ea07eafadc8b9a4b2332156d254e22039cecc0a926e4c5bf8ec404036d5e309dc224
da69e636a9 units: Use 100 column width in rustdoc comments (Tobin C. Harding)
53c6ae4d40 units: Remove expect from rustdoc example (Tobin C. Harding)
Pull request description:
A couple of quick docs fixes while trying to polish `units`.
ACKs for top commit:
apoelstra:
ACK da69e636a9d21e602289062279ed5ebc6b1429b6; successfully ran local tests
Tree-SHA512: acfbec90b0327850b882c5e1b1e7eaadbf0a09a30dcc46529386ea419ed74846a678a5980f5706f8d280f30ec6f6d06af2db8f0e1748523b15ad47a654caee4b
d878e5b367 chore(hashes): update serde dependency to workspace (Nick Johnson)
Pull request description:
Update serde from 1.0 to 1.0.103 to align with versions used in other workspace crates. This makes the dependency constraint match reality since it was almost always implicitly raised by the other crates.
I ran the `update-lock-files`, but no changes, which makes sense since other crates in the workspace bumped the version.
A bit more info in https://github.com/rust-bitcoin/rust-bitcoin/issues/4313#issuecomment-2786281653 with talk about minimal version testing.
ACKs for top commit:
tcharding:
ACK d878e5b367
apoelstra:
ACK d878e5b3678e3354740a584fa9cc239f8181fa67; successfully ran local tests
Tree-SHA512: 3fe3eaddb58c54ac809f025e3a95f02c4c15f6209a3d17c9262923bdcbf8a094975d150c76e85de25a68e6e7574aa7e3fe40d4707bd4d159bd8cc97f36be0ee9
52f9c13358 Implement Copy for Address and AddressInner (tushar994)
Pull request description:
solves #4237
ACKs for top commit:
apoelstra:
ACK 52f9c13358c97c358543f3302b325f37ac49392f; successfully ran local tests
Tree-SHA512: 007092c57b893cfa62a6185c21b8839daf946a5b8ca505fc7d5f3b78c056fc5ce44cfb32936469f1955d535f4798506ea20a936218f0bf6808b17506e87836f2
The `default` implementation is missed in the test coverage.
Change calling `new()` to using the `default` implementation, which then
calls `new()` anyway.
d6881ff5f8 units: Enable differentiating div-by-zero (Tobin C. Harding)
5fb64953c5 units: Return NumOpResult when implementing Div (Tobin C. Harding)
dba61c9efe units: Fix internal docs (Tobin C. Harding)
512326b8b9 units: Macroize implementing OptionExt (Tobin C. Harding)
f5b54e5fe0 units: Move general result stuff to a separate module (Tobin C. Harding)
f49efdf3f7 units: Remove mention of amount in result module (Tobin C. Harding)
Pull request description:
First 4 patches are preparatory clean up. Patch 5 and 6 make all implementations of `Div` in the crate return `NumOpResult`. Done as two separate patches to assist review and in case we need to iterate, patch 5 is likely trivial to review.
Fix: #4215
ACKs for top commit:
apoelstra:
ACK d6881ff5f861b8a85883ec88ce453cc02191ba14; successfully ran local tests
Tree-SHA512: 7188262dbe61d5b7ec051b4310918680b2732788f364419d85e30a98c94778cffabda166ef716fe2298a70b69626aaa3b51cff0ce6efeeb3e93e51066ab358a1
Update serde from 1.0 to 1.0.103 to align with versions used in other
workspace crates. This makes the dependency constraint match reality
since it was almost always implicitly raised by the other crates.
c55da5c342 Update bip_174.rs (fuder.eth)
Pull request description:
This pull request renames the variable 'indecies' to 'indices' throughout the bip_174.rs file to use the correct plural form of 'index'. The change affects both variable names and comments, ensuring consistent and proper terminology throughout the codebase.
Changes include:
- Renamed 'indecies' to 'indices' in comments
- Renamed the variable declaration and all references
- Updated the for loop iteration
This is a simple terminology correction with no functional changes to the code.
ACKs for top commit:
tcharding:
ACK c55da5c342
apoelstra:
ACK c55da5c3427ff2d850feb2e5891ce5d52cc304ba; successfully ran local tests; lol
Tree-SHA512: 04249c13599824dc56ea8b86ca1b989bc727cad16f771100e1af00017e3c11559a8dd9fc906569bebed94e36119ff4086cc806dda3b7606c011c5bc95f1398b6
b01152ef5d Automated update to Github CI to rustc nightly-2025-04-04 (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 b01152ef5d
Tree-SHA512: 720894224ed8f4b49457f13e0fd93eb21fda5ebcdfee59ede998ff1f92ec04554bf923f322aa92e43c9d6d7d79827abd1954d741f467dbd13127038c985394e6
Currently we use a std numeric type for the output of various `Div`
implementations while other ops use `NumOpResult`. This makes it
difficult to chain operations.
Throughout the crate use `Output = NumOpResult<Foo>` when implementing
`Div`.
Later we want to enable users differentiating between an overflow and a
div-by-zero. Explicitly do not implement that yet, done separately to
assist review.
We are going to add implementations of `OptionExt` for various other
types and all impls are almost identical. To make doing so easier
macroize the implementation for `Amount` and `SignedAmount`.
Internal change only, no logic changes.
We currently use the `NumOpResult` for operations involving more than
just amount types (e.g. `FeeRate`) however when the `result` module was
written we only used amount types.
To make the intention of the custom result types more clear introduce a
top level `result` module and move the general code there. Leave the
amount implementations in the `amount` module. Note that both `result`
modules are private.
Move the `OptionExt` impls because later we will add a bunch more of them.
Internal change only, no logic changes.
We currently use the `NumOpResult` for operations involving more than
just amount types (e.g. `FeeRate`) however when the `result` module was
written we only used amount types.
To make the docs and code clearer use 'numeric type' instead of
'amount' in docs. And for local variables use `x` instead of `amount`.
This is docs and internal changes only.
f3cc445c87 Automated update to Github CI to rustc stable-1.86.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 f3cc445c87
Tree-SHA512: 1111f912ed137de0b5a328ba5909bcbeb0b8d66e82bf8729e3e3a825c1ba73147fd19200e0c7018a97604535d199ee82b54f515feb83ccee2224cdd4a0a56756
b387b923c8 Update contributing guide re merging and CI (Tobin C. Harding)
Pull request description:
Lately we have had a bunch of new devs bumping PRs trying to get things merged. Everyone gets excited, no need to be too harsh on them. At least we can try to explain why we might be taking so long.
We (*cough* Andrew) runs a custom CI box that leads to slightly unusual merge behaviour in this repo if one is unaware of it.
Document our CI better and ask folk not to bump too much.
ACKs for top commit:
apoelstra:
ACK b387b923c810e72e4da1f538cecf3ac4c3369ddb; successfully ran local tests
Tree-SHA512: 96505714a444b3a3aa86a7e41de6fda954f40a444917a8066fc0c395ac4207a7f4ea310d8e2d7f76c2bfacc1db18047a26536d738c1f1b8bd17a9d09f87d3998
ebaf162a96 Add push_relative_lock_time() and deprecate push_sequence() (Erick Cestari)
Pull request description:
This pr improves the script builder API to better align with Bitcoin semantics when working with relative timelocks:
- Add `push_relative_lock_time()` method that takes a `relative::LockTime` parameter, which correctly represents the semantic meaning when working with CHECKSEQUENCEVERIFY
- Deprecate `push_sequence()` in favor of `push_relative_lock_time()` to avoid confusion between sequence numbers and relative timelocks
This addresses a potential confusion point in the API where developers might incorrectly push raw sequence numbers in scripts when what they actually need is to push a relative locktime value that will be checked against the transaction's sequence numbers by CHECKSEQUENCEVERIFY.
Closes#4301
ACKs for top commit:
apoelstra:
ACK ebaf162a962494329c6cb5f6d375a6a4a97fe83b; successfully ran local tests
tcharding:
ACK ebaf162a96
Tree-SHA512: 52c37b6e8bbcaa3f9346c5fd5db26eba69169bce13f915906df95fdc65204067fd75f803f8b5adad76978c9baad553c99281628736db4d1d317b149ab257d81f
Lately we have had a bunch of new devs bumping PRs trying to get things
merged. Everyone gets excited, no need to be too harsh on them. At least
we can try to explain why we might be taking so long.
We (*cough* Andrew) runs a custom CI box that leads to slightly unusual
merge behaviour in this repo if one is unaware of it.
Document our CI better and ask folk not to bump too much.
While we are at it remove the `API changes` section because we removed
the API files already.
157fe48dfd minor docstring fixups (planetBoy)
Pull request description:
ACKs for top commit:
apoelstra:
ACK 157fe48dfdc4029a0db63b393d8d9fd32a197e30; successfully ran local tests
Tree-SHA512: 29fe6168ff729f0f65f32a2c6ad28d45e36e0761cac4455b57b891f9c0bd2622db51a21b4961d33fa5a8934302eefca4a77c20732bf047e2721a5bc5d655c340
ab63ec9768 fix correction typos (Bilog WEB3)
Pull request description:
tesnet - testnet `fixed`
How may blocks - How many blocks `fixed`
ACKs for top commit:
apoelstra:
ACK ab63ec976845586d3616ebad6e211e93efba1e8d; successfully ran local tests
Tree-SHA512: 6e84cdc45973c7a9831a7cad4f408cb90dc5a9b01c3f929b4df7449b5719e7f9148ce308797d29e72caa3e1fd73e7ca645e27ae4598f18e133b49dc8f979b480
This commit improves the script builder API to better align with Bitcoin
semantics when working with relative timelocks:
- Add push_relative_lock_time() method that takes a relative::LockTime
parameter, which correctly represents the semantic meaning when working
with CHECKSEQUENCEVERIFY
- Deprecate push_sequence() in favor of push_relative_lock_time() to avoid
confusion between sequence numbers and relative timelocks
This addresses a potential confusion point in the API where developers
might incorrectly push raw sequence numbers in scripts when what they
actually need is to push a relative locktime value that will be checked
against the transaction's sequence numbers by CHECKSEQUENCEVERIFY.
6ba0e46b53 chore: remove unused serde_json dep (lfg2)
Pull request description:
checked by [shear](https://github.com/boshen/cargo-shear)
```
bitcoin_hashes -- hashes/Cargo.toml:
serde_json
Fixed 1 dependencies!
```
cargo +nightly build in local env is ok, local cargo.lock is ok(not include serde_json) so no need update cargo.lock
```
[[package]]
name = "bitcoin_hashes"
version = "0.16.0"
dependencies = [
"bitcoin-internals",
"hex-conservative 0.3.0",
"serde",
"serde_test",
]
```
but check CI seems need update
`error: the lock file /home/runner/work/rust-bitcoin/rust-bitcoin/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.`
ACKs for top commit:
Kixunil:
ACK 6ba0e46b53
apoelstra:
ACK 6ba0e46b53fbc9d6ea0c3e23a553920581930e75; successfully ran local tests
Tree-SHA512: 68a444e05876733af9606d4489ca30a18c9d3439dedf932e40db67dcfdb5ae40ab0f8cf937146f6b1ef92edc626dcb27a441b63c283e6945aa8071500bcc43a4
51d3a83891 updated and corrected links CHANGELOG.md (Bilog WEB3)
Pull request description:
Hey , I read through the whole `CHANGELOG.md` and fixed all the links + adjusted some
ACKs for top commit:
apoelstra:
ACK 51d3a83891395195fb89ae8590addded7efb4871; successfully ran local tests
Kixunil:
ACK 51d3a83891
Tree-SHA512: d36f38dd4b4fb83e615a3cdfe5efdbec5418283b53b09a0e7f288d88711626123c3e1dd5d3dac151186a4592dfbbaa26c90e4d409ed9f1cbf2116292979c3e20