6def5bc974 CI: Use run_task from maintainer tools (Tobin C. Harding)
c5af52847b CI: Add docs and document start (Tobin C. Harding)
62ba10503a CI: Use correct spacing (Tobin C. Harding)
0c0e88165e CI: Add README file (Tobin C. Harding)
44cb2255d3 CI: Add sanitizer script (Tobin C. Harding)
3407257936 CI: Add WASM script (Tobin C. Harding)
cc14edf63f CI: Run the schemars job directly using cargo (Tobin C. Harding)
1fb12e1917 CI: Remove recent from schemars job (Tobin C. Harding)
8d7117bb0e CI: Use original name (Tobin C. Harding)
Pull request description:
First we do some clean up, then we pull the stuff that is specific to this repo out into separate tests, then as the last patch we switch over to use the new script for `rust-bitcoin-maintainer-tools` that was introduced in https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools/pull/4.
ACKs for top commit:
apoelstra:
ACK 6def5bc974
Tree-SHA512: 70105d455294d49deb43461958435096d074d19ea8d9adc7036e15d74dfdab466f04b1d9e934574077ca0c32a6fe77d0e5aa11068d8c4d51acef634591227d33
Add a document start and comment to help try to stop the readme from
going stale.
This removes a `yamllint` warning.
While we are clearing lint warnings disable the one causing
warning truthy value should be one of [false, true] (truthy)
This is a know issue with GitHub actions yaml because `on` is a yaml
keyword, or something like that.
As we did for the wasm job.
In preparation for using the `run_task` script from maintainer tools we
want to have all the things that are particular to `rust-bitcoin` out of
the current `run_task` script.
The address/memory sanitizer test is specific to `hashes`. Add a script
in `hashes/contrib` and call it from the ASAN job.
No test coverage change.
In preparation for using the `run_task` script from maintainer tools we
want to have all the things that are particular to `rust-bitcoin` out of
the current `run_task` script.
The wasm test is specific to `hashes`. Add a script in `hashes/contrib`
and call it from the wasm job.
No test coverage change.
I've been a bit confused lately about pinning and the locks, at some
stage recently I changed 'Set dependencies' to 'Copy lock file'. Its no
biggy but the original that Kix wrote was correct and descriptive - it
was me who was confused. Revert it back to the original.
7685461e62 Document the sha256t_hash_newtype direction (Tobin C. Harding)
30e91cc766 Default to forward for tagged hashes (Tobin C. Harding)
5ecc69cd28 Add forward/backward unit test (Tobin C. Harding)
9aee65d1ba Refactor tagged hash tests (Tobin C. Harding)
216422dffc Remove schemars impl for test type (Tobin C. Harding)
Pull request description:
First three patches are preparation, improvements to the units tests in `sha256t`.
From the final patch:
Displaying backward is an anomaly of Bitcoin Core's early days and the
double SHA256 hash type. We should not let this unfortunate beast leak
out into other places.
Default to displaying forward when creating a new tagged hash and remove
all the explicit attributes from `bitcoin` that just clutter the code.
This is an API break and may quietly break some users downstream - eventually we should stop doing that sort of thing.
ACKs for top commit:
apoelstra:
ACK 7685461e62
Tree-SHA512: cb8a41b207aa68ecf63cb7af7f39f7d7c8a3a27f38595867949b288a81a20bff0c17aa4c17bb099e2ecf85194d83bad23c9c9792f511b6c4cd625ff27c1affaa
Since the default display direction is now forward, use
`#[hash_newtype(backward)]`
in the rustdocs on the macro. Also add an example usage to the changelog
in case someone downstream is relying on the old default behaviour of
displaying backwards (unlikely).
d094350230 hashes: Modify trait bounds (Tobin C. Harding)
Pull request description:
Currently we require indexing trait bounds as well as `Borrow` on the `Hash` trait. We also already implement `AsRef`.
It was observed that `Borrow<[u8]>` does not best describe what we want from the `Hash` trait implementor but rather `AsRef<[u8]>` does.
Remove all the inexing trait bounds. Remove the `borrow::Borrow<[u8]>` trait bound. Add a `convert::AsRef<[u8]>` trait bound.
This leaves the `Borrow<[u8]>` implementation for hashes created with `hash_newtype`, I'm not sure if this should be removed or not.
ACKs for top commit:
apoelstra:
ACK d094350230 thanks! FWIW I think we might want to return the indexing traits one day, at least `[..]`, but we can do that post-1.0 and we have not gotten any complaints after removing them from the non-HMAC hashes, so maybe people are good with it as is.
Tree-SHA512: 2704a7e850083e4eae5844c401c6ac6fe32e0939bbe6e0fb5e21faf4745f9c98634e210f522199ceacd663be60685d7f30df6c89a7787ca11ea8294d104d813e
cf19e37785 CI: Update nightly semi-weekly (Tobin C. Harding)
Pull request description:
Updating the nightly toolchain every day is overly arduous, lets just update it twice a week.
ACKs for top commit:
apoelstra:
ACK cf19e37785 CI-only, will one-ACK merge
Tree-SHA512: c827a1805efea43b945c254775cde7d3e064ccebbcca7cf0d9ca92447e54a43ec0f41d324b3e39d70ff060620ef005e867578461d1eb4b69996d2416f69f6a05
Currently we require indexing trait bounds as well as `Borrow` on the
`Hash` trait. We also already implement `AsRef`.
It was observed that `Borrow<[u8]>` does not best describe what we want
from the `Hash` trait implementor but rather `AsRef<[u8]>` does.
Remove all the inexing trait bounds. Remove the `borrow::Borrow<[u8]>`
trait bound. Add a `convert::AsRef<[u8]>` trait bound.
This leaves the `Borrow<[u8]>` implementation for hashes created with
`hash_newtype`, I'm not sure if this should be removed or not.
b705ac62e6 Automated update to Github CI to rustc nightly-2024-05-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 b705ac62e6
Tree-SHA512: e43188c0ba5d5b38c7bdb192e5ade7f612e1867bb9825676412237200b54d4d4417c4f306339b745e1af08907d9f8a377bddabe52e6bce8af0925149506e6fa5
0a5d8b07a8 Automated update to Github CI to rustc nightly-2024-05-03 (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 0a5d8b07a8
Tree-SHA512: 98d9cfb0cffe94b78a5939e0967d73f3c5ab382527dd66bc4f4823d8327d1afe6bb2d779c467ed9e815bcf25d7ca7940d9799c189b355cc642db000e633ceb1f
71bb86232b hashes: Do not import str (Tobin C. Harding)
Pull request description:
Depending on things being in scope for macros to use is bad form, using the fully qualified path is the correct way.
Do not import `str` instead use the fully qualified path to the `core` re-export.
Use fully qualified path instead.
ACKs for top commit:
apoelstra:
ACK 71bb86232b trivial rebase
sanket1729:
ACK 71bb86232b
Tree-SHA512: 401520a5876b83ad4053bbe9b1e8cd9ff2e723cf86f95e47891a6411ad5e9af4f904e19ccaaab80d342dfe4745753c24af168dcbc8170fb6b39da08e577d30ae
e565e06b0c just: Add just fmt (Tobin C. Harding)
Pull request description:
We already have a `just` command to check the formatting, add one to run the formatter. Use the more terse `just fmt` although the difference from `just format` is not super obvious it is documented in the default output of `just`.
With this applied we have
```bash
$ just
Available recipes:
build # Cargo build everything.
check # Cargo check everything.
default
fmt # Run cargo fmt
format # Check the formatting
lint # Lint everything.
sane # Quick and dirty CI useful for pre-push checks.
update-lock-files # Update the recent and minimal lock files.
```
ACKs for top commit:
apoelstra:
ACK e565e06b0c
Tree-SHA512: 0e73bad93708f626bd00eabc4e2264f2f2fddb0d8cb80a4464889f14077b29ecabdf1865c9dbe3ca7b08354585e3579c515dedcd2b05f34ae863aab31382de33
69f799acc5 Automated update to Github CI to rustc nightly-2024-05-02 (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 69f799acc5
Tree-SHA512: 0c2bedf09668db55e2dde1f5add6a53478c9479451b5d91cf95ebeaac9159840bd6d484af93af15f6035997831500c785abd227bfcbbd4cc0ff1ea292d163b96
During the recent release cycle we left `bitcoin` on the last rc
version.
Set the version number to `v0.33.0-unreleased` to make it obvious what
it is.
Close: #2724
c750be2352 fuzz: Update generate-files.sh (Tobin C. Harding)
Pull request description:
Recently we modified the fuzz job manually and forgot about the `generate-files.sh` file.
Update the script to match the current CI job, running it now produces the same file `cron-daily-fuzz.sh`.
ACKs for top commit:
storopoli:
ACK c750be2352
apoelstra:
ACK c750be2352
Tree-SHA512: 13ec222f760848d2089fd0e92460f18548c11b1dd2025ca804567eadd52e040c90c668126e63ce794023034e5606772cbe3293eae49327f0934c45cd1b7baf47
f0093c0f1c fix(typo): examples/ecdsa-psbt.rs (Jose Storopoli)
Pull request description:
"Creater" is a typo, it should be "Creator" role.
Ref: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki?plain=1#L660
ACKs for top commit:
tcharding:
ACK f0093c0f1c
apoelstra:
ACK f0093c0f1c
Tree-SHA512: ccdae4979da2044b4fdf3a0522e5cb6d64b394baadb6107d5e58096d2741458085c6ef349924bc0aa64eca69b89e394eb16fbf890c86716608ee06d287828ff2
Recently we modified the fuzz job manually and forgot about the
`generate-files.sh` file.
Update the script to match the current CI job, running it now produces
the same file `cron-daily-fuzz.sh`.
12411fc917 Fix typo in deprecated BIP-32 type (matthiasdebernardini)
Pull request description:
In #2258 we attempted to add back in deprecated BIP-32 types - but we spelled the identifier incorrectly. The patch was then backported to the `0.31.x` branch in December but was only just noticed now.
Fix typo in deprecated type from `Extendend` -> `Extended`.
ACKs for top commit:
tcharding:
ACK 12411fc917
storopoli:
ACK 12411fc917
apoelstra:
ACK 12411fc917
Tree-SHA512: f70e8fe741740f62b29932d8ee84cbe7803cb71dfb0491d251c3a982ede07ea7a32b5ecdf569d6012ee05509e8182a439b022c606a2f01742f4908089edc85a9
In PR #2258, deprecated BIP-32 types were re-added but contained a typo in the identifier: "Extendend" instead of "Extended". This commit fixes that typo.
The incorrect patch was backported to the 0.31.x branch in December but only noticed recently.
83b517fe70 Automated update to Github CI to rustc nightly-2024-04-30 (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 83b517fe70
Tree-SHA512: 093b177b391519d5fb5a1ad63984296cd3e7dc49e861735e8ce389eee23c568d981dd45196eb87973adf387deace2c670ac2c86208e92419512934b43e0a3b1b
a552e6bbb7 Automated update to Github CI to rustc nightly-2024-04-29 (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 a552e6bbb7
Tree-SHA512: 12727e742ea59644f17bbb99e4a84196f0d25d2aa12a79e3a0d87da7fd452944d9073b5acde33e5e2c1445ea5035b757becb43241884497762464e814324078c
26b9782d8b CI: Re-write run_task.sh (Tobin C. Harding)
Pull request description:
Recently we re-wrote CI to increase VM level parallelism, in hindsite this has proved to be not that great because:
- It resulted in approx 180 jobs
- We are on free tier so only get 20 jobs (VMs) at a time so its slow to run
- The UI is annoying to dig through the long job list to find failures
Have another go at organising the jobs with the main aim of shortening total run time and making it easier to quickly see fails.
Re-write the `run_task.sh` script, notable moving manifest handling to the workflow. Also don't bother testing with beta toolchain.
### Note on review
The diff is hard to read for `rust.yml`, I tried splitting out a bunch of separate patches but it resulted in the same thing (because there are so many identical lines in the yaml file). I suggest just looking at the yaml file and not the diff.
ACKs for top commit:
apoelstra:
ACK 26b9782d8b
sanket1729:
ACK 26b9782d8b.
Tree-SHA512: 1b0a0bab5cf729c5890f7150953499b42aebd3b1c31a1b0d3dfa5b5e78fda11e17a62a2df6b610ab4a950d5709f3af6fff1ae64d9e67379338903497ab77ae0e
b355740da4 chore: format and standardize all markdowns files (Jose Storopoli)
Pull request description:
according to the github flavor
(https://github.github.com/gfm/)
ACKs for top commit:
apoelstra:
ACK b355740da4 thanks for going through all this!
tcharding:
ACK b355740da4
Tree-SHA512: a9d5671ddc6f922b42189cae11b2a2a877663c909f73f1e8c407a4de7ac93b291e435373b79be2c708f1ecb717b2ede147c0f7730d582a1cb5bee937603005f0
a60ce917c6 Automated update to Github CI to rustc nightly-2024-04-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 a60ce917c6
Tree-SHA512: 0a1eda56c4336669aa4fe6127e55424fe1824ac58d69e2b3c3bab4f22cd048bf3b7ee989d0bb2ce2387f881f585a57f53b11d331f7e88bd3b90e228b99a7b139
1c836acf30 bitcoin: Stop slicing hashes (Tobin C. Harding)
Pull request description:
As part of the ongoing effort to improve `hashes`; stop using slicing of hash types and use `as_byte_array()` to get an array reference instead. This gives us more flexability to modify the `hashes` module.
ACKs for top commit:
apoelstra:
ACK 1c836acf30
storopoli:
ACK 1c836acf30
clarkmoody:
ACK 1c836acf30
Tree-SHA512: ca4becfc9bae13127aae09bd1eb5e03efc670fb4e56c2aba1cf0e3cf5f5a762dd8c5cff8ff7c15167902b7440f70202e0884f1e4d3bb651476019c78d2be3408
e34e2fda10 bitcoin: Upgrade base64 dependency (Tobin C. Harding)
Pull request description:
Upgrade to the latest release of `base64`. Version 0.22.0 came out about 2 months ago.
No code changes needed and from the release notes it doesn't look like anything that will effect us too much.
https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md
The `base64` crate is part of our public API so this is a breaking change.
ACKs for top commit:
apoelstra:
ACK e34e2fda10
storopoli:
ACK e34e2fda10
clarkmoody:
ACK e34e2fda10
Tree-SHA512: ad3a9725583e79202b22161a26f6a14770be7f6fb014d6ae4931e01dd73101cf499a193d8e72aba8acc5dc4f13b98b5c21eb5ea6b5587d0ac0a7f7c16c374e7f
ed04b922ec Automated update to Github CI to rustc nightly-2024-04-27 (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 ed04b922ec
Tree-SHA512: 04e9b4778f2870ecab7bbe18029fd0bbd7d1c8375999936b134a0c7ccb87dfefef301ceeb92adcc3a564d5c30f13525ae223b426c63d40d6f29ec1308f546143
a03bc2e5b1 CI: Enable sync-labels for labeler (Tobin C. Harding)
Pull request description:
The `labeler` job has an input `sync-labels` (default `false`) that configures:
> Whether or not to remove labels when matching files are reverted or no
> longer changed by the PR
ref: https://github.com/actions/labeler
Currently we are using the default which means labels are not synced when a PR is modified.
Example
A PR initially touches the `hashes` and `bitcoin` crates and the labeler action adds `C-hashes` and `C-bitcoin`. Later, a force push removes the changes to `hashes`, the labeler will not remove the `C-hashes` label. Now the labels are incorrect.
Note on `pull_request_target`:
We use `on: pull_request_target`, this means the action is run in the target branch not in the PR branch. So the changes in this patch are not run when this PR is pushed up. Therefore we cannot test this patch but have to merge it blindly - please review carefully.
Some further security notes that I learned while doing this patch. The `pull_request_target` has access to GitHub secrets, and in `manage-pr.yaml` we run `./contrib/gen_label_config.sh`. This is safe because its the version of this script on `master` that is run not the version in the PR (so a malicious attacker cannot patch `gen_label_config.sh` and have it be run). However we need to be aware that we do not accidentally merge some funky shell and inadvertently leak secrets.
ACKs for top commit:
storopoli:
ACK a03bc2e5b1
apoelstra:
ACK a03bc2e5b1
Tree-SHA512: 4082e52ed4c97215e76389e4a80bb1fac9a5f3b0c1d6ae555f3766c8cb12f2f5d2127a8aefad355117dd2ec3f5a9561cb08c6b3d5d2a16efaff2b966fb35965f
f8e6a2f44a Automated update to Github CI to rustc nightly-2024-04-25 (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 f8e6a2f44a
Tree-SHA512: 4df63fa34884275cad1e194024f0b5f04dc9ddae0fbf4b075f822c5007516f11bcb935a8eb0a9bad33aa7a65d2fd787b0b4cadd594e2acf729f36c1ee3cc3017