-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import bitcoin hashes #1284
Import bitcoin hashes #1284
Conversation
20522f6
to
172ba24
Compare
Fuzzing isn't being run on
I do not know what to do about that? |
d09620d
to
6029100
Compare
This is pretty frustrating. The fuzztests are basically completely broken in bitcoin_hashes because the dummy hash logic does not round trip. cc @TheBlueMatt I am going to change the @tcharding I think we should move all the fuzz targets into crate-specific directories because it's confusing to see them all in a flat directory structure like this. |
I mean at a high level that's fine, but I'm a bit confused why they don't "round-trip"? What is round-trip in this context anyway? |
@TheBlueMatt oh, this isn't about round-tripping, it's about getting the same result with the |
6029100
to
874db5d
Compare
Changes in force push:
|
I'd like to squash the last three patches before merge. Will wait for an ack and a green CI run before doing so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 874db5d
874db5d
to
4b48da0
Compare
Changes in force push:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 4b48da0
4b48da0
to
2188b40
Compare
Rebase only, no other changes. |
2188b40
to
096d7a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 096d7a9
Not sure right now what to do about the new changes merged into |
I've indicated high priority even though this is a draft, just needs co-ordination between @apoelstra and myself regarding updating this PR and possibly freezing |
I merged the last bitcoin_hashes PR that you asked me. There are now two open PRs there that we can re-open here (one is by you, the other is Jeremy's I guess on bitcoin_hashes we should open one last PR (that we won't bring over here) that basically updates the README to say that the repo has been frozen while it's being migrated to rust-bitcoin, and to watch this PR. Then once this is merged we can add another which says that the repo is deprecated in favor of this one. concept ACK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK dbc7c6d
Oh, I just realized: won't this slow down the development by running all tests for every change? |
CI is already slow as hell IMO, we should definitely look into some ways to speed it up. I don't think this PR makes it any worse than writing more tests makes it worse, or am I missing something? |
It makes it slow in the same way writing tests that are only relevant sometimes make things slow. If we're going to have a single repository maybe we should somehow detect which crates changed and only run tests for those and maybe also crates that depend on them (but we would have to use path dependencies and update downstream crates which is probably actually a good thing). Oh and of course this is complicated so I wouldn't block PRs on that. |
Agreed on all counts @Kixunil. It shouldn't be too hard to detect which crates have changed and to only run relevant tests. Though we should at least compile-test everything to check that we haven't broken interdependencies. |
Aight, this seems like a thing to go near the top of my todo list as we progress with crate smashing. |
With "improve CI to only run tests for code that effected by this PR" on my todo list does this PR get an ACK from you @Kixunil? |
Recently we introduced a workspace but did not update the git ignore file. Ignore lock files, build artifacts, test artifacts, and fuzz artifacts.
Recently we added a workspace but left the CHANGELOG file at the repository root, this is incorrect because the CHANGELOG is a per crate thing since it is updated along with crate release.
The changelog file is a per crate, per release, thing. Add one to the `internals` crate.
We would like to bring the `bitcoin_hashes` crate into the `rust-bitcoin` repository. Import `bitcoin_hashes` into `rust-bitocin/hashes`, doing so looses all the commit history from the original crate but if we archive the original repository then the history will be preserved. We maintain the same version number obviously and in the changelog we note the change of repository. Commit hash that was tip of `bitcoin_hashes` at time of import: commit 54c16249e06cc6b7870c7fc07d90f489d82647c7 Includes making `embedded` and `fuzzing` per-crate i.e., move them into `bitcoin` as hashes includes these also. NOTE: Does _not_ enable fuzzing for `hashes` in CI. Notes on CI: Attempts to merge in the github actions from the hashes crate however reduces coverage by not running hashes tests for beta toolchain. Some additional work could be done to improve the CI to increase efficiency without reducing coverage. Leaving for another day.
Recently clippy was updated and now new warnings are generated for the `hashes` crate. Clippy emits 3 warnings of form: warning: this expression borrows a value the compiler would automatically borrow As suggested, remove the explicit borrow.
dbc7c6d
to
9674bf2
Compare
Changes in force push:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9674bf2. Did my best to review the CI code, it looks good, and seems like we are testing everything when we add "hashes" to the root level ./contrib/tests.sh
. I would like other reviewers to confirm the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9674bf2
@Kixunil could we have an ACK from you? I'd like to get this merged fairly quickly since it'll require I change my local build scripts (and also we can merge this now without rebasing, unlike several other big open PRs) |
Also, as @tcharding notes in rust-bitcoin/rust-secp256k1#509 we really ought to change the |
This a bit big that's why I didn't find the time yet. Will try later today. |
Thank you! The majority of it is a literal copy/paste from the bitcoin_hashes repo which you can recreate and check that way. |
There are actually no merge conflicts with |
Yep, looks like it -- I'm just running my tests on the merge commit and then we should be good to go! |
Neat. |
Win! |
#1337 was split out of this in an attempt to help review, I think we can merge this one though now it has some traction.
We would like to bring the
bitcoin_hashes
crate into therust-bitcoin
repository. #550 (comment)Import
bitcoin_hashes
crate intohashes
.Commit hash that was tip of
bitcoin_hashes
at time of import:Please note the commit history of
bitcoin_hashes
is only preserved on the soon-to-be-archivedbitcoin_hashes
repository.