Skip to content

Commit de38794

Browse files
Add Tr-compiler write-up and doc-comment
This write-up is aimed to reason about how the private-compilation (as defined in doc) is also cost-efficient.
1 parent a5dc195 commit de38794

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

doc/Tr Compiler.pdf

96.5 KB
Binary file not shown.

src/policy/concrete.rs

+3
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
248248
/// `[pk(A),pk(B),and(or(pk(C),pk(D)),pk(E)))]`. Each policy in the vector is compiled into
249249
/// the respective miniscripts. A Huffman Tree is created from this vector which optimizes over
250250
/// the probabilitity of satisfaction for the respective branch in the TapTree.
251+
///
252+
/// Refer to [doc/Tr compiler.pdf] in the root of the repository to understand why such
253+
/// compilation is also *cost-efficient*.
251254
// TODO: We might require other compile errors for Taproot.
252255
#[cfg(feature = "compiler")]
253256
pub fn compile_tr(&self, unspendable_key: Option<Pk>) -> Result<Descriptor<Pk>, Error> {

0 commit comments

Comments
 (0)