Manually revert VarInt range check#6182
Conversation
6e895ad to
c01802b
Compare
c01802b to
cc4cc0c
Compare
|
We have another option here. We could break the API (revert), release |
I personally think this would indeed be preferable, for the reasons I wrote here:
|
|
@apoelstra whats your thoughts on this? If we want to revert and re-release I'm inclined to think that we should create a |
|
No, yanking only makes sense if there is a security issue or a bug in a particular version of a crate. It does not give us license to release API-breaking changes in a point release. Only a serious security issue would let us do that. |
| /// VarInt was encoded in a non-minimal way. | ||
| NonMinimalVarInt, | ||
| /// VarInt value exceeds the maximum allowed size. | ||
| // DO NOT USE. Introduced in 0.32.9, reverted in 0.32.10 |
There was a problem hiding this comment.
In cc4cc0c:
We should update the public doccomment to indicate that this is unused and has no meaning.
| /// the size is encoded as a CompactSize. | ||
| /// | ||
| /// WARNING: This is never used. We introduced range checking in `0.32.9` breaking downstream, it | ||
| /// was reverted in `0.32.10` but the public API has to stay. |
cc4cc0c to
a37f76e
Compare
|
Fixed and fixed. |
|
I think this is going to break a fuzz test somewhere between EDIT: Oh no it won't because we don't fuzz types from 0.32 that do not exist on |
I don't really care but I thought we were accepting that we introduced a bug in |
Yes.
No, removing the ugliness would be a breaking change. |
|
Yanking a version or not is a completely separate question from whether we should release breaking changes in a minor release. |
|
I'm not sure exactly where the miscommunication is or confusion.
|
|
It's still breaking wrt |
|
Oh thanks, I misunderstood yanking. I didn't realize that yank did not remove it from the registry. This is good to go then. Force push is rebase only. |
Manually revert 91a6e64 Note that we cannot break the API so the new stuff introduced in `0.32.9` has to stay in there. Comment the code as such. This was a backport of rust-bitcoin#5697 which added range checking to the `VarInt` type. On master we did this then realized there are legitimate use cases for the full range of a `u64`. We then added `u64` support to compact size (rust-bitcoin#5784). NB: 'compact size' is the new name for varint. This backport then broke downstream users.
a37f76e to
3bcd7c9
Compare
|
If we'd caught this within an hour or two of publishing, I'd be fine treating yank as "removes from the registry". But at 2+ weeks, especially when this latest release contained a bunch of bugfixes, I'd expect it to be pretty widely deployed (though would anybody be using the API that we'd be breaking? kinda doubtful honestly). |
Manually revert 91a6e64
Note that we cannot break the API so the new stuff introduced in
0.32.9has to stay in there. Comment the code as such.This was a backport of #5697 which added range checking to the
VarInttype. On master we did this then realized there are legitimate use cases for the full range of au64. We then addedu64support to compact size (#5784).NB: 'compact size' is the new name for varint.
This backport then broke downstream users.
Close: #6138