Author: ZmnSCPxj 2019-04-30 04:29:18
Published on: 2019-04-30T04:29:18+00:00
In an email exchange, Aymeric Vitte asked ZmnSCPxj if he could put anything in the different standard output scripts. ZmnSCPxj replied that for P2PKH and P2WPKH, only a hash of a public key can be presented, whereas for P2SH and P2WSH, a hash of a script must be presented. Although these templates can be interpreted as scripts, most current nodes recognize them as templates. For more complicated situations than "single signer," P2SH or P2WSH should be used, and the script given. If someone wants to ensure a particular P2SH or P2WSH commits to a certain policy, they should expose the policy script and verify that when hashed it matches the P2SH/P2WSH. Nodes can have any policy for propagating transactions, but P2PKH, P2WPKH, P2SH, and P2WSH are expected to be propagated by a majority of nodes. However, anything that isn't one of these four templates is unlikely to be propagated by the network. It is still possible to coordinate with miners to get it mined, but most nodes will not inform miners about transactions that don't pay out to P2PKH, P2WPKH, P2SH, or P2WSH.
Updated on: 2023-06-13T18:30:39.714463+00:00