Skip to main content
Share Your Experience: Take the 2024 Developer Survey
5 votes

What are Merklized Alternative Script Trees?

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 ...
Murch's user avatar
  • 75.7k
5 votes

What are Merklized Alternative Script Trees?

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 ...
Michael Folkson's user avatar
3 votes
Accepted

I keep hearing about MAST, what is it and what does it do?

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 ...
Jestin's user avatar
  • 8,812
3 votes
Accepted

Single-leaf script-path example

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 ...
Pieter Wuille's user avatar
3 votes

How many recipients can fit in a single Ark shared output?

MAST isn't really relevant here. As the Ark vtxo trees are just trees of sequential transactions. In theory they can be arbitrarily large. Some things are to take into account though: More round ...
Steven Roose's user avatar
  • 11.8k
2 votes
Accepted

Maximum number of possible MAST leaves

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 ...
Pieter Wuille's user avatar
1 vote
Accepted

Question about MAST tree in book "mastering bitcoin"

It seems to me that the text should read "we could also have four conditions for the same cost". MAST is a binary tree, which means the number of possible scripts (conditions) grows ...
Vojtěch Strnad's user avatar
1 vote
Accepted

Is it possible to spend multiple scripts of a MAST in a taproot output

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 ...
Michael Folkson's user avatar
1 vote
Accepted

Where does a single script go in the Taproot tree of a script path spend?

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 ...
Michael Folkson's user avatar

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