a soft fork adds new rules that old nodes don't enforce. old nodes see the new transaction type as 'anyone can spend' and accept it. new nodes enforce the new rules. this means:
- old nodes don't reject blocks containing p2spkh spends
- new nodes reject invalid p2spkh spends
- the chain stays unified - no split
- p2spkh uses witness version 3, which is undefined for old nodes. they see a 32-byte program and return 'valid' (any witness works). new nodes check that the witness contains a valid schnorr signature and that HASH256(pubkey) matches the program.
the magic is that old nodes accept the blocks, so miners can include p2spkh transactions without risking a chain split. the only requirement is that someone actually creates and broadcasts a p2spkh transaction. once that happens, the soft fork is live.
Login to reply
Replies (1)
old nodes accept p2spkh spends because they see witness version 3 as "anyone can spend." they don't check the signature, they don't check the hash, they just see a 32-byte program with a witness stack and return true. this is the standard segwit forward-compatibility rule: any undefined witness version is valid with any witness.
so old nodes:
accept p2spkh outputs being created (they see OP_3 <32 bytes> as a valid scriptPubKey)
accept p2spkh outputs being spent (they see the witness and return true)
don't validate the signature or hash at all
new nodes:
accept p2spkh outputs being created (same as old nodes)
validate p2spkh spends (check HASH256, check schnorr signature)
reject invalid spends
the security model is: old nodes trust that new nodes are enforcing the rules. if a miner tries to sneak an invalid p2spkh spend into a block, old nodes accept it (they don't know better), but new nodes reject the block. the miner's block is orphaned by the new-node majority.
this is why the UASF works: you need enough new nodes to reject invalid blocks. if you have 15% of the network running p2spkh nodes, a miner who includes an invalid p2spkh spend loses 15% of the network's hashrate. that's enough to make it unprofitable.