This PR adds a functional test with a collection of output scripts that are “rare”/obscure, in the sense that they wouldn’t be used or make sense within a regular payment transaction, but creating them is still considered standard, which is often considered surprising and counter-intuitive. They either
- use a weird pubkey encoding (-> hybrid pubkeys [in types P2PK, P2MS]),
- are provably unspendable (-> not-on-curve pubkeys [in types P2PK, P2MS, P2TR]), or
- are spendable by anyone with current consensus rules (-> future segwit versions)
For all of those, the creation is considered standard, whereas spending for some is only consensus-valid; for not-on-curve pubkeys, spending is obviously impossible for mathematical reasons. The behaviour for future segwit versions is already tested in feature_segwit.py
, so there is a certain overlap, but I think it stlll makes thematically sense to collect them here as well (if this PR gets Concept ACKed in general). OP_RETURN outputs don’t fall into this “rare” category as they are more or less widespread and it’s well-known that they can be used to embed arbitrary data (we already test them in mempool_datacarrier.py
). Happy to include other examples as well if I missed any.