Hot answers tagged

5

The idea of Merklized Alternative Script Trees (or previously Merklized Abstract Syntax Trees) dates back to an idea Russell O'Connor had in 2012. The original idea was that you could have alternative scripts or script fragments stored as leaves in a Merkle tree and then the leaves of the tree that weren't used could be pruned away and not take up valuable ...


4

You may have heard before that "Bitcoin is programmable money". Bitcoin uses a simple programming language called Script to encode payment conditions. While today the vast majority of transactions uses standard single-sig outputs (P2PK, P2PKH, P2WPKH) or one of a small set of common scripts (wrapped segwit, 2-of-3 multisig, 2-of-2 multisig with 1-...


3

From what I've read and heard about MAST, it's an alternate version of pay-to-script-hash that uses a Merkle root instead of a regular hash digest. It combines this idea with that of an abstract syntax tree, which is a data structure that compilers use to parse source code. By "Merkelizing" a syntax tree, it allows redeemers to only expose the parts of the ...


3

With a single leaf, there is no TapBranch step. That would be impossible, as there are no two branches to combine. The TapLeaf hash is directly used in the TapTweak step. I will try to add a few examples to the BIP soon.


1

With Taproot no it is not possible. Only one leaf script in the Taproot tree needs to be satisfied to spend the output and you cannot require the satisfaction of multiple leaf scripts to spend the output. The Taproot tree has the equivalent of OR statements between each leaf and you can't use AND statements between leaves. There are alternative MAST designs ...


1

That's correct. Of course, that many leaves is intractable to construct. The reason for permitting that many levels is to permit unlikely leaves to be put in deeper levels, reducing the average control block size (while increasing the worst cast control block size).


1

You can do either. Putting the hash of the single script (hash_TapLeaf) instead of the Merkle root makes it cheaper to spend as you don't need to reveal other hashes to prove that script is present in the Merkle tree. However, if you want to obscure the fact that there was only a single script path in the Merkle tree on spending (and are willing to pay a ...


Only top voted, non community-wiki answers of a minimum length are eligible