-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Taproot has been active in Sapio for years now, the documentation should reflect that.
- Loading branch information
1 parent
019aab7
commit baadc7a
Showing
1 changed file
with
5 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,11 @@ | ||
# Taproot | ||
|
||
Currently Taproot is scheduled to active on Bitcoin in November 2021 but there | ||
is limited support for it across all ecosystem tools. | ||
|
||
Sapio scripts can become very large in size, and would greatly benefit from | ||
Sapio contract logic can become very large in size, so Sapio benefits from | ||
being able to split up and merkelize the logic into smaller satisfiable | ||
chunks. This makes it economical to use Sapio. | ||
chunks. This makes it much more economical and easy to use Sapio however you like. | ||
|
||
The compiler is currently relatively naive about this, and unknown (or worse, | ||
unchecked) errors might occur as a result of pushing these limits. Hopefully, | ||
`rust-miniscript` should catch such errors, but a malicious author might be | ||
able to trigger an unknown unsatisfiable script. | ||
Generally speaking, a Sapio programmer need not think about this too much, it will be set up | ||
automatically under the hood. However, at writing, limited optimizing of Taproot trees is done, | ||
so a wise programmer would want to express their program in such a way to not allow Taproot leafs to be larger than need be. | ||
|
||
Without full Taproot support, Sapio is probably ill-advisable to use at writing, | ||
but this will hopefully change in the immediate future. | ||
|
||
|
||
## Taproot Optimizations | ||
|
||
With Taproot comes the opportunity to [Huffman | ||
Code](https://en.wikipedia.org/wiki/Huffman_coding) spending paths to | ||
decrease fees even further. Sapio currently uses `rust-miniscript` Policy | ||
language to generate spending conditions, so Sapio should be able to carry | ||
metadata from the programmer about the likelihood of various paths being | ||
taken, but this currently only is used within a script as opposed to the | ||
Tapscript tree itself. |