Commit Graph

3308 Commits

Author SHA1 Message Date
Andrew Poelstra 19a723c7ff
Merge rust-bitcoin/rust-bitcoin#2092: Bump model-checking/kani-github-action from 0.36 to 0.37
9fa2111c12 Bump model-checking/kani-github-action from 0.36 to 0.37 (dependabot[bot])

Pull request description:

  Bumps [model-checking/kani-github-action](https://github.com/model-checking/kani-github-action) from 0.36 to 0.37.
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="7c99bc77b4"><code>7c99bc7</code></a> Update Kani version to 0.37.0 (<a href="https://redirect.github.com/model-checking/kani-github-action/issues/49">#49</a>)</li>
  <li>See full diff in <a href="https://github.com/model-checking/kani-github-action/compare/v0.36...v0.37">compare view</a></li>
  </ul>
  </details>
  <br />

  [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=model-checking/kani-github-action&package-manager=github_actions&previous-version=0.36&new-version=0.37)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

  </details>

ACKs for top commit:
  apoelstra:
    ACK 9fa2111c12
  clarkmoody:
    ACK 9fa2111c12

Tree-SHA512: fb7e2913718aba03915b3ee3d4644ba6acca12012466c1001fe951f35e2877cefd30db83a29c773807829af3ba3ed9f1d2539e19d107509999e507079c43b926
2023-09-25 14:12:15 +00:00
Andrew Poelstra 55c5408aff
Merge rust-bitcoin/rust-bitcoin#2091: Remove default impl from transaction version
f31fb08651 Remove default impl from transaction version (Tobin C. Harding)

Pull request description:

  There is no logical default for the transaction version number, there is only pre-bip68 (v1) and post-bip68 (v2). Uses should specify the version they want not rely on us making the choice.

  (I originally added this impl to support testing, this was in hindsight the wrong thing to do, props to Sanket for noticing.)

  Discussed in comments here: https://github.com/rust-bitcoin/rust-bitcoin/pull/2006#issuecomment-1732385464

ACKs for top commit:
  clarkmoody:
    ACK  f31fb08651
  apoelstra:
    ACK f31fb08651

Tree-SHA512: 1112c35173d6b2e7d6c50f058b1964fc8b633615ae703b0c1231e701a3e322fd55d3a8377c7ea078f28f523b15b7de6e9eca844226fcd19528206161d75dcfdf
2023-09-25 13:48:35 +00:00
dependabot[bot] 9fa2111c12
Bump model-checking/kani-github-action from 0.36 to 0.37
Bumps [model-checking/kani-github-action](https://github.com/model-checking/kani-github-action) from 0.36 to 0.37.
- [Release notes](https://github.com/model-checking/kani-github-action/releases)
- [Commits](https://github.com/model-checking/kani-github-action/compare/v0.36...v0.37)

---
updated-dependencies:
- dependency-name: model-checking/kani-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 10:34:39 +00:00
Tobin C. Harding c34e3cc7cc
Re-write size/weight API
Recently we introduced a bug in the weight/size code, while
investigating I found that our `Transaction`/`Block` weight/size APIs
were in a total mess because:

- The docs were stale
- The concept of weight (weight units) and size (bytes) were mixed up

I audited all the API functions, read some bips (141, 144) and re-wrote
the API with the following goals:

- Use terminology from the bips
- Use abstractions that mirror the bips where possible
2023-09-25 08:25:49 +10:00
Tobin C. Harding 24e5e19ed0
Add changelog entries
Add changelog entries to `bitcoin` after going through all merged PRs
upto July 24 (Sydney time).
2023-09-25 07:44:26 +10:00
Tobin C. Harding 79f2157311
bitcoin: Grab changelog entry from 0.30.1 release
In preparation for adding a 0.31.0 changelog entry grab the changelog
entry from the 0.30.1 tagged release branch so it does not get lost.
2023-09-25 07:43:53 +10:00
Tobin C. Harding 8cd409d561
Deprecate push_bitcoin_signature
The `Witness::push_bitcoin_signature` method is old and a bit stale.
Bitcoin has taproot signatures now so the name is stale, also we have
the `crate::ecdsa::Signature` type that holds the secp sig and the hash
type so we can use that instead of having two separate parameters.

Add a new, up to date, `Witness::push_ecdsa_signature` function and
deprecate the `push_bitcoin_signature` one.
2023-09-25 07:21:20 +10:00
Tobin C. Harding f31fb08651
Remove default impl from transaction version
There is no logical default for the transaction version number, there is
only pre-bip68 (v1) and post-bip68 (v2). Uses should specify the version
they want not rely on us making the choice.

(I originally added this impl to support testing, this was in hindsight
the wrong thing to do, props to Sanket for noticing.)
2023-09-25 05:51:24 +10:00
Clark Moody 72a7280d7d
Merge pull request #2006 from tcharding/08-18-tx-version
Add transaction::Version data type
2023-09-23 13:13:52 -05:00
Tobin C. Harding 73f7fbf520
Add code comments to transaction serialization
In an attempt to help super new devs add code comments about transaction
serialization formats pre and post segwit.
2023-09-23 14:38:25 +10:00
Tobin C. Harding 29f20c1d0b
Add segwit serialization constants
One of our stated aims is to make it possible to learn bitcoin by using
our library. To help with this aim add to private consts for the segwit
transaction marker and flag serialization fields.
2023-09-23 14:38:25 +10:00
Andrew Poelstra 141d805ddc
Merge rust-bitcoin/rust-bitcoin#2073: Feature: Count sigops for Transaction
158ba26a8a Feature: Count sigops for Transaction (junderw)

Pull request description:

  I copied over the sigop counting logic from Bitcoin Core, but I made a few adjustments.

  1. I removed 2 consensus flags that checked for P2SH and SegWit activation. This code assumes both are activated. If we were to include that, what would be a good way to go about it? (ie. If I run this method on a transaction from the 1000th block and it just so happened to have a P2SH-like input, Bitcoin Core wouldn't accidentally count those sigops because the consensus flag will stop them from running the P2SH logic. Same goes for SegWit)
  3. Since there's no guarantee that we have an index from which we can get the prevout scripts, I made it into a generic closure that looks up the prevout script for us. If the caller doesn't provide it, We can only count sigops directly in the scriptSig and scriptPubkey (no P2SH or SegWit).

  ## TODO
  - [x] Write tests for transaction sigop counting

  ~~Edit: The test changes are just to get the 1.48 tests passing. I'll remove them and replace them with whatever solution that is agreed upon in another PR etc.~~

  Edit 2: This is the code I used as a guide:

  8105bce5b3/src/consensus/tx_verify.cpp (L147-L166)

  Edit 3: I found a subtle bug in the implementation of `count_sigops` (https://github.com/rust-bitcoin/rust-bitcoin/pull/2073#issuecomment-1722403687)

ACKs for top commit:
  apoelstra:
    ACK 158ba26a8a
  tcharding:
    ACK 158ba26a8a

Tree-SHA512: 2b8a0c50b9390bfb914da1ba687e8599b957c75c511f764a2f3ed3414580150ce3aa2ac7aed97a4f7587d3fbeece269444c65c7449b88f1bdb02e573e6f6febd
2023-09-22 17:12:29 +00:00
Tobin C. Harding 34b20dfed1
Remove unused internals dependency 2023-09-22 12:36:00 +10:00
Andrew Poelstra 675fd54c95
Merge rust-bitcoin/rust-bitcoin#1951: Use newly released bech32 API
e4c7e01a6f Use the new bech32 iterator API (Tobin C. Harding)

Pull request description:

  Depend on the newly released version of `bech32`, BOOM!

ACKs for top commit:
  apoelstra:
    ACK e4c7e01a6f
  clarkmoody:
    ACK e4c7e01a6f

Tree-SHA512: 91675a830cf67f8dcabd42e7dc1b70d80b669330be5244bb8102e0ec5d1a206d5ead07f73b328a158b761c328bc78d573185af8d31f14183ccc17318d752c02b
2023-09-21 22:26:51 +00:00
junderw 158ba26a8a
Feature: Count sigops for Transaction
Co-authored-by: Tobin C. Harding <me@tobin.cc>
2023-09-21 14:50:23 -07:00
Andrew Poelstra c32c7d1611
Merge rust-bitcoin/rust-bitcoin#2026: Use valid Psbt for serde regression test
95b7a95fc2 test: correct psbt used for regression test (Subhradeep Chakraborty)

Pull request description:

  The `unknown` key used in the `Psbt` (in `serde_regression_psbt` test) is not really unknown. Also the `preimages` in the `Input` don't seem to be valid. Though they don't affect the tests because of the `serde::serialize`, the `Psbt` itself is invalid and hence this PR.

ACKs for top commit:
  tcharding:
    ACK 95b7a95fc2
  apoelstra:
    ACK 95b7a95fc2

Tree-SHA512: 275320bb273163364640351e55a3f16c34c1eef06e9dde79b72bf40187d313f037edb5e4544f4dce32fb8a7cc552504aa2e4d22a646c89a3dec022f917539219
2023-09-21 18:53:54 +00:00
Andrew Poelstra f71948a778
Merge rust-bitcoin/rust-bitcoin#2021: Move and rename `XpubIdentifier`
b2a7d7023c Rename XpubIdentifier to XKeyIdentifier (Tobin C. Harding)
ffd2466ad1 Move XpubIdentifier to the bip32 module (Tobin C. Harding)

Pull request description:

  - Patch 1: Move the hash to the `bip32` module where it is used, as we have done with other hashes recently (and re-export it at crate root).
  - Patch 2: Rename the hash to `XKeyIdentifier` as discussed in #2014

  Fix: #2014

ACKs for top commit:
  apoelstra:
    ACK b2a7d7023c

Tree-SHA512: 5efa9fc857c71e506263bf6adee3b4294f22838d5b119177c9108c69191d545338c11a4796bc95e956a67f3418010725f3d12c06d2c4c3bb5cf038d59976ae0f
2023-09-21 17:55:31 +00:00
Andrew Poelstra eda7e7df0d
Merge rust-bitcoin/rust-bitcoin#2068: Fixes #2011: Customize Debug implementation of `absolute::LockTime`
71a5fe2b54 Customize Debug implementation of absolute::LockTime (Subhradeep Chakraborty)

Pull request description:

  Fixes https://github.com/rust-bitcoin/rust-bitcoin/issues/2011.

  This PR aims to make the "pretty print" of `absolute::LockTime` prettier by printing `X blocks` and `X seconds` for `Blocks` and `Seconds` respectively instead of the default Enum printing.

ACKs for top commit:
  apoelstra:
    ACK 71a5fe2b54
  tcharding:
    ACK 71a5fe2b54

Tree-SHA512: 79baad5ee0ba1aa892cb38588dae6a24977b8e42356208d6cc9adb007d1f8371e61dc82e35bb4dac9961216d68c56907f0db376c5c6fbb5a406728b8f7c3f5ad
2023-09-21 17:03:59 +00:00
Andrew Poelstra fc52fd9ced
Merge rust-bitcoin/rust-bitcoin#2045: Use correct terminology: carve out
b229fd5555 Use correct form for noun: carve-out (Tobin C. Harding)

Pull request description:

  One "carves out" something, not "carve output" - woops.

ACKs for top commit:
  apoelstra:
    ACK b229fd5555

Tree-SHA512: 196c5c239da35a67b83eb96f2f9346af6518af51ff6bb4a9e40cddab8c8511f2e913278a9727bfe4e97d50c58cb87a4100e40c13c8313643b04a2d0fabaaa9e5
2023-09-21 16:55:44 +00:00
Andrew Poelstra 36805b5283
Merge rust-bitcoin/rust-bitcoin#1994: Remove redundant segwit version from function names
bc398204bf Remove redundant segwit version from function names (Tobin C. Harding)

Pull request description:

  A P2TR output does not need to be clarified with version 1, it is implicit. As with p2wpkh/p2wsh and version 0.

  Remove redundant version identifiers from function names, deprecating the originals.

ACKs for top commit:
  apoelstra:
    ACK bc398204bf

Tree-SHA512: 49806c564badca25ce02161445b2b41497b565f2002aa1edfc0cf0c57b38683480deec0d9b682e18dc7e59c22128e0b641abcccc2cbedd0b5603cbcbf2fd26df
2023-09-21 16:10:50 +00:00
Andrew Poelstra f80ec98f35
Merge rust-bitcoin/rust-bitcoin#2002: Remove unnecessary reference
f17bb0d18f Remove unnecessary reference (Tobin C. Harding)

Pull request description:

  `T` is a generic that implements`AsRef<PushBytes>`, it should not be a reference. This is inline with other usages of `AsRef<PushBytes>` for example in `Builder::push_slice`.

  Found while working on #2003

ACKs for top commit:
  apoelstra:
    ACK f17bb0d18f

Tree-SHA512: 6f6ae0ba5d5010db53d9c2af107df84bc058277b2b7cc35800f4e6ed93d351838b7f101284b7d80345bee639615d27d76a2e5c4c784782c5b3e5090444defe29
2023-09-21 14:23:50 +00:00
Subhradeep Chakraborty 95b7a95fc2 test: correct psbt used for regression test 2023-09-21 11:45:18 +05:30
Tobin C. Harding e4c7e01a6f
Use the new bech32 iterator API
Use the new bech32 iterator API that Andrew and I wrote.
2023-09-21 15:10:57 +10:00
Tobin C. Harding c950ef4bbd
Add transaction::Version data type
BIP-68 activated a fair while ago (circa 2019) and since then only
transaction versions 1 and 2 have been considered standard.

Currently in our `Transaction` struct we use an `i32`, this means users
can construct a non-standard transaction if they do not first look up
what the value should be. We can help folk out here by abstracting over
the version number.

Since the version number only governs standardness elect to make the
inner `i32` public (ie., not an invariant). The aim of the type is to
make life easy not restrict what versions are used.

Add transaction::Version data type that simply provides two consts `ONE`
and `TWO`.

Add a `Default` impl on `Version` that returns `Version::TWO`.

In tests that used version 0, instead use `Version::default` because the
test obviously does not care.
2023-09-21 15:02:02 +10:00
Andrew Poelstra a2a4efbe6a
Merge rust-bitcoin/rust-bitcoin#1975: Prepare for using new bech32 release
52f2332383 Remove docs from witness version conversion functions (Tobin C. Harding)
47d6d785cb Remove bip 173/350 test vectors (Tobin C. Harding)
e0eaeaad99 Split ParseError out of Error (Tobin C. Harding)
0f536e86dc Add new UnknownAddressTypeError for parsing address type (Tobin C. Harding)
e2014cba1b Import error variants within dislay impl (Tobin C. Harding)
9d7791fcd6 Remove unnecessary self:: from error import (Tobin C. Harding)
b2e485ed51 Split the address error code out into a separate module (Tobin C. Harding)
f34ca0c52b Move address.rs to address/mod.rs (Tobin C. Harding)

Pull request description:

  In preparation for depending on the recently released version of `rust-bech32` do a bunch of preparatory fixes.

  1. Improve `address` module error handling as we are doing else where at the moment
  2. Remove bip 173 and 350 test vector tests, these are fully covered in bech32
  3. Trim down the docs on `WitnessVersion`

  This PR is the first 8 patches of https://github.com/rust-bitcoin/rust-bitcoin/pull/1951

ACKs for top commit:
  sanket1729:
    ACK 52f2332383
  apoelstra:
    ACK 52f2332383

Tree-SHA512: 67a4ea4020b4e5c9c8396e4195e06dbd1d11335788f9e52f60abbc0b399e37e5dacc9bb7fa4e88221670322fa3c3407ade059d5c709f96e2df97240f4524e08c
2023-09-20 19:54:36 +00:00
Andrew Poelstra 3b9bc9a063
Merge rust-bitcoin/rust-bitcoin#2038: Re-export Opcode
ccdcffe69c Re-export Opcode (Tobin C. Harding)

Pull request description:

  We recently rename `opcodes::All` to `Opcode` but did not re-export it from the crate root. Since it now has a nice clear name we can do so.

  Found while hacking up the `rust-bitcoincore-rpc` dependency upgrade for upcoming release `bitcoin v0.31.0`.

ACKs for top commit:
  apoelstra:
    ACK ccdcffe69c

Tree-SHA512: 8acac90d01f14245f93edc10f3483d8aa9865aca59b6ef42ab744b875558fca8ad74894ad95a83637f0cec7a2a353d74d4d6f7ee5f1d1276cc0fc3dcb6983362
2023-09-20 17:33:53 +00:00
Andrew Poelstra f4c83b4d8e
Merge rust-bitcoin/rust-bitcoin#2078: Script helper to classify bare multisig
acbf23aaa5 Add `is_multisig` helper to Script type (Clark Moody)

Pull request description:

  A new `is_multisig` helper method to classify bare multisig output scripts.

  The form of a valid multisig script is:
  - Pushnum `M`
  - &lt;N&gt; pubkeys
  - Pushnum `N`
  - `OP_CHECKMULTISIG`

  `N` must equal the number of pushed pubkeys, and `M` must be less than or equal to `N`.

  I've tested this against the RPC output of Core at the block level, checking that the total number of multisig outputs matches.

  ```
  Block 350338, 89 multisig
  Block 350340, 29 multisig
  Block 350341, 4 multisig
  Block 350343, 579 multisig
  Block 350344, 48 multisig
  Block 350346, 11 multisig
  Block 350347, 404 multisig
  Block 350350, 127 multisig
  Block 350351, 1 multisig
  Block 350353, 40 multisig
  Block 350356, 13 multisig
  Block 350357, 2 multisig
  Block 350358, 1 multisig
  ```

ACKs for top commit:
  tcharding:
    ACK acbf23aaa5
  apoelstra:
    ACK acbf23aaa5

Tree-SHA512: b8feeaa8725ac63a658897dac3b303fc8b3d56674d796b14569548124928329993bea45482928d9ce85231f1b5837922af8c0a77b2601a92f88b5e2a9394e97f
2023-09-20 16:38:33 +00:00
Andrew Poelstra 6e6847a263
Merge rust-bitcoin/rust-bitcoin#2075: Bugfix: Script::count_sigops should not return a Result
026a55809e Fix: Script::count_sigops parsing should not return a Result (junderw)

Pull request description:

  When implementing some tests for the Transaction PR, I noticed that there were coinbase transactions that would pass Bitcoin Core parsing and fail my code.

  It turns out that the Script parsing for sigops calls `break`  to exit the loop and returns the current n value whenever there is an EarlyEndOfScript error.

  See this comment: https://github.com/rust-bitcoin/rust-bitcoin/pull/2073#issuecomment-1722403687 for some links to the relevant source.

ACKs for top commit:
  apoelstra:
    ACK 026a55809e
  tcharding:
    ACK 026a55809e

Tree-SHA512: 57c1b88add5e1c9ef9245fcec0e471db55c2f9b1b0b0f8ebd471f1bede0ca5eeb8492d8c75dea1fd43f1343037df44969c9b9fde26a7de9ac68a26dca899e47f
2023-09-20 15:53:30 +00:00
Andrew Poelstra f5b1788ec7
Merge rust-bitcoin/rust-bitcoin#2081: Feature: Instruction can read the script number
cd15c746cb Feature: Instruction can read the script number (junderw)

Pull request description:

  This new method on `Instruction` will allow for interpreting the Instruction as a script number (i32)

ACKs for top commit:
  tcharding:
    ACK cd15c746cb
  apoelstra:
    ACK cd15c746cb

Tree-SHA512: 597add5ab28b53b7f61633b2e2005bed2c8fe4777575c9498c9a5431e4b020cf8ddf02509b1b4c1ba455e879e024d7d034636ab4863cca42567ed087b648abc3
2023-09-20 15:42:15 +00:00
junderw cd15c746cb
Feature: Instruction can read the script number 2023-09-19 21:08:17 -07:00
Tobin C. Harding 52f2332383
Remove docs from witness version conversion functions
These docs do not add that much value, we do not typically bother
documenting `From` and `TryFrom` implementations because they are super
well known and its obvious from the function signature what is going on.
2023-09-20 13:13:56 +10:00
Tobin C. Harding 47d6d785cb
Remove bip 173/350 test vectors
The BIP-173 and BIP-350 test vectors are implemented in `rust-bech32`,
no need to duplicate those tests here.
2023-09-20 13:13:56 +10:00
Tobin C. Harding e0eaeaad99
Split ParseError out of Error
The `address::Error` is module level general, we can make the code
easier to maintain and easier to stabalize by splitting the parse error
out of the general error.

Create a `ParseError` that is returned by `FromStr for Address`. Remove
the now unused variants from the general `address::Error`.
2023-09-20 13:13:56 +10:00
Tobin C. Harding 0f536e86dc
Add new UnknownAddressTypeError for parsing address type
There is no need to use the general `address::Error` when parsing an
address type, there is only one error path.
2023-09-20 13:13:56 +10:00
Tobin C. Harding e2014cba1b
Import error variants within dislay impl
In an effort to reduce the number of lines of code import the error
variants locally within the `Display` impl on `Error`.

Refactor only, no logic changes.
2023-09-20 13:13:55 +10:00
Tobin C. Harding 9d7791fcd6
Remove unnecessary self:: from error import
`Error` is in this file, no need for `self::Error`.
2023-09-20 13:13:55 +10:00
Tobin C. Harding b2e485ed51
Split the address error code out into a separate module
Split the error code out of `address/mod.rs` and into
`address/error.rs`. Code move only, no changes other than to
imports/exports etc. to make it build.
2023-09-20 13:13:55 +10:00
Tobin C. Harding f34ca0c52b
Move address.rs to address/mod.rs
In preparation for splitting out the error code move `address.rs` to
`address/mod.rs`.

File move only, no other changes.
2023-09-20 13:13:55 +10:00
Clark Moody acbf23aaa5
Add `is_multisig` helper to Script type 2023-09-19 21:37:14 -05:00
junderw 026a55809e
Fix: Script::count_sigops parsing should not return a Result 2023-09-19 00:33:54 -07:00
Andrew Poelstra e70836c871
Merge rust-bitcoin/rust-bitcoin#2077: CI: Pin `syn`
f5bc9b3cd4 Remove pinning docs from readme (Tobin C. Harding)
34890827ae Pin syn to 2.0.32 (Tobin C. Harding)

Pull request description:

  Lets see if this fixes CI.

ACKs for top commit:
  apoelstra:
    ACK f5bc9b3cd4

Tree-SHA512: 71b5a9b12782948a7fa2c6a4c9448d580ccde6c347eb9d399f97cf16d7b5dd7bbac19b2906eeccaa3cd6ff289a797d210518edbe985aa7a340ac6723cd0188e1
2023-09-19 00:41:41 +00:00
Tobin C. Harding f5bc9b3cd4
Remove pinning docs from readme
The pinning docs are stale; the single source of truth for pinning is
the CI script.

Remove the stale pinning docs and just point devs towards the CI script.
2023-09-19 06:33:33 +10:00
Tobin C. Harding 34890827ae
Pin syn to 2.0.32
We have a dependency on `syn` deep in the dependency graph that is
breaking MSRV, just pin the damn thing to 2.0.32
2023-09-19 05:37:35 +10:00
Subhradeep Chakraborty 71a5fe2b54 Customize Debug implementation of absolute::LockTime 2023-09-15 22:59:26 +05:30
Andrew Poelstra bbe4800607
Merge rust-bitcoin/rust-bitcoin#2046: Add one ACK carve-out
4222e4d817 Add one-ack carve outside (Tobin C. Harding)

Pull request description:

  In an effort to reduce review burden add so strict rules defining 3 times where we think it is acceptable for code to be merged with a single ACK. Feels a bit like we only just added the refactor carve-out and now we are adding more carve-outs, so whats next? We should take these rules seriously, if we are to be taken seriously.

  ```
  We reserve the right to merge PRs with a single ACK [0], at any time, if they match
  any of the following conditions:

  1. PR only touches CI i.e, only changes any of the `test.sh` scripts and/or
     stuff in `.github/workflows`.
  2. Non-content changing documentation fixes i.e., grammar/typos, spelling, full
     stops, capital letters. Any change with more substance must still get two
     ACKs.
  3. Code moves that do not change the API i.e., moving error types to a submodule
     and re-exporting them from the original module.  Must not include any code
     changes except to import paths.

  [0] - Obviously author and ACK'er must not be the same person.
  ```

ACKs for top commit:
  apoelstra:
    ACK 4222e4d817
  sanket1729:
    ACK 4222e4d817
  RCasatta:
    ACK 4222e4d817

Tree-SHA512: b85645213a38e9d6dcb1a81ff2de3e24768716541ed34c250c66179ee7b19d426ec0bfc34386c7bb32cdc182de07146ac55a8c30c895e8b9febb498fbe1b3440
2023-09-14 13:34:37 +00:00
Riccardo Casatta 3dc75b5071
Merge rust-bitcoin/rust-bitcoin#2041: Fix deprecation notice
a0a3d4728a Fix deprecation notice (Tobin C. Harding)

Pull request description:

  Recently we deprecated the `segwit_signature_hash` function but during development the deprecation notice got stale.

  Fix deprecation notice to use the actual function names.

ACKs for top commit:
  RCasatta:
    ACK a0a3d4728a
  apoelstra:
    ACK a0a3d4728a

Tree-SHA512: d84941b605c5bc6ceab75cd60eb820c1d2c16fcd1431dc3927dc22d79886d3de26fd796fab92d97e7f8d567eab0b5a1987303107720524e7b648b1168541a2ed
2023-09-12 09:01:02 +02:00
Riccardo Casatta 25b81dddc1
Merge rust-bitcoin/rust-bitcoin#2048: hashes: Remove duplicate entry
cd47daf13f hashes: Remove duplicate entry (Tobin C. Harding)

Pull request description:

  We accidentally mentioned an error change twice, remove the entry without the PR link.

ACKs for top commit:
  apoelstra:
    ACK cd47daf13f
  RCasatta:
    ACK cd47daf13f

Tree-SHA512: 94189596ece5e4cd71da256c85eefb77bbec3b1d9fa3f7198d4cf9d3b2120be6dd841ec5dc5575fb4a501c6b0c662861fe69703a2937f6e7b7706f93099376b2
2023-09-12 08:57:43 +02:00
Riccardo Casatta 374484ca76
Merge rust-bitcoin/rust-bitcoin#2063: Fix: IndexOutOfBoundsError Display impl has values in wrong order
c98106ef2e Fix: IndexOutOfBoundsError Display impl has values in wrong order (junderw)

Pull request description:

  Simple self explanatory fix.

ACKs for top commit:
  apoelstra:
    ACK c98106ef2e
  RCasatta:
    utACK c98106ef2e

Tree-SHA512: d08e1f71283a3ef100947418f29caa860080eb32e35ed978710a17694222ab71fc25c0fcc8cdef7af049d9f5ea72319467ef5c0b51376f065ae1ea33c74680fb
2023-09-12 08:55:49 +02:00
Andrew Poelstra 4da3db1a11
Merge rust-bitcoin/rust-bitcoin#2062: Bump actions/upload-artifact from 2 to 3
0f77afdef0 Bump actions/upload-artifact from 2 to 3 (dependabot[bot])

Pull request description:

  Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p>
  <blockquote>
  <h2>v3.0.0</h2>
  <h2>What's Changed</h2>
  <ul>
  <li>Update default runtime to node16 (<a href="https://redirect.github.com/actions/upload-artifact/issues/293">#293</a>)</li>
  <li>Update package-lock.json file version to 2 (<a href="https://redirect.github.com/actions/upload-artifact/issues/302">#302</a>)</li>
  </ul>
  <h3>Breaking Changes</h3>
  <p>With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.</p>
  <h2>v2.3.1</h2>
  <p>Fix for empty fails on Windows failing on upload <a href="https://redirect.github.com/actions/upload-artifact/issues/281">#281</a></p>
  <h2>v2.3.0 Upload Artifact</h2>
  <ul>
  <li>Optimizations for faster uploads of larger files that are already compressed</li>
  <li>Significantly improved logging when there are chunked uploads</li>
  <li>Clarifications in logs around the upload size and prohibited characters that aren't allowed in the artifact name or any uploaded files</li>
  <li>Various other small bugfixes &amp; optimizations</li>
  </ul>
  <h2>v2.2.4</h2>
  <ul>
  <li>Retry on HTTP 500 responses from the service</li>
  </ul>
  <h2>v2.2.3</h2>
  <ul>
  <li>Fixes for proxy related issues</li>
  </ul>
  <h2>v2.2.2</h2>
  <ul>
  <li>Improved retryability and error handling</li>
  </ul>
  <h2>v2.2.1</h2>
  <ul>
  <li>Update used actions/core package to the latest version</li>
  </ul>
  <h2>v2.2.0</h2>
  <ul>
  <li>Support for artifact retention</li>
  </ul>
  <h2>v2.1.4</h2>
  <ul>
  <li>Add Third Party License Information</li>
  </ul>
  <h2>v2.1.3</h2>
  <ul>
  <li>Use updated version of the <code>@action/artifact</code> NPM package</li>
  </ul>
  <h2>v2.1.2</h2>
  <ul>
  <li>Increase upload chunk size from 4MB to 8MB</li>
  <li>Detect case insensitive file uploads</li>
  </ul>
  <h2>v2.1.1</h2>
  <ul>
  <li>Fix for certain symlinks not correctly being identified as directories before starting uploads</li>
  </ul>
  <h2>v2.1.0</h2>
  <ul>
  <li>Support for uploading artifacts with multiple paths</li>
  <li>Support for using exclude paths</li>
  <li>Updates to dependencies</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="a8a3f3ad30"><code>a8a3f3a</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/436">#436</a> from bethanyj28/main</li>
  <li><a href="7b48769c03"><code>7b48769</code></a> update dependency cache</li>
  <li><a href="66630398df"><code>6663039</code></a> update dist/index.js</li>
  <li><a href="55e76b779d"><code>55e76b7</code></a> bump <code>@actions/artifact</code> version</li>
  <li><a href="65d862660a"><code>65d8626</code></a> chore(github): remove trailing whitespaces (<a href="https://redirect.github.com/actions/upload-artifact/issues/313">#313</a>)</li>
  <li><a href="0b7f8abb15"><code>0b7f8ab</code></a> ci(github): update action/download-artifact from v1 to v3 (<a href="https://redirect.github.com/actions/upload-artifact/issues/312">#312</a>)</li>
  <li><a href="013d2b89ba"><code>013d2b8</code></a> Create devcontainer for codespaces + update all dev dependencies (<a href="https://redirect.github.com/actions/upload-artifact/issues/375">#375</a>)</li>
  <li><a href="055b8b3f04"><code>055b8b3</code></a> Bump Actions NPM dependencies (<a href="https://redirect.github.com/actions/upload-artifact/issues/374">#374</a>)</li>
  <li><a href="7a5d4831f7"><code>7a5d483</code></a> ci(github): update action/checkout from v2 to v3 (<a href="https://redirect.github.com/actions/upload-artifact/issues/315">#315</a>)</li>
  <li><a href="e0057a5b76"><code>e0057a5</code></a> README: Bump actions/checkout to v3 (<a href="https://redirect.github.com/actions/upload-artifact/issues/352">#352</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/actions/upload-artifact/compare/v2...v3">compare view</a></li>
  </ul>
  </details>
  <br />

  [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

  </details>

ACKs for top commit:
  apoelstra:
    ACK 0f77afdef0
  tcharding:
    ACK 0f77afdef0

Tree-SHA512: 9fe185275f7c28c4186e89b9cf22f15d000404c8c3c73c94fafa9fd953f9028b473eceb69ed100c5244f9dde559c7b5ccc066828b6ea325ce5ca6c8d84bd0748
2023-09-11 21:56:46 +00:00
junderw c98106ef2e
Fix: IndexOutOfBoundsError Display impl has values in wrong order 2023-09-11 11:25:21 -07:00