Merkle Tree – How can a taproot transaction store so much data?
![](https://cdn.sstatic.net/Sites/bitcoin/Img/apple-touch-icon@2.png?v=b4864ba760f1)
I don’t quite understand how ordinal can store so much data on a chain. I know about ordinal envelopes.
OP_FALSE
OP_IF
OP_PUSH "ord"
OP_PUSH 1
OP_PUSH "text/plain;charset=utf-8"
OP_PUSH 0
OP_PUSH "Hello, world!"
OP_ENDIF
According to the Ordinal Handbook, in this example the text “Hello, world!” It is stored on chain. But I thought the taproot upgrade would allow people to insert a merkle root into the chain simply by adjusting the public key to generate a modified address. Despite this, the Merkle root is not actually stored on-chain. If you want to spend coins at that address, you need to know, right?
I know my understanding is wrong, because if all you need to know to use a coin in your script path is the merkle root, then you don’t need to know the hash of the leaf.
I know that Bitcoin transactions have code for scripting actual hexadecimal transactions. For example, a simple locking script for Bitcoin transaction output would be: “scriptPubKey”: “OP_DUP OP_HASH160 HASH_OF_PUBKEY_IN_HEX OP_EQUALVERIFY OP_CHECKSIG” In order for anyone with the private key of that address to use that transaction, provide the signature and an unlock script consisting of: public key. But this is just a tiny bit of data that Bitcoin transactions store. How can Taproot store such a large amount of data?