ElementsProject / elements-miniscript

Creative Commons Zero v1.0 Universal
11 stars 14 forks source link

elip151: concatenate unprefixed opcode and script pubkey #82

Closed LeoComandini closed 3 months ago

LeoComandini commented 4 months ago

This is a breaking change but it adheres more to the ELIP.

LeoComandini commented 4 months ago

Currently for scriptpubkey 0014aa..aa, we hash 01ff160014aa...aa After this we hash ff0014aa..aa

Not sure what's the appropriate thing to do here, we can go with this MR and change the ELIP test vectors, we can serialize in a different way, or edit the ELIP to match the implementation.

apoelstra commented 4 months ago

Agreed this is better. Though would be very easy to change the ELIP to say "you have to encode 01ff" rather than "you have to encode ff".

I guess, the question is, is this used anywhere and what would be the consequence of breaking it?

LeoComandini commented 4 months ago

is this used anywhere and what would be the consequence of breaking it?

It is exposed by lwk but I've no evidence of anyone using this in prod. So in theory we're in time to change this if we prefer.

LeoComandini commented 4 months ago

But TBH I don't have a preference, if we prefer to change the ELIP, I can close this and open a PR there

apoelstra commented 4 months ago

I have no preference and I'm not involved with lwk at all. So you need to make the call (or find somebody who will).

Just let me know.

LeoComandini commented 4 months ago

@apoelstra I think minimal disruption is changing the ELIP, opened https://github.com/ElementsProject/ELIPs/pull/13 I'll close this once that is merged

LeoComandini commented 3 months ago

We chose to amend the ELIP, closing