Let's say I want to encode the text of the King James version of the Bible into the block chain, one piece at a time (replace this with any zany idea to consume copious quantities of block space). OP_RETURN is impractical because I can only work with 80-byte chunks.
I notice that SegWit allows much more data to be stored - up to 3 MB/block - in witness data.
Clearly, I can't use a V0 witness program because my witness data must take the form
<signature> <pubkey>
However, I believe I can use a V1 witness program. Scripts with that version won't be supported immediately after SegWit deployment, but I notice this in BIP-141:
If the version byte is 1 to 16, no further interpretation of the witness program or witness stack happens, and there is no size restriction for the witness stack. These versions are reserved for future extensions.
So here's my plan. I'm going to create an output script of the form:
<0x01> <0x0000>
This is a V1 witness program. According to BIP-141, the witness program is not to be interpreted, and the subsequent witness stack will have no size restriction.
Then I'm going to spend that output with a witness transaction input. The witness of my transaction encodes a thousand bytes of text.
When I publish this spending transaction, it will be propagated by nodes. They can't reject it as invalid because that would break forward compatibility when V1 scripts are introduced. BIP-141 says nothing about whether or not such transactions should be relayed (nor does BIP-144), so I assume they will be.
As long as I pay a sufficiently high fee, my transaction should eventually be mined. I even get a 75% discount over using OP_RETURN because my text is encoded in the witness.
And there's nothing the protocol will do to stop me. Or is there?
Edit: to make things simple, assume SegWit has been widely-deployed and that most nodes understand V0 witness programs. Clearly, non-SegWit nodes will not relay a witness transaction because it will be considered non-standard. I'm interested in the behavior of SegWit nodes.