rust-bitcoin / rust-bech32

Bech32 format encoding and decoding
MIT License
93 stars 49 forks source link

Use 0.10.0-beta.2 for the upcoming release #170

Closed tcharding closed 8 months ago

tcharding commented 8 months ago

We just bumped the version number to 0.10.0-beta2 but that format causes cargo to automatically pull the new version. We can use 0.10.1-beta.2 so cargo correctly treats it as a new separate version.

apoelstra commented 8 months ago

Published and yanked :( same issue.

I think I'll just try to use this version in Elements locally (I think cargo will let me use a yanked version, it'll just whine about it) and if that passes let's just do a real release.

apoelstra commented 8 months ago

Ok, cargo won't let me use the yanked version, but I can use my local repo.

apoelstra commented 8 months ago

Ok, I have two comments so far:

Also it would make my life a tiny bit easier if validate_padding and validate_witness_program_length were pub ... but I don't think we want to do that, it'd make the API too messy and expose too many internals.

tcharding commented 8 months ago

I"ll work on the points above. As far as naming, shall we just use -gamma like you said before. This is slightly amusing that with our combined number of years writing rust we are having so much difficulty naming a new 'beta' version'.

apoelstra commented 7 months ago

I'm doubtful that gamma will work when beta2 didn't, but we might as well try it!

tcharding commented 7 months ago

Want to just test the new stuff locally on your end (i.e., after that new stuff above) and then just release the v0.10.0?

apoelstra commented 7 months ago

Yeah, I think that's best. Next time we'll try starting with beta.0 etc and see if that works.

tcharding commented 7 months ago

Ok, I have two comments so far:

  • The signature is wrong on data_part_ascii_no_checksum. It returns a &[u8] (which defaults to the lifetime on &self) but needs to return &'s [u8]. Probably same with the other accessors. Without this fix I get borrowck errors all over the place.
  • I would actually like a Fe32 iterator on CheckedHrpString; this is the intermediate iterator used in constructing the return value of byte_iter so it'll be easy to implement.

Also it would make my life a tiny bit easier if validate_padding and validate_witness_program_length were pub ... but I don't think we want to do that, it'd make the API too messy and expose too many internals.

All this should be seen to now.