BIP - Selector Script



Summary:

Tier Nolan wrote a Bitcoin Improvement Proposal (BIP) to allow the spender to choose one of multiple standard scripts to use for spending the output. The proposed BIP can be found at https://github.com/TierNolan/bips/blob/bip4x/bip-0045.mediawiki. This is required as part of the atomic cross chain transfer protocol, where outputs can be retrieved if the process ends before being committed. The script allows multiple standard scripts to be included in the scriptPubKey. When redeeming the script, the spender indicates which of the standard scripts to use. Only one standard script is executed, so the only cost is the extra storage required.The proposed BIP does not define any use cases, but mentions it is necessary for atomic cross chain transfers. It should also require P2SH according to Luke's feedback. A more ambitious change would be a soft fork like P2SH, except the spender is allowed to select from multiple hashes, effectively making it "Multi-P2SH". This gets much of the benefits of MAST, but it requires a formal soft fork to implement. If there is agreement, Tier Nolan offers to code up the reference implementation as a pull request.


Updated on: 2023-06-08T21:28:39.716787+00:00