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
Published at
2023-06-07 15:26:27Event JSON
{
"id": "4eb1aa68482fc522e9b800210854ae41dedadda0d216391eac7dc36f1f72ca42",
"pubkey": "6f226bd1c86c22aed12ec82cd2dab4b5e2f77fd662ac4e1f881170a12da87bd6",
"created_at": 1686151587,
"kind": 1,
"tags": [
[
"e",
"c83f6dedf4ca7c81a89476f7b8b9b295fef9059bd827880a0f714bdd8244a34b",
"",
"root"
],
[
"e",
"c84e547b647cb3006cd2ae679e6ac43c771a52dea419be12cf4160df987fd6c1",
"",
"reply"
],
[
"p",
"4aa6cf9aa5c8e98f401dac603c6a10207509b6a07317676e9d6615f3d7103d73"
]
],
"content": "📅 Original date posted:2014-10-14\n📝 Original message:On Tuesday 14. October 2014 04.34.16 Pieter Wuille wrote:\n\u003e This means that scripts that use booleans as inputs will be inherently\n\u003e malleable.\n\nI've ran into this issue in C++ often enough,\na funny example is assigning \"2\" to a native c++ bool and then you can do a\n if (myBool == true)\n else if (myBool == false)\nand neither of them will hit.\n\n\u003e I\n\u003e would like to change BIP62 to also state that interpreted booleans\n\u003e must be of minimal encoded size (in addition to numbers).\n\nWhat about rejecting a script where a bool is not explicitly zero or one?\n-- \nThomas Zander",
"sig": "554d114094413ae30baecce3f507cc5289ba30da8b85757af2a875c7537aa1af443a5d6b209793f7f50c1b2e04b2d06891a36194f8ad2228aca55b703825477d"
}