Then how did this transaction get confirmed?
In the latest version, transactions are treated as "packages". So, you have zero-fee transaction, and some fee-paying transaction, and the whole package is checked against relay rules. So, formally, the first transaction has zero fee, but the second one actually pays, what is needed to get it confirmed, through CPFP. In this way, when you have second layer protocols, you can always write a zero fee transaction, and then, the user, who will want to push it on-chain, will bump it in the future, with the right fees, without having to guess them upfront, and underpay (which will keep the multiparty transaction stuck) or overpay (which will cost more satoshis, than it should). If you use zero fees, then the second transaction is made, when you want to finalize things on-chain.
That's an evil way to send someone a payment
Why it is evil? Traditionally, the sender picks the fees, but from the protocol's perspective, the recipient can do that as well. Another thing is that in most nodes, you won't be able to broadcast a zero fee transaction directly. Which means, that you can make a free transaction, sign it, and pass it to the recipient, but if you try to broadcast it, then most nodes will reject it, because of relay rules. However, if the recipient will take your signed transaction, and combine it through CPFP with something else, then it will be broadcastable.
Is there a testnet version of bc1pfeessrawgf to mess around with?
Of course.
https://mempool.space/testnet/address/tb1pfees9rn5nzhttps://mempool.space/testnet4/address/tb1pfees9rn5nzhttps://mempool.space/signet/address/tb1pfees9rn5nzAnd it also works in regtest, if you use bcrt1pfeesnyr2tx. The script is "51024e73":
decodescript 51024e73
{
"asm": "1 29518",
"desc": "addr(bcrt1pfeesnyr2tx)#swxgse0y",
"address": "bcrt1pfeesnyr2tx",
"type": "anchor"
}
If you can see "anchor" in a "type" field, then your node can support it properly.
why do you need this address anyway?
Because for CPFP rules, you need some "anchor", where you can connect a new transaction to the previous one.
Just send it to them directly and they'll pay the fee using CPFP.
That would reveal the fact, that the recipient can spend the coins directly. For privacy reasons, when anchor is in use, then you can always outsource it to another party. And then, if you have second layers, and the first anchored transaction is between Alice and Bob, then the fee bumping transaction can be done by Bob, by Charlie, or by Zack, who will be the 20th recipient in a chain of second-layer transactions.
That's just a waste of precious bytes.
Well, it consumes three bytes more than needed, because the Script is "51024e73", and not just "51". But well, people cared about making it "the shortest valid Segwit address", which is why we have, what we have. And it is still better, than using P2WSH equivalent:
decodescript 51
{
"asm": "1",
"desc": "raw(51)#8lvh9jxk",
"type": "nonstandard",
"p2sh": "2ND8PB9RrfCaAcjfjP1Y6nAgFd9zWHYX4DN",
"segwit": {
"asm": "0 4ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
"desc": "addr(bcrt1qft5p2uhsdcdc3l2ua4ap5qqfg4pjaqlp250x7us7a8qqhrxrxfsqseac85)#vch92e55",
"hex": "00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
"address": "bcrt1qft5p2uhsdcdc3l2ua4ap5qqfg4pjaqlp250x7us7a8qqhrxrxfsqseac85",
"type": "witness_v0_scripthash",
"p2sh-segwit": "2N3i4C56DiqfpdcAJsAdZd2xYpCQMRAroye"
}
}
Would you rather see
bc1qft5p2uhsdcdc3l2ua4ap5qqfg4pjaqlp250x7us7a8qqhrxrxfsq2gp3gp instead of
bc1pfeessrawgf?
I don't think you can broadcast a normal zero-fee transaction, even if you add CPFP right on top.
You can do that only as a package, if it has version three. And maybe it is even limited to anchors like bc1pfeessrawgf, these rules are quite new, and they probably won't work for older transactions or nodes.