waxwing on Nostr: Bitcoin shower thought: It's a failure of bitcoin's model that sighashing serializes ...
Bitcoin shower thought:
It's a failure of bitcoin's model that sighashing serializes inputs and outputs in a particular order.
The ordering of inputs and outputs has no meaning (which is why we have, in the past, had rather tedious discussions about BIP69 or random ordering, for coinjoins) to the actual effect of A pays B.
So the sighashing (the process by which we define what exact chunk of data must be signed to validate the tx) shouldn't need to know about the ordering.
Left as an exercise to the reader: how can we encode the full set of information about the tx into a string of bytes (i.e. sighashing) in such a way that it's the same, no matter the order of inputs and outputs.
Published at
2023-03-31 21:18:40Event JSON
{
"id": "384288721af86f5b940b3d8a7c8ea3b41d80c3f1109015607142e729703e2f1d",
"pubkey": "675b84fe75e216ab947c7438ee519ca7775376ddf05dadfba6278bd012e1d728",
"created_at": 1680297520,
"kind": 1,
"tags": [],
"content": "Bitcoin shower thought:\n\nIt's a failure of bitcoin's model that sighashing serializes inputs and outputs in a particular order.\n\nThe ordering of inputs and outputs has no meaning (which is why we have, in the past, had rather tedious discussions about BIP69 or random ordering, for coinjoins) to the actual effect of A pays B.\n\nSo the sighashing (the process by which we define what exact chunk of data must be signed to validate the tx) shouldn't need to know about the ordering.\n\nLeft as an exercise to the reader: how can we encode the full set of information about the tx into a string of bytes (i.e. sighashing) in such a way that it's the same, no matter the order of inputs and outputs.",
"sig": "bf9d730e1060536083140ecbbfdfd6da73bbb051fba66eb237614c7a1782afeef17b355c20e9cdbe9f8198a928e1e4673ef5ccf4de9e42e6fac56adcb7fd770c"
}