MAST is a method of using a merkle tree to store the various user-selected conditions that must be fulfilled in order for the encumbered bitcoins to be spent. Using a merkle tree allows the spender to select which one of the conditions they’ll fulfill without having to reveal the details of other conditions to the block chain.
Users of MAST who are able to keep unused conditions off of the block chain will enjoy lower fees, be able to create larger contracts than currently possible, will have improved privacy, and will improve the fungibility of their bitcoins.
MAST has been discussed generically in Bitcoin since 2013 and there have been several concrete proposals to add it to Bitcoin:
OP_MERKLEBRANCHVERIFYand BIP117 tail call execution semantics
- bip-taproot’s merkle tree
Note: the abbreviation MAST originally stood for Merklized Abstract Syntax Trees as proposed by Russell O’Connor based on merkle trees and abstract syntax trees. Subsequent proposals no longer use anything like abstract syntax trees but people continued to use the name “MAST” for them, leading Anthony Towns to propose the backronym Merklized Alternative Script Trees.
Primary code and documentation
Optech newsletter and website mentions
- 2020-02-19 Discussion about taproot versus alternative MAST-enabling proposals
- 2019-05-14 Overview of Taproot and it’s MAST-based encumbrances
- 2019-02-05 It should be possible to upgrade miniscript for things like MAST
- 2019-01-08 Should
OP_CODESEPARATORbe disabled in MAST scripts?
- 2018-12-28 Taproot: an optimization for MAST