Commit Graph

5925 Commits

Author SHA1 Message Date
Erick Cestari 3ca3218c23 witness: Improve element access methods with get() and get_back()
Enhance Witness struct element access methods:

- Rename `nth()` to `get()` for clearer slice-like element retrieval
- Introduce `get_back()` method for flexible reverse indexing
- Remove redundant `second_to_last()` and `third_to_last()` methods
- Add `#[track_caller]` to index implementation for better error tracking
- Update all references to use new method names
- Improve documentation with usage examples

The changes provide a more intuitive and consistent approach to
accessing witness elements.
2025-03-04 12:16:48 -03:00
merge-script 95c012ee53
Merge rust-bitcoin/rust-bitcoin#4143: primitives: Inline small functions
b656d7a16c Inline small functions (Jamil Lambert, PhD)

Pull request description:

  Functions that fit the below criteria should be inline:

  > Basically, if a function jut delegates into another function and passing through arguments, it should be inline. Also when doing assignment of `u32` or similarly trivial operation. Also if it checks the validity of argument(s) and then performs something simple (like a call to `_unchecked`).

  _Originally posted by Kixunil in https://github.com/rust-bitcoin/rust-bitcoin/pull/4099#discussion_r1966156399_

  Add `#[inline]` to all functions in `primitives` that fit the criteria.

ACKs for top commit:
  tcharding:
    ACK b656d7a16c
  apoelstra:
    ACK b656d7a16c2d0cdd6d8a94fffeac842ffc0fabf4; successfully ran local tests

Tree-SHA512: 0059aa25252e634e55482b201a9414d19a01435fea801a20dc38b4b701a52f4a14565a1cfb0ff4ed7a771a25629eb192fd69cb4ee81e78f6a0ef79d56db0ef5b
2025-03-04 14:35:14 +00:00
merge-script 6483244280
Merge rust-bitcoin/rust-bitcoin#4170: Improve crate docs headings
83d071e54b chacha20: Add whitespace (Tobin C. Harding)
4451724d31 chacha20: Add a docs heading (Tobin C. Harding)
d4417f9666 io: Improve crate docs heading (Tobin C. Harding)
c466554948 hashes: Improve crate docs heading (Tobin C. Harding)
6f4eb60936 Improve docs crate headings (Tobin C. Harding)

Pull request description:

  Make them all uniform after taking 2 minutes online to try find a nice format.

ACKs for top commit:
  apoelstra:
    ACK 83d071e54be0bc4ebd760a490a3ca887c0bf90a8; successfully ran local tests; lgtm

Tree-SHA512: 6f08c6cda91a7a870f1080b497f89607ac3d6b3c0234cbd2ba2da8710d46816398acac0bca2a49a3bc9466b814ae446842d3d304a3735df9f983e3ff5df005db
2025-03-03 20:05:29 +00:00
merge-script 5bc08b1d9a
Merge rust-bitcoin/rust-bitcoin#4154: update secp256k1 to 0.30.0
f80cf2cb2a update secp256k1 to 0.30.0 (19年梦醒)

Pull request description:

ACKs for top commit:
  apoelstra:
    ACK f80cf2cb2aa318978da3a6c5df49d82c49344763; successfully ran local tests
  tcharding:
    ACK f80cf2cb2a

Tree-SHA512: 83b8bb72372025c4a4b81c2b7973a7808a4a1d9d6450adef8b60a890e128b2559b55832159c25fa91daac1856049b070cd910d87313fed2851ced9e72ae5ddf5
2025-03-03 19:04:09 +00:00
merge-script 43814eb9e5
Merge rust-bitcoin/rust-bitcoin#4134: chore: fix some typos in comments
ce19d40a80 chore: fix some typos in comments (looklose)

Pull request description:

  fix some typos in comments

ACKs for top commit:
  apoelstra:
    ACK ce19d40a805e2b67f6199cce61a73c6592019b5c; successfully ran local tests
  tcharding:
    ACK ce19d40a80

Tree-SHA512: 4bf5d339e4e73a6f1378881ad62b17f78796e6000f24eea6b3a381d3e03f4fd8b9775710a7eb5a087bfe0d557d1ab1a8291dcc7b86a2c9ded3318774cf2e5b68
2025-03-03 17:33:28 +00:00
merge-script f0e12574aa
Merge rust-bitcoin/rust-bitcoin#4175: Use uniform return statement in docs
85612908af Use uniform return statement in docs (Tobin C. Harding)

Pull request description:

  We have a bunch of 'Returns [`None`] if .. ' statements. Make the whole module uniform.

ACKs for top commit:
  apoelstra:
    ACK 85612908af936c7f0866227e24a3359115991ca2; successfully ran local tests; lgtm

Tree-SHA512: 431b6ced433578c13bfc6134609d11084380310a2fbb66899387ac6982a6c4d63559faf9be460104e120c109cbd352b240886d4aa6b6d92cd5063d7b4ec5e04c
2025-03-03 16:35:41 +00:00
merge-script b6548931b5
Merge rust-bitcoin/rust-bitcoin#4142: Typo fix in: README.md
539d45420a Typo fix in: README.md (leonarddt05)

Pull request description:

  Hi,

  I suggest some typo fix' for this doc:

  1- "since these are needed to display hashes anway."  Should be "since these are needed to display hashes anyway." (spelling error).

  2- "bench mark" and "bench marks" Should be "benchmark" and "benchmarks" (incorrect spacing; "benchmark" is a single word).

  Thanks.

ACKs for top commit:
  apoelstra:
    ACK 539d45420a4540e13099a61996db87aeb3887002; successfully ran local tests
  tcharding:
    ACK 539d45420a

Tree-SHA512: 36fe65a9ea4d8d2fce90fb91e7966bc41ab5ab1cf9b5ea39efe88b1756d46724428d5dccfb1e7718721747e032ee3c52d848908652d82816f7f990f527c47485
2025-03-03 15:22:33 +00:00
Jamil Lambert, PhD b656d7a16c
Inline small functions
Functions that just delegate or do trivial operations should be inline.

Add `#[inline]` to all functions in `primitives` that fit the criteria.
2025-03-03 12:26:52 +00:00
Tobin C. Harding 85612908af
Use uniform return statement in docs
We have a bunch of 'Returns [`None`] if .. ' statements. Make the whole
module uniform.
2025-03-03 14:06:01 +11:00
Tobin C. Harding 83d071e54b
chacha20: Add whitespace
Mirror the other crates. Whitespace only.
2025-03-03 13:33:19 +11:00
Tobin C. Harding 4451724d31
chacha20: Add a docs heading
Like we do for the other crates add a heading to the crate docs.
2025-03-03 13:33:11 +11:00
Tobin C. Harding d4417f9666
io: Improve crate docs heading
Use the same format as the other crates.
2025-03-03 13:30:52 +11:00
Tobin C. Harding c466554948
hashes: Improve crate docs heading
Use same for as the other crates and emphasise that this is a Bitcoin
hashes crate.
2025-03-03 13:30:40 +11:00
Tobin C. Harding 6f4eb60936
Improve docs crate headings
I took a look at the rendered HMTL of `bitcoin`, `primitives`, `units`,
`serde`, and `tokio` and picked a header style that I thought looked
good.

Use it for `primitives` and `units`.
2025-03-03 13:28:01 +11:00
merge-script 72823df014
Merge rust-bitcoin/rust-bitcoin#4152: Automated daily update to rustc (to nightly-2025-02-28)
c810a0ad58 Automated update to Github CI to rustc nightly-2025-02-28 (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 c810a0ad58

Tree-SHA512: 446fc7f0a5d190c5ff874900d2b29b4051d91928948fa10bdcf5ba8db52ccd8ff51228f9832290836067f6ebf66f66517afffede14489e9c0f2313eed51bd523
2025-03-03 11:12:22 +11:00
merge-script 58baee62ca
Merge rust-bitcoin/rust-bitcoin#4155: Automated nightly rustfmt (2025-03-02)
166e37161a 2025-03-02 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:
  apoelstra:
    ACK 166e37161a2412c716e82f7046da304d4788a3c9; successfully ran local tests

Tree-SHA512: 630978ca16f514379e0851254f2b7137f2612e98d8614e9d2c1170bda805ece5936371a2b1fb4b846f3ec906c5c72c9dc1bf9a4239cc6c3336e8f456108a826f
2025-03-02 17:27:48 +00:00
merge-script 22cecce99d
Merge rust-bitcoin/rust-bitcoin#4149: Fix typos in code comments and documentation
bb8f833ca0 Update instruction.rs (kilavvy)
0ce622e668 Update message.rs (kilavvy)
f61941bbe6 Update serialized_signature.rs (kilavvy)
1d2de62e01 Update mod.rs (kilavvy)

Pull request description:

  This PR fixes several typos in comments across multiple files:

  - Fixed typo `interpretted` -> `interpreted` in `blockdata/script/instruction.rs`
  - Fixed typo `neccessity` -> `necessity` in `p2p/message.rs`
  - Fixed typo `underlflow` -> `underflow` in `taproot/serialized_signature.rs`
  - Fixed typo `ambigous` -> `ambiguous"` in `units/src/amount/mod.rs`

  These changes only affect comments and documentation, no functional code changes.

ACKs for top commit:
  apoelstra:
    ACK bb8f833ca01688eaae75e0fa322f698d34243185; successfully ran local tests; though all these commits could be squashed IMO

Tree-SHA512: d73dc2a86b20de87c0c5efb3e5042e3901c846236670e3a6501f4c93fd54328fef08bfeca276b93642e7b51d04cb8b9c8e1af558f3aabc3c924d60a61e58b031
2025-03-02 15:42:57 +00:00
19年梦醒 f80cf2cb2a
update secp256k1 to 0.30.0 2025-03-02 23:31:48 +08:00
Fmt Bot 166e37161a 2025-03-02 automated rustfmt nightly 2025-03-02 01:22:29 +00:00
merge-script c2741c8eee
Merge rust-bitcoin/rust-bitcoin#4138: units: Improve code comment on macros
8787304425 units: Improve code comment on macros (Tobin C. Harding)

Pull request description:

  We have two macros that are hidden because they are code de-duplication tools. However the output they produce is, and has to be, stable so that we can use them in `units` and `primitives` without inadvertently breaking semver in `primitives`.

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

Tree-SHA512: 564bb27dcb608f391be8e50cbf2da02d2f339ddf575e5b5fd432a93df96233b50541616167c7c84a134ed31455a64149c822aea72e61c042fb1aeb8fab20d4ce
2025-03-01 19:46:31 +00:00
merge-script 217099a7b7
Merge rust-bitcoin/rust-bitcoin#4123: hashes: Remove Clone trait bound from Tag
25707da14a hashes: Remove Clone trait bound from Tag (ndungudedan)

Pull request description:

  Resolves #4016 which was suggested here: https://github.com/rust-bitcoin/rust-bitcoin/pull/4010#discussion_r1942359979

ACKs for top commit:
  Kixunil:
    ACK 25707da14a
  tcharding:
    ACK 25707da14a

Tree-SHA512: 1f1a5da4e3f40ba9ee0cd9e5dfa3924bfbb46e1f44e1d857e295bf768dff3407196211041e2a1d06c582d1dac6d7adb5c5aa0285300337504655ee72f2d0b9ec
2025-03-01 18:52:51 +00:00
merge-script ef9a24eadf
Merge rust-bitcoin/rust-bitcoin#4091: primitives: Hide error internals
43ae9d7516 primitives: Hide script error internals (Tobin C. Harding)
2d8227f091 Hide relative locktime error internals (Tobin C. Harding)

Pull request description:

  Make the struct fields private and add getters.

ACKs for top commit:
  apoelstra:
    ACK 43ae9d751622c7bef548a469466d74cf01284129; successfully ran local tests; nice! Way easier to understand these types with the new incompatible / expected names

Tree-SHA512: cfe67d60ea61a2a4c27b09071a6b11739ca281bf0b4a655121f90215ce38c3a637acf53a6e01aa2ef26fa80004cd919bf3b3334dbd9566ee2f594cab7750b563
2025-03-01 04:44:01 +00:00
merge-script ea56619df5
Merge rust-bitcoin/rust-bitcoin#4114: Policy: Relax MIN_STANDARD_TX_NONWITNESS_SIZE to 65
2fe3687899 Policy: Relax MIN_STANDARD_TX_NONWITNESS_SIZE to 65 (jrakibi)

Pull request description:

  Align with Bitcoin Core's policy by reducing the minimum non-witness transaction size from 82 to 65 bytes.
  This will allow for more minimal transaction cases (eg: 1 input with 1 OP_RETURN output) while maintaining protection against CVE-2017-12842.

  The 65-byte minimum consists of:
  - 60 bytes: minimal tx (10B skeleton + 41B input + 9B output)
  ```
  # Tx Skeleton: 4 [Version] + 1 [InCount] + 1 [OutCount] + 4 [LockTime] = 10 bytes
  # Blank Input: 32 [PrevTxHash] + 4 [Index] + 1 [scriptSigLen] + 4 [SeqNo] = 41 bytes
  # Output:      8 [Amount] + 1 [scriptPubKeyLen] = 9 bytes
  ```

  - 5 bytes: minimum `scriptPubKey`

  Closes https://github.com/rust-bitcoin/rust-bitcoin/issues/4108

ACKs for top commit:
  tcharding:
    ACK 2fe3687899
  Kixunil:
    ACK 2fe3687899

Tree-SHA512: d98fae7ebde5060c7ad8a3555df094e8ed93486c371b1bd43302bbd1b6b2d86c442803dcbcc5b30f3692224a888abc4e49b7b5414d9852317730628a139fbd40
2025-03-01 03:35:47 +00:00
Update Nightly Rustc Bot c810a0ad58 Automated update to Github CI to rustc nightly-2025-02-28 2025-03-01 01:50:11 +00:00
merge-script 65181257bc
Merge rust-bitcoin/rust-bitcoin#4111: Add support for pay to anchor outputs
f7ea6e50b5 Add support for pay to anchor outputs (Erik De Smedt)

Pull request description:

  Add support for the newly created Pay2Anchor output-type which was introduced in bitcoin 28.0

  See https://github.com/bitcoin/bitcoin/pull/30352

ACKs for top commit:
  Kixunil:
    ACK f7ea6e50b5
  apoelstra:
    ACK f7ea6e50b578238b0a7ff421d18d7c7f71d43278; successfully ran local tests

Tree-SHA512: cd3da860e81bd25e6fef72a9118b43d647af2339e9d226c124fa221f63d9c3149189480d40368d38900a999bf59a23fd5302025751ea1bebfea059b4fab21c0b
2025-02-28 20:40:25 +00:00
merge-script 6f1c0f0b8c
Merge rust-bitcoin/rust-bitcoin#4131: fuzz: add coverage for Display for Script
2688abad19 fuzz: add coverage for Display for Script (Bruno Garcia)

Pull request description:

  We currently have the `script_bytes_to_asm_fmt` which fuzzes the `fmt_asm` function. However, this function is deprecated and the script's Display impl should be used instead. This PR adds fuzz coverage for it.

ACKs for top commit:
  tcharding:
    ACK 2688abad19
  apoelstra:
    ACK 2688abad19198128d799d020d28945a0aaeb1fef; successfully ran local tests; nice!

Tree-SHA512: 80aaeb7f6b0ae735554df2280822ea1be2a6b5576e0afd7fbfba65315f20bc44ef280e12a25415c6dda226b3b9632f6ea9ab34c3b22fc92e60d14a0f7e1de053
2025-02-28 15:14:04 +00:00
merge-script 2951345426
Merge rust-bitcoin/rust-bitcoin#4129: Move taproot back to bitcoin crate
cf12ba262a Move taproot back to bitcoin crate (Tobin C. Harding)

Pull request description:

  I don't know what I was thinking when I move the taproot hash types to `primitives`. As correctly pointed out by Kix we agreed to only have blockdata in `primitives`.

  Move the taproot hash types back to `bitcoin::taproot` and remove the extension traits.

ACKs for top commit:
  Kixunil:
    ACK cf12ba262a
  apoelstra:
    ACK cf12ba262a646a6341098ee3f4c178a52fc90211; successfully ran local tests

Tree-SHA512: 0c5eabf395c05a93603a46b277c6ea2cc547f3894eef182fceb80f309123d67fe457936a388bac0249ec24cae7521eaef3bf8bd8facca5282e4ce2ea6fafd5f7
2025-02-28 14:10:13 +00:00
kilavvy bb8f833ca0
Update instruction.rs 2025-02-28 12:35:52 +01:00
kilavvy 0ce622e668
Update message.rs 2025-02-28 12:35:17 +01:00
kilavvy f61941bbe6
Update serialized_signature.rs 2025-02-28 12:34:45 +01:00
kilavvy 1d2de62e01
Update mod.rs 2025-02-28 12:34:21 +01:00
looklose ce19d40a80 chore: fix some typos in comments
Signed-off-by: looklose <shishuaiqun@yeah.net>
2025-02-28 17:55:31 +08:00
Tobin C. Harding 8787304425
units: Improve code comment on macros
We have two macros that are hidden because they are code de-duplication
tools. However the output they produce is, and has to be, stable so that
we can use them in `units` and `primitives` without inadvertently
breaking semver in `primitives`.
2025-02-28 08:47:11 +11:00
merge-script 4f895a7b4e
Merge rust-bitcoin/rust-bitcoin#4119: chore: remove redundant words in CONTRIBUTING.md
083a33af85 chore: remove redundant words in CONTRIBUTING.md (costcould)

Pull request description:

ACKs for top commit:
  tcharding:
    ACK 083a33af85
  apoelstra:
    ACK 083a33af85d6e6fb9080049b21fd3ddeb79a63de; successfully ran local tests

Tree-SHA512: 7ec7d6f4a38630a1c2ab73674d431c8950eed6569589f16a6ae48425de39eb94e11a35f865e32d721f1ff0d51ebef0604ad0bc7236e37f666473405b2e2cd6ab
2025-02-27 20:39:59 +00:00
merge-script e406eceebe
Merge rust-bitcoin/rust-bitcoin#4118: fix: typos in documentation files
83bd83385e Update sighash.rs (leopardracer)
fc4ea87429 Update transaction.rs (leopardracer)
0e70e85a1a Update key.rs (leopardracer)
f7c28ab44d Update input_string.rs (leopardracer)

Pull request description:

  This pull request contains changes to improve clarity, correctness and structure.
  - Corrected typos in multiple files (e.g., `transacton` → `transaction`, `function panics` formatting).
  - Improved readability of comments in `transaction.rs`, `key.rs`, and `input_string.rs.`
  - No functional code changes, only documentation updates.

  This message provides a clear summary of what was done and why the changes were made. Let me know if you need any modifications!

ACKs for top commit:
  Kixunil:
    ACK 83bd83385e
  tcharding:
    ACK 83bd83385e
  apoelstra:
    ACK 83bd83385e0bbad993f96f5abbe51f71d199aad1; successfully ran local tests

Tree-SHA512: ec0cae0357dd8c60e9286db71c3d18dfa6ba7acbaa27cce78c0586ab73c9631ea58ab453acd85b18d4edd72dcc578a4e08d69b9529e856837d5651efa288a4db
2025-02-27 19:02:22 +00:00
merge-script 889a2668d4
Merge rust-bitcoin/rust-bitcoin#4100: Witness taproot fixes
a8168c3f81 Add `taproot_leaf_script` methood to `Witness` (Martin Habovstiak)
59f21a291f Add a test case checking `taproot_control_block` (Martin Habovstiak)
e810ecff7c Fix key/script spend detection in `Witness` (Martin Habovstiak)

Pull request description:

  Fixes #4097

  High priority because it blocks a bunch of work and should be probably swiftly backported.

  My plan is to backport this entire PR and then in the breaking version remove the broken `tapscript` method entirely. Keeping it around would be way too confusing if we're going to have tagged script.

ACKs for top commit:
  tcharding:
    ACK a8168c3f81
  apoelstra:
    ACK a8168c3f81a76165022af3f3aeec82317d8a6bf1; successfully ran local tests

Tree-SHA512: 9e3c065f045664c7e4fdf8ba4d9e7dc9281a59eda1187f39b297861714007d58e9e5071c37e1f3b16d171372313ae06aca2d98425a06a6be557718d9f73c0e14
2025-02-27 17:44:12 +00:00
merge-script d889767273
Merge rust-bitcoin/rust-bitcoin#4076: units: macroize the op implementations
814685e551 Macroise the NumOpResult tests (Tobin C. Harding)
a44a9d31f6 Add a few impls to the result macro (Andrew Poelstra)
353c23fa01 units: pull generic op impls on NumOpResult into macro (Andrew Poelstra)
21ac5aefe0 units: extend op reference macro to handle generics and where clauses (Andrew Poelstra)
ad9564895b units: replace a gazillion more macro calls with new macro (Andrew Poelstra)
0dc7f6cebd units: rearrange a bit of code to prep the next commit (Andrew Poelstra)
a358e79a85 units: allow multiple invocations in impl_op_for_references macro (Andrew Poelstra)
2da332e04a units: introduce impl_op_for_references and use it in three places (Andrew Poelstra)
c90559de8e Derive Copy for NumOpResult (Tobin C. Harding)

Pull request description:

  This introduces a general macro which takes some number of `impl ops::Whatever<A> for <B>` and replicates them with all the permutations of references. It also takes a syntax which resembles the code for the initial impl block.

  Uses it for all the binary opcodes on `Amount`, `SignedAmount`, `Weight`, `FeeRate`, as well as the numeric mul/div on those types, as well as generic impls on `NumResultOp<T>` (which are expanded to cover more cases).

ACKs for top commit:
  tcharding:
    ACK 814685e551

Tree-SHA512: 6b2ec389373ad50af6681f18fa13b3892bdee953541e6b854d187e6f49ec5e924aae812d4f0ad121f1ff34566161ebea3ce34f2aa87f3f3bda74a5af970add70
2025-02-27 16:46:08 +00:00
leonarddt05 539d45420a
Typo fix in: README.md
Hi,

I suggest some typo fix' for this doc:

1- "since these are needed to display hashes anway." 
Should be "since these are needed to display hashes anyway." (spelling error).

2- "bench mark" and "bench marks" Should be "benchmark" and "benchmarks" (incorrect spacing; "benchmark" is a single word).

Thanks.
2025-02-27 12:40:30 +03:00
Erik De Smedt f7ea6e50b5 Add support for pay to anchor outputs
Add support for the newly created Pay2Anchor output-type.

See https://github.com/bitcoin/bitcoin/pull/30352
2025-02-27 08:57:00 +01:00
merge-script 5b6eebda8a
Merge rust-bitcoin/rust-bitcoin#4117: Grab missing changelog
2d6ee57d9c Grab missing changelog (Tobin C. Harding)

Pull request description:

  We release `v0.32.4` and `v0.32.5` already but forgot to merge the changelog entries back into master.

  Grab the missing changelog entries from the `0.32.x` release branch.

ACKs for top commit:
  Kixunil:
    ACK 2d6ee57d9c
  apoelstra:
    ACK 2d6ee57d9c67a49a39eaf89781129a63c7d05e1a; successfully ran local tests

Tree-SHA512: bfa4d8ef2c58f1cc74c6a027ed33bab70a660c3bfcf2d2a72839741a3beb5ef6a355e1ca99e3aaa24a77a48f8c678a84d1c0bf7e5e30c1b33496b866e8667351
2025-02-26 22:55:37 +00:00
ndungudedan 25707da14a
hashes: Remove Clone trait bound from Tag
Implementors of the Tag trait had to use the #[derive(Clone)] attribute.
This change eliminates this need by removing the Clone trait
bound from the Tag trait.
2025-02-26 22:13:53 +03:00
jrakibi 2fe3687899 Policy: Relax MIN_STANDARD_TX_NONWITNESS_SIZE to 65
Align with Bitcoin Core's policy by reducing the minimum non-witness
transaction size from 82 to 65 bytes. This change allows for more
minimal transaction cases (e.g., 1 input with 1 OP_RETURN output),
while still maintaining protection against CVE-2017-12842.

Matches bitcoin/bitcoin#26398
2025-02-27 00:20:08 +07:00
Bruno Garcia 2688abad19 fuzz: add coverage for Display for Script 2025-02-26 09:04:59 -03:00
Tobin C. Harding cf12ba262a
Move taproot back to bitcoin crate
I don't know what I was thinking when I move the taproot hash types to
`primitives`. As correctly pointed out by Kix we agreed to only have
blockdata in `primitives`.

Move the taproot hash types back to `bitcoin::taproot` and remove the
extension traits.
2025-02-26 15:45:49 +11:00
Tobin C. Harding 43ae9d7516
primitives: Hide script error internals
As part of the 1.0 effort and forward maintainability hide the internals
of the two error types in the `script` module. Add getters to get at the
invalid size.
2025-02-26 11:05:07 +11:00
Tobin C. Harding 2d8227f091
Hide relative locktime error internals
As part of the 1.0 effort and forward maintainability hide the internals
of the two error types in the `relative` locktime module. Doing so
allows us to remove the `non_exhaustive` attribute. Add getters to get
at the error innards.
2025-02-26 11:04:58 +11:00
merge-script aebda6e516
Merge rust-bitcoin/rust-bitcoin#4104: Automated daily update to rustc (to nightly-2025-02-21)
ca8bd531d6 Automated update to Github CI to rustc nightly-2025-02-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 ca8bd531d6

Tree-SHA512: 39f9ee068cdafde4d50cebfbf9fd3b96377d12e0c98a059e835f61bfbe57f77f4e84a629082dc38aa40aabb190e66dbd95ab4ba6423f816796534fe28f89e6f8
2025-02-26 10:50:36 +11:00
Tobin C. Harding 814685e551
Macroise the NumOpResult tests
Macroise the tests improving coverage along the way.

Includes a TODO to remind us to do `Neg` more fully.
2025-02-25 20:46:01 +00:00
Andrew Poelstra a44a9d31f6
Add a few impls to the result macro
Add a few missing impls to the `impl_op_for_references` macro.

Includes a minor whitespace change so that traits are grouped together.
2025-02-25 20:45:56 +00:00
Andrew Poelstra 353c23fa01
units: pull generic op impls on NumOpResult into macro 2025-02-25 20:44:30 +00:00