Skip to content

update deprecation versions and bump minor version #809

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

Merged
merged 4 commits into from
Jun 26, 2025

Conversation

apoelstra
Copy link
Member

We accidentally released 0.30.0 and 0.31.0 with "in future" deprecations. Most users will not see these since the lint for them is different from the normal deprecation warning (and it's undocumented except to say that we "should not use" future deprecations, even though it works and there is no alternative).

@apoelstra
Copy link
Member Author

As an aside, I'd like to point out how easy jj makes it to do this simultaneously with #807 and #808.

Basically,

  1. Create the backport branches: jj bookmark create secp256k1-0.30.x -r secp256k1-0.30.0 and jj bookmark create secp256k1-0.31.x -r secp256k1-0.31.0.
  2. Push the backport branches: jj git push origin -b 'glob:secp256k1-0.3*.x'
  3. Do one of the PRs (jj new secp256k1-0.30.x), with a "fix TBDs" commit and a "update Cargo.toml" commit.
  4. Duplicated the TBD change with jj duplicate -r @- -d secp256k1-0.31.x and jj duplicate -r @- -d master, added a new "update cargo version" commit to the 0.31.x branch.
  5. Did jj bookmark create -r @ 2025-06_tbd_0_30_0 and similar for the other two branches.
  6. Pushed them all at once with jj git push --remote github -b 'glob:2025-06_tbd*' -N.

You can see that even wih jj there are a lot of steps here, but git additionally insists that you push branches individually and checkout a bunch of arbitrary things while you're working.

Then if I need to update these, I can similarly do an update commit, duplicate and squash it into each of the branches (will check on IRC if I can do these in one shot..), then `jj git push --remote github -b 'glob:2025-06_tbd*'`` again to push everything.

@apoelstra
Copy link
Member Author

Man :/ if we had done the deprecation properly we would've noticed all the uses of these deprecated functions in our unit tests and serde impls ... and then noticed that the replacements are wildly inconsistent (some take &[u8; N], some take [u8; N], most are named from_byte_array but the ecdh one is named from_bytes; there are usually but not always to_byte_array; usually not but sometimes as_byte_array).

Sigh.

@apoelstra
Copy link
Member Author

Also the serde impls for Schnorr signatures and ECDH secrets use serialize_bytes even though these are fixed-size objects. All the other fixed-size objects use tuples.

@apoelstra
Copy link
Member Author

Ok, actually we did correct a bunch of these in 0.31.

@apoelstra
Copy link
Member Author

Will conflict with #806. Probably easiest to get this one in first.

Copy link
Member Author

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

On 53c5993 successfully ran local tests

tcharding
tcharding previously approved these changes Jun 24, 2025
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 53c5993

@apoelstra
Copy link
Member Author

Heh, thanks for the ACK -- but this does not bump the minor version like it claims.

Copy link
Member Author

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

On 53c5993 successfully ran local tests

We accidentally released 0.30.0 and 0.31.0 with "future" deprecations.

Most users will not see these since the lint for them is different from
the normal deprecation warning (and it's undocumented except to say that
we "should not use" future deprecations, even though it works and there
is no alternative).

Somewhat fortunately, in 0.30.x we messed up the deprecations and
provided an inconsistent and weird API to replace the old functions. But
because we messed up the deprecation messages, we can pretend we didn't
do it and just mark the deprecations as having started in 0.31.x
We have duplicated funny logic in the PartialOrd and Ord impls of
SerializedSignature. No need to duplicate: just have PartialOrd call
into Ord.
Copy link
Member Author

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

On 2df6636 successfully ran local tests

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 2df6636

@tcharding
Copy link
Member

but this does not bump the minor version like it claims.

Ouch!

@apoelstra apoelstra merged commit 72822e1 into rust-bitcoin:master Jun 26, 2025
28 checks passed
@apoelstra apoelstra deleted the 2025-06_tbd branch June 26, 2025 14:09
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.

3 participants