This was written in response to bitcoin/bitcoin#27578 and any other number of occurrences of the topic.
“Standardness policy” is a term for a transaction that would be consensus-legal, but our node doesn’t want to relay for various reasons. Clearly if it’s consensus valid we want to accept it to not split the network if a miner chooses a “weird” transaction to mine.
There are N motivations for policy that I know of:
- Anti-DoS: Only “cheap” things to validate get flooded to the network
- Security: Certain types of transactions may mess up certain systems for no good reason
- Upgrade hooks: We leave some things “forbidden” such that if we find a use for them later we don’t “confiscate” funds by refusing to relay e.g., a spend or pre-signed transaction
- Pro-decentralization: Make it simple/cheap for miners to build blocks that pay well