Determine input addresses of a transaction



Summary:

In an email conversation from 2011, Gavin Andresen discussed with Jan about the safety of detecting green address style transactions. Gavin suggests that a simple scriptPubKey validation might not be enough as there are non-standard scriptPubKey scripts that will validate if given certain inputs. Jan then suggests bringing his own scriptPubKey of just OP_CHECKSIG to check if it is a proper signature from a green address key, and afterwards checking the address by looking at 'tx.getHashForSignature()'. Gavin suggests that green addresses could be implemented as a second signature in the scriptSig, which would allow the rest of the transaction to be completely normal and not require specific inputs. Jan considers two options: getting something working reasonable fast to detect current green address style transactions or rethinking how green transactions are created and verified and try to put something 'proper' together which has a chance of being merged at some point. However, green transactions are too controversial at this point to get them included in mainline.


Updated on: 2023-06-04T20:52:00.894377+00:00