Thomas Zander [ARCHIVE] on Nostr: 📅 Original date posted:2014-10-14 📝 Original message:On Tuesday 14. October ...
📅 Original date posted:2014-10-14
📝 Original message:On Tuesday 14. October 2014 04.34.16 Pieter Wuille wrote:
> This means that scripts that use booleans as inputs will be inherently
> malleable.
I've ran into this issue in C++ often enough,
a funny example is assigning "2" to a native c++ bool and then you can do a
if (myBool == true)
else if (myBool == false)
and neither of them will hit.
> I
> would like to change BIP62 to also state that interpreted booleans
> must be of minimal encoded size (in addition to numbers).
What about rejecting a script where a bool is not explicitly zero or one?
--
Thomas Zander
📝 Original message:On Tuesday 14. October 2014 04.34.16 Pieter Wuille wrote:
> This means that scripts that use booleans as inputs will be inherently
> malleable.
I've ran into this issue in C++ often enough,
a funny example is assigning "2" to a native c++ bool and then you can do a
if (myBool == true)
else if (myBool == false)
and neither of them will hit.
> I
> would like to change BIP62 to also state that interpreted booleans
> must be of minimal encoded size (in addition to numbers).
What about rejecting a script where a bool is not explicitly zero or one?
--
Thomas Zander