Build your own nHashType



Summary:

The discussion revolves around the rehashing of transaction data once per input being a bottleneck and how full nodes have to check all transactions' inputs, which is much more costly. The conversation also touches upon auto-forwarding as a feature, with the Bitcoin SE post highlighting the fact that people have looked for this feature before. There are convoluted use cases for it, but better solutions for key management exist. Sergio suggests Hash(Tx, previn-index) = Hash ( Hash(outputs) || Hash(Inputs-with-script-cleared) || ) (for SIGHASH_ALL) as a way to avoid the bottleneck by reordering the serialization. Peter Todd mentions CODESEPARATOR and how it can be used to sign code to run as part of verifying the signature, making a signature that's only valid if the tx fee is less than the defined amount. However, Stephen argues that OP_CODESEPARATOR cannot really be made useful unless you already have a way to sign without hashing the TXIDs referenced by your input.


Updated on: 2023-06-09T19:05:13.954679+00:00