Skip to content
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

Commit "minimal" and "latest" lockfiles #591

Merged
merged 5 commits into from
Mar 30, 2023

Conversation

apoelstra
Copy link
Member

This is a proposed strategy for maintaining tested lockfiles in the rust-bitcoin ecosystem. The idea is that we would have both a "minimal" and a "latest" lockfile, and in both cases we have trusted crev reviews for all dependencies (this is not implemented here, I'd like to start by committing the lockfiles so we can agree what to review).

Periodically we can update the "latest" one to reflect new versions of deps that we've gotten around to reviewing.

I have local nix build scripts that are able to test every commit of proposed PRs against both lockfiles. In CI it is probably reasonable to at least do cargo test --locked --all-features with both of them, to make sure that the tests at least pass on each PR with them.

Thoughts?

The `cbor` crate has been unmaintained for several years, and depends on
the ancient `rustc_serialize` crate which (a) doesn't build on WASM, and
(b) doesn't build when we use a minimal-dep Cargo.lock. (The latter is
because cbor specifies rustc_serialize 0.3.0 when it should specify 0.3.1,
but there is nothing we can do to fix that when cbor is unmaintained.)

This changes a hardcoded value in a regression test, but it's because
we're replacing the serialization engine rather than changing our code,
so this is not actually a change.
tcharding
tcharding previously approved these changes Mar 19, 2023
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1b12cc5

@tcharding
Copy link
Member

The idea is then that we would each publish crev reviews for all the crates (and versions) in both lock files, right?

Kixunil
Kixunil previously approved these changes Mar 19, 2023
Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1b12cc5

Didn't verify the lock files.

// Secret key is 32 bytes. CBOR adds a byte of metadata for 20 of these bytes,
// (Apparently, any byte whose value is <24 gets an extra byte.)
// It also adds a 1-byte length prefix and a byte of metadata for the whole vector.
assert_eq!(e.len(), 54);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really weird that different engines encode it differently but I don't care much; it's not our fault.

@apoelstra apoelstra dismissed stale reviews from Kixunil and tcharding via 7fc8419 March 20, 2023 13:25
@apoelstra
Copy link
Member Author

Great, thanks both of you!

We need a rust-secp maintainer to ACK before I can merge but it sounds like we're agreed on strategy here.

This is only needed for the serde test, so don't bother putting it in
the README. Downstream users won't encounter this dependency and don't
need to care about it.
@apoelstra
Copy link
Member Author

@elichai @sanket1729 @jonasnick could one of you take a look and ACK this?

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK bd9d3c9. Verified the lockfiles. The latest one has a couple lines diff, but that is expected :) . minimal one is the same

@apoelstra apoelstra merged commit 11b8786 into rust-bitcoin:master Mar 30, 2023
@apoelstra apoelstra deleted the 2023-03--min-versions branch March 30, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants