rust-bitcoin / rust-secp256k1

Rust language bindings for Bitcoin secp256k1 library.
Creative Commons Zero v1.0 Universal
350 stars 270 forks source link

ElligatorSwift "A/B" enum should have better-named variants #741

Closed apoelstra closed 1 month ago

apoelstra commented 2 months ago

I think we can create a new enum, deprecate the old one, and use Into generics to make this a non-breaking change for most users.

Kixunil commented 2 months ago

Good idea, especially if you mean Into<NewEnum>.

Davidson-Souza commented 2 months ago

As the one to blame for this unfortunate naming, I agree that it should be clearer. The comments use "Initiator" and "Responder'. If you consider this is used in during a connection handshake, I think those makes sense.

liamaharon commented 2 months ago

Any suggestions for a more creative name for the new enum than ElligatorSwiftPartyV2?

apoelstra commented 2 months ago

I think we could shorten it to Party since it's in the ellswift module, the term "party" isn't used anywhere else, and with the long variant names it'll be better to have a short enum name.