in case anyone doesn't understand how taproot enabled segwit witness data to be polluted, here is an explanation written by github copilot:
The Taproot upgrade for Bitcoin, activated in November 2021, introduced several changes that indirectly allowed large blobs of arbitrary data to be stored in SegWit witness data. Here’s a breakdown of how this happened:
Background
SegWit (2017):
Segregated Witness (SegWit) separated witness data (signatures and script data) from transaction data, moving it outside the traditional block structure. This change made it possible to include more data in blocks and reduced some limitations regarding the size and format of witness data.
Taproot (2021):
Taproot is a soft fork upgrade that enhanced Bitcoin’s scripting and privacy capabilities. It introduced a new script type (P2TR, Pay-to-Taproot) which uses Schnorr signatures and allows for more flexible scripting via MAST (Merkelized Abstract Syntax Trees).
Key Changes From Taproot
1. Introduction of Tapscript
Taproot introduced a new scripting language called Tapscript, which relaxes certain limits compared to previous script types. Notably, Tapscript removes the 520-byte push size limit for individual OP_PUSH operations in witness data. This means you can now push much larger chunks of data in a single operation.
Pre-Taproot: Each push in a scriptSig or witness could be at most 520 bytes.
Post-Taproot: Tapscript allows pushing arbitrary-sized blobs (up to the overall limits of witness data).
2. No Signature Requirement for OP_RETURN-like Data
With Taproot’s changes, users can create "script-path spends" that simply push data onto the stack and return true, without requiring a signature or a specific public key.
3. Witness Data Is Still Discounted
Because SegWit discounts the weight of witness data, storing data in the witness is much cheaper (per byte) than in the rest of the transaction.
4. Rise of Ordinals and Inscriptions
Developers discovered that Taproot’s relaxed rules allow for the storage of large files (images, text, etc.) in Taproot witness data, which led to the creation of projects like Ordinals and Inscriptions. These leverage Taproot's script-path spends to encode arbitrary data as part of a valid spend.
Summary
Taproot enabled large blobs of arbitrary data in SegWit witness data by:
Introducing Tapscript, which removes the 520-byte push limit for witness data.
Allowing script-path spends that can push arbitrary data and succeed with minimal requirements.
Keeping witness data discounted (cheaper to store).
Result:
People can now inscribe large files (up to the block weight limits) into Bitcoin transactions by embedding them in Taproot witness data.