Post AdT1FKOtZLybRUMDiK by stevenroose@x0f.org
 (DIR) More posts by stevenroose@x0f.org
 (DIR) Post #AdSStxT2F5ihnFvrYe by ademan@thebag.social
       2024-01-03T04:50:28.348129Z
       
       0 likes, 0 repeats
       
       @stevenroose Not sure if you saw my rambling screed on the ML but I had a couple of BIP-127 questions.[The remaining inputs] MUST have signatures that commit to the commitment input (e.g. using SIGHASH_ALL).With only the final transaction available, validating that all signatures use SIGHASH_ALL, except for simple cases like p2pkh and p2wpkh is very difficult. In bdk-reserves we have libbitcoinconsensus available and use it for validation of non-commitment inputs. Despite the duplicated validation time, does it make sense to malleate the commitment input, then re-validate all inputs, counting any successful validations as failures? I think this is generally a good approach, as it will also reject things like lightning anchor outputs if they managed to persist on chain, but can anyone think of a false-negative this approach would produce?Assuming this approach is acceptable, what would the ideal malleation look like? Tentatively I prepended “MALLEATED” to the commitment string and re-hashed it, but I suppose setting the txid to a constant like 00000… might work just as well?See https://github.com/Ademan/bdk-reserves/blob/wip-bip-0127/src/reserves.rs#L379I admittedly am just now looking (sorry!) but it doesn’t look like https://github.com/ElementsProject/reserves/ does any such verification.
       
 (DIR) Post #AdT1FKOtZLybRUMDiK by stevenroose@x0f.org
       2024-01-03T11:15:16Z
       
       1 likes, 0 repeats
       
       @ademan Hey, cool that you're looking at BIP-127! The second part of the BIP (the proof metadata format) is definitely more like a draft.Also, the reserves tool was abandoned before it was in any way usable, so don't give it too much credit. It was also my first Rust project..Apart from these disclaimers, it's a good point that it's not easy to validate that all signatures have SIGHASH_ALL.. But it seems like your approach to malleate is a good approach!
       
 (DIR) Post #AdTJ44SiHmy002vQ12 by stevenroose@x0f.org
       2024-01-03T14:34:55Z
       
       1 likes, 0 repeats
       
       @ademan Btw, feel free to propose amendments to BIP127, I'd be happy to add you as co-author.