Taproot: 您猜对了

摘要:在本文中,100x 集团的受资助人 Jeremy Rubin 描述了一种智能合约,如果 Taproot 没有在特定日期前激活,则该合约可用于验证承诺失去的币。Jeremy 解释了一种在比特币上使用智能合约以进行这些”下注“的新颖有趣的方法。然而我们认为,在实践中这种有限的下注类型不太可能为解决比特币明显的软分叉激活方法论难题做出重大贡献。

This image has an empty alt attribute; its file name is tap-947x1024.jpg

Taproot 激活意向信号的智能合约

除非您一直与世隔绝,否则您一定听说过 Taproot 是目前一个即将发布的比特币软分叉升级提议。几乎所有人都认为 Taproot 是比特币的优秀补充,然而,在如何协调激活升级方面有很大的分歧。1

对于那些熟悉我之前对概率软分叉(Probabilistic Soft Forks)所进行的探讨的人来说,您会知道我是一个不对称陷阱激活机制的粉丝。在本文中,我将介绍在用户激活软分叉(User Activated Soft Fork)中,如果 Taproot 不激活,比特币持有者可以如何验证承诺失去的币2,其诚实信号仅承认执行 Taproot 的链的承诺。

本文有双重目的,我主要是想炫耀我一直在开发的比特币智能合约编程语言 Sapio。Sapio 被设计成与 BIP-119 CheckTemplateVerify (CTV) 一起运作,CTV 是比特币的一个提议扩展,但该合约并不需要 CTV 一起运作,因为它能够使用自预先签名交易而不会对合约的拘束力产生重大影响。我很快就会发布 Sapio 供公众使用,但如果您想提前使用,可以在 Twitter 上直接与我联系(@JeremyRubin)。

用户生成高成本信号的想法来自于与 Zcash 创始科学家之一 Madars Virza 的对话。特别是,Madars 问我是否可以设计一个合约,让人自动对 Taproot 是否激活进行一系列下注 — 例如,与 2,016 个 BIP8 / BIP9 信令周期保持一致。(通过将下注分散在一个较长的窗口中,如果您不确定它激活的确切时期,您可以对冲总风险;这也让合约更有趣……下图对我们想要实现的逻辑进行了概括性概述。

This image has an empty alt attribute; its file name is diag-1024x473.jpg

在 Madars 给我发短信后大约 10 分钟,我有了一个功能原型,第二天早上我对其进行了完善。

事不宜迟,我们来看看代码:

/// Taproot Recurring Bet.
/// This data structure captures all the arguments required to build a contract.
#[derive(JsonSchema, Serialize, Deserialize, Clone)]
pub struct TapBet {
   /// How much Bitcoin to release per period
   #[schemars(with = "f64")]
   #[serde(with = "bitcoin::util::amount::serde::as_btc")]
   pub amount_per_time: Amount,
   /// How much in fees to pay per cycle.
   /// TODO: In theory, this could be zero, as miners could manually add such
   /// transactions (which they topet a reward out of) to their mempools.
   /// TODO: Optional, make cancellation path have a different feerate
   #[schemars(with = "f64")]
   #[serde(with = "bitcoin::util::amount::serde::as_btc")]
   pub fees_per_time: Amount,
   /// How frequently should we test to see if Taproot is active?
   pub period: AnyRelTimeLock,
   /// How long to wait to allow early-abort of the contract unfolding (should
   /// be > period)
   pub cancel_timeout: AnyRelTimeLock,
   /// An externally generated Taproot script (not address) to send the funds to
   pub taproot_script: Script,
   /// An arbitrary bitcoin address to send the funds to on cancellation
   pub cancel_to: bitcoin::Address,
}
 
/// This defines the interface for the TapBet Contract
impl Contract for TapBet {
   /// The "next steps" that can happen for an instance of a TapBet
   /// is either to:
   /// - stop_expansion: return the funds safely to the creator because Taproot is active
   /// - continue_expansion: take amount_per_time of the funds and send them to a taproot address.
   ///     > If taproot is active, the funds are safe in that key
   ///     > If taproot is not active, a miner may steal the funds
   declare! {then, Self::stop_expansion, Self::continue_expansion}
   /// you can ignore this line, it is only needed for an advanced Sapio feature
   /// and will be able to be removed when a specific rust feature stabilizes.
   declare! {non updatable}
}
 
/// The actual logic for each TapBet
impl TapBet {
   /// The waiting period is over, sample if Taproot is active
   guard! {period_over |s, ctx| { s.period.into() }}
   then! {continue_expansion [Self::period_over] |s, ctx| {
       // creates a new transaction template for the next step
       // of this contract
       let mut builder = ctx.template().set_label("continue_expansion".into());
       // set the sequence validly
       builder = builder.set_sequence(0, s.period.into())?;
       // if we have sufficient funds, pay out to a taproot address now
       if builder.ctx().funds() >= s.amount_per_time {
           let mut range = AmountRange::new();
           range.update_range(s.amount_per_time);
           builder = builder.add_output(
               s.amount_per_time,
               &Compiled::from_script(s.taproot_script.clone(), Some(range), ctx.network)?,
               None
           )?;
       }
       // if we have funds remaining, make a recursive TapBet with the same
       // parameters.
       if builder.ctx().funds() >= s.fees_per_time {
           let amt =
               builder.ctx().funds() - s.fees_per_time;
           if amt > Amount::from_sat(0) {
               builder = builder.add_output(
                   amt,
                   s,
                   None
               )?;
           }
       }
       builder.into()
   }}
 
   /// The timeout period is over
   guard! {timeout |s, ctx| { s.cancel_timeout.into() }}
   then! {stop_expansion [Self::timeout] |s, ctx| {
       let mut builder  = ctx.template().set_label("stop_expansion".into());
       builder = builder.set_sequence(0, s.cancel_timeout.into())?;
       // Pay out to the original owner
       if builder.ctx().funds() >= s.fees_per_time {
           let amt = builder.ctx().funds() - s.fees_per_time;
           if amt > Amount::from_sat(0) {
               builder = builder.add_output(
                   amt,
                   &Compiled::from_address(s.cancel_to.clone(), None),
                   None
               )?;
           }
       }
       builder.into()
   }}
}
 
/// This registers our contract API with the module system.
REGISTER![TapBet];

TapBet 合约定义编译成一个 WebAssembly 模块,可以加载并用于制作合约实例。为方便起见,Sapio 提供了一个 Rust 库/CLI,用于与编译后的合约插件进行接口。一个合约可以按照以下方式创建3

cargo run --bin cli -- contract create 0.09015
'{"amount_per_time": 0.03,
  "cancel_timeout": {"RH" : 2116}, 
  "cancel_to": "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw",
  "fees_per_time": 0.00005,
  "period": {"RH": 2016},
  "taproot_script": "51200279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F817"}'
--file="plugin-example/pkg/sapio_wasm_plugin_example_bg.wasm"

注意传入的比特币金额(0.09015)足够 3 次 0.03 大小的迭代投注,每次投注的费用为 0.00005。合约步数每 2,016 个区块成熟一次,矿工扩容失败后 100 个区块可以取消合约。这就编译成文章最后的输出(见附录 1)。人们只需向创建的地址(bcrt1qgc803gks4d89362ql09ayycr2s7k6v4ze34pc4ndc0ggu4j24lgqewwf7y)支付 0.09015 比特币,然后将创建的输出与合约 JSON 一起发布,供他人验证诚信信号。这些合约对象可以被操作绑定到特定的 UTXO 上,以创建一个 PSBT 列表(见附录 2),并使用 Tux 接口渲染显示(如上图)。该命令的输出包含 Sapio 特有的元数据和注释,以协助合约的操作和处理,但核心是每个 Sapio 合约都是所有可能的交易的简单列表。

未来,CheckTemplateVerify 将保证合约的忠实执行。也就是说,资金只有通过标有 “then!”的路径才能移动,而没有其他方式。目前,由于 CheckTemplateVerify 还没有推出,我们可能会模仿 CTV 的功能  尽管安全模型有所恶化–使用一个签名 oracle 服务器来代替。在这个特定的合约中,使用个人签名服务器不会大大降低合约的行为,因为一个理性的矿工只会选择比提议的奖励更多的交易,所以作弊的机会有限。

为了作弊,用户最终不得不提供比现有交易下更多的钱给矿工。用户有可能打破信号的诚实性,用比如说 0.04 个 BTC 贿赂矿工,让他提前结束合约,并在剩余的时间里返还用于信号的价值。有几种方法可以解决这个限制。

  1. 只为这个合约的单期提供资金 (不重复)
  2. 使用第三方签字人联盟(潜在在除了你自己的钥匙外),这样你就得胁迫公证员让你作弊了
  3. 激活OP_CTV,避免了对任何签名服务器的需求。

有足够的证据表明,大量的经济总量的用户计划依靠 Taproot 在某一时间前激活,网络如果不在该时间前执行该规则,将是愚蠢的 — 也可能是经济上的分叉。

所以,要不要急着出去,老老实实地发出信号,说你要在某个日期前要 Taproot ? 我不会阻止你!但我建议你谨慎行事–这是个新概念,给矿工一个假装没听过 ” Taproot ” 的理由并偷取你的钱的游戏理论可能会有问题,这完全是个斗智斗勇的游戏。此外,在此基础上激活,还需要广泛的生态系统支持来监测和衡量此类合约的投放量。笔者认为,在这个节骨眼上,最好的选择是围绕现有的 BIP 8/9 家族激活之一形成共识,但鼓励在家的读者继续修修补补,思考智能合约和共识的前沿问题。

想试试 Sapio ,构建自己的智能合约吗?敬请期待! 我们将很快公开发布。  

注记

1 – 深入探讨所有潜在的升级机制不在本文范围内,只是关于现有建议的总结。 更多请参见 Aaron van Wirdum 在比特币杂志上的文章。

2 – 赢币只是比较棘手 — 花钱比赚钱更容易! 如果 Taproot 不激活,真的会有人给你钱让你输给矿工吗?实现溢价的一个方法是,让创建合约的交易有一个溢价的第二次输出,交易资金不足时用 SigHash AnyoneCanPay 来增加溢价的资金。

3 – taproot_script 参数看似神奇,其实只是脚本 OP_1 PUSH32 <32 bytes pubkey> 来创建 V1 Segwit Output ,详情请看 https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki

附录

附录 1: 合约 JSON

{
 "template_hash_to_template_map": {
   "a6dbda05299a7225d6422e8a0d163b9e5c734143eb1a507a5772e65edb4898dd": {
     "precomputed_template_hash": "a6dbda05299a7225d6422e8a0d163b9e5c734143eb1a507a5772e65edb4898dd",
     "precomputed_template_hash_idx": 0,
     "max_amount_sats": 9010000,
     "metadata_map_s2s": {
       "label": "stop_expansion"
     },
     "transaction_literal": {
       "version": 2,
       "lock_time": 0,
       "input": [
         {
           "previous_output": "0000000000000000000000000000000000000000000000000000000000000000:4294967295",
           "script_sig": "",
           "sequence": 2116,
           "witness": []
         }
       ],
       "output": [
         {
           "value": 9010000,
           "script_pubkey": "001487a87e0e17a80a2d2bd65c421a1090df8ed6cc9a"
         }
       ]
     },
     "outputs_info": [
       {
         "sending_amount_sats": 9010000,
         "receiving_contract": {
           "address": "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw",
           "amount_range": {
             "max_btc": 21000000
           }
         }
       }
     ]
   },
   "2a5a2eecaf8090ffc6668ae60f70722d8d4791f9c282c6da0ecc5e8838c38175": {
     "precomputed_template_hash": "2a5a2eecaf8090ffc6668ae60f70722d8d4791f9c282c6da0ecc5e8838c38175",
     "precomputed_template_hash_idx": 0,
     "max_amount_sats": 9010000,
     "metadata_map_s2s": {
       "label": "continue_expansion"
     },
     "transaction_literal": {
       "version": 2,
       "lock_time": 0,
       "input": [
         {
           "previous_output": "0000000000000000000000000000000000000000000000000000000000000000:4294967295",
           "script_sig": "",
           "sequence": 2016,
           "witness": []
         }
       ],
       "output": [
         {
           "value": 3000000,
           "script_pubkey": "51200279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817"
         },
         {
           "value": 6010000,
           "script_pubkey": "00206709d4f25ab69955961cc8538e5d58343ae3aa3709a3fd9c7c0fa33f4af63887"
         }
       ]
     },
     "outputs_info": [
       {
         "sending_amount_sats": 3000000,
         "receiving_contract": {
           "address": "bcrt1pqfumuen7l8wthtz45p3ftn58pvrs9xlumvkuu2xet8egzkcklqtscyvky6",
           "amount_range": {
             "max_btc": 0.03
           }
         }
       },
       {
         "sending_amount_sats": 6010000,
         "receiving_contract": {
           "template_hash_to_template_map": {
             "d61ac7b03b54f0ad0ab9e9e69ad966e4faa325375577cb259e7891a7b493dc82": {
               "precomputed_template_hash": "d61ac7b03b54f0ad0ab9e9e69ad966e4faa325375577cb259e7891a7b493dc82",
               "precomputed_template_hash_idx": 0,
               "max_amount_sats": 6005000,
               "metadata_map_s2s": {
                 "label": "stop_expansion"
               },
               "transaction_literal": {
                 "version": 2,
                 "lock_time": 0,
                 "input": [
                   {
                     "previous_output": "0000000000000000000000000000000000000000000000000000000000000000:4294967295",
                     "script_sig": "",
                     "sequence": 2116,
                     "witness": []
                   }
                 ],
                 "output": [
                   {
                     "value": 6005000,
                     "script_pubkey": "001487a87e0e17a80a2d2bd65c421a1090df8ed6cc9a"
                   }
                 ]
               },
               "outputs_info": [
                 {
                   "sending_amount_sats": 6005000,
                   "receiving_contract": {
                     "address": "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw",
                     "amount_range": {
                       "max_btc": 21000000
                     }
                   }
                 }
               ]
             },
             "ebcea40f3558db070bf30445c208b329e2386080662dd5d6fe29da8f0c301ffb": {
               "precomputed_template_hash": "ebcea40f3558db070bf30445c208b329e2386080662dd5d6fe29da8f0c301ffb",
               "precomputed_template_hash_idx": 0,
               "max_amount_sats": 6005000,
               "metadata_map_s2s": {
                 "label": "continue_expansion"
               },
               "transaction_literal": {
                 "version": 2,
                 "lock_time": 0,
                 "input": [
                   {
                     "previous_output": "0000000000000000000000000000000000000000000000000000000000000000:4294967295",
                     "script_sig": "",
                     "sequence": 2016,
                     "witness": []
                   }
                 ],
                 "output": [
                   {
                     "value": 3000000,
                     "script_pubkey": "51200279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817"
                   },
                   {
                     "value": 3005000,
                     "script_pubkey": "0020d023b8ffc5162902a1902e12d0282957fb4726a0f83efc2cb7efc4a6d4247483"
                   }
                 ]
               },
               "outputs_info": [
                 {
                   "sending_amount_sats": 3000000,
                   "receiving_contract": {
                     "address": "bcrt1pqfumuen7l8wthtz45p3ftn58pvrs9xlumvkuu2xet8egzkcklqtscyvky6",
                     "amount_range": {
                       "max_btc": 0.03
                     }
                   }
                 },
                 {
                   "sending_amount_sats": 3005000,
                   "receiving_contract": {
                     "template_hash_to_template_map": {
                       "64ca1a03d428ce2bb3413080cfa303dcdc841ba30900c2d72cd3615593bf294b": {
                         "precomputed_template_hash": "64ca1a03d428ce2bb3413080cfa303dcdc841ba30900c2d72cd3615593bf294b",
                         "precomputed_template_hash_idx": 0,
                         "max_amount_sats": 3000000,
                         "metadata_map_s2s": {
                           "label": "continue_expansion"
                         },
                         "transaction_literal": {
                           "version": 2,
                           "lock_time": 0,
                           "input": [
                             {
                               "previous_output": "0000000000000000000000000000000000000000000000000000000000000000:4294967295",
                               "script_sig": "",
                               "sequence": 2016,
                               "witness": []
                             }
                           ],
                           "output": [
                             {
                               "value": 3000000,
                               "script_pubkey": "51200279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817"
                             }
                           ]
                         },
                         "outputs_info": [
                           {
                             "sending_amount_sats": 3000000,
                             "receiving_contract": {
                               "address": "bcrt1pqfumuen7l8wthtz45p3ftn58pvrs9xlumvkuu2xet8egzkcklqtscyvky6",
                               "amount_range": {
                                 "max_btc": 0.03
                               }
                             }
                           }
                         ]
                       },
                       "037164a6bc5e23333ccd750972927c4de669face404841ce476b867eb08a5d1e": {
                         "precomputed_template_hash": "037164a6bc5e23333ccd750972927c4de669face404841ce476b867eb08a5d1e",
                         "precomputed_template_hash_idx": 0,
                         "max_amount_sats": 3000000,
                         "metadata_map_s2s": {
                           "label": "stop_expansion"
                         },
                         "transaction_literal": {
                           "version": 2,
                           "lock_time": 0,
                           "input": [
                             {
                               "previous_output": "0000000000000000000000000000000000000000000000000000000000000000:4294967295",
                               "script_sig": "",
                               "sequence": 2116,
                               "witness": []
                             }
                           ],
                           "output": [
                             {
                               "value": 3000000,
                               "script_pubkey": "001487a87e0e17a80a2d2bd65c421a1090df8ed6cc9a"
                             }
                           ]
                         },
                         "outputs_info": [
                           {
                             "sending_amount_sats": 3000000,
                             "receiving_contract": {
                               "address": "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw",
                               "amount_range": {
                                 "max_btc": 21000000
                               }
                             }
                           }
                         ]
                       }
                     },
                     "known_policy": "thresh(1,and(older(2116),pk(02d9259ccb8d82d21b80155926dc8dd840f22a862792eba28c935b5221bda7f696)),and(older(2016),pk(037a7ffbdac37874b
4128c484318f3a9c0f0f2088628181d2ed83add9e4ab291c1)))",                                                                                                                       
                     "address": "bcrt1q6q3m3l79zc5s9gvs9cfdq2pf2la5wf4qlql0ct9halz2d4pywjpsa25fsl",
                     "known_descriptor": "wsh(thresh(1,nj:and_v(v:pk(02d9259ccb8d82d21b80155926dc8dd840f22a862792eba28c935b5221bda7f696),older(2116)),snj:and_v(v:pk(037a7f
fbdac37874b4128c484318f3a9c0f0f2088628181d2ed83add9e4ab291c1),older(2016))))#fcpsm54r",                                                                                      
                     "amount_range": {
                       "max_btc": 0.03
                     }
                   }
                 }
               ]
             }
           },
           "known_policy": "thresh(1,and(older(2116),pk(03bac00d55195f4822f0d6660b43e2a0c20bb162542fe7656400024c499edb21a1)),and(older(2016),pk(03ea94374570b77c401224ffe33
5b4dd4a640e5cd7d52c3d2f9e5fe3a5b02e481e)))",                                                                                                                                 
           "address": "bcrt1qvuyafuj6k6v4t9suepfcuh2cxsaw823hpx3lm8rup73n7jhk8zrsmkaflr",
           "known_descriptor": "wsh(thresh(1,nj:and_v(v:pk(03bac00d55195f4822f0d6660b43e2a0c20bb162542fe7656400024c499edb21a1),older(2116)),snj:and_v(v:pk(03ea94374570b77c
401224ffe335b4dd4a640e5cd7d52c3d2f9e5fe3a5b02e481e),older(2016))))#wc87daeg",                                                                                                
           "amount_range": {
             "max_btc": 0.06005
           }
         }
       }
     ]
   }
 },
 "known_policy": "thresh(1,and(older(2116),pk(02d3c32217f7bc3d43f1b8cfd7425379a3bf07074f1a3b4d243546e80e69b0c172)),and(older(2016),pk(02214f6ce3917541ca51705ea29e592dd4e39
cfffcf8f46d43e26011e331e6f5bd)))",                                                                                                                                           
 "address": "bcrt1qgc803gks4d89362ql09ayycr2s7k6v4ze34pc4ndc0ggu4j24lgqewwf7y",
 "known_descriptor": "wsh(thresh(1,nj:and_v(v:pk(02d3c32217f7bc3d43f1b8cfd7425379a3bf07074f1a3b4d243546e80e69b0c172),older(2116)),snj:and_v(v:pk(02214f6ce3917541ca51705ea2
9e592dd4e39cfffcf8f46d43e26011e331e6f5bd),older(2016))))#nu55ucem",                                                                                                          
 "amount_range": {
   "max_btc": 0.0901
 }
}

附录 2: 合约 PSBTs 和 元数据

[
 [
   {
     "global": {
       "unsigned_tx": {
         "version": 2,
         "lock_time": 0,
         "input": [
           {
             "previous_output": "4fac5f4526a712ad202029cb713469f15c65925be29ac52f89cb637d03b3b678:0",
             "script_sig": "",
             "sequence": 2016,
             "witness": []
           }
         ],
         "output": [
           {
             "value": 3000000,
             "script_pubkey": "51200279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817"
           },
           {
             "value": 6010000,
             "script_pubkey": "00206709d4f25ab69955961cc8538e5d58343ae3aa3709a3fd9c7c0fa33f4af63887"
           }
         ]
       },
       "version": 0,
       "xpub": {},
       "proprietary": [],
       "unknown": []
     },
     "inputs": [
       {
         "non_witness_utxo": null,
         "witness_utxo": {
           "value": 9010000,
           "script_pubkey": "0020460ef8a2d0ab4e58e940fbcbd21303543d6d32a2cc6a1c566dc3d08e564aafd0"
         },
         "partial_sigs": {
           "02214f6ce3917541ca51705ea29e592dd4e39cfffcf8f46d43e26011e331e6f5bd": "1ce7a3360f44340211df12a3fa98ef29b577cd2f4b228c0e2ff3
bc90f7659395711913e17c7ce033a60a3c7f957f64cc399f6d574767ca5206c3b8e6755ef7d001"                                                         
         },
         "sighash_type": "SIGHASH_ALL",
         "redeem_script": null,
         "witness_script": "8292632102d3c32217f7bc3d43f1b8cfd7425379a3bf07074f1a3b4d243546e80e69b0c172ad024408b268927c8292632102214f6c
e3917541ca51705ea29e592dd4e39cfffcf8f46d43e26011e331e6f5bdad02e007b26892935187",                                                        
         "bip32_derivation": [],
         "final_script_sig": null,
         "final_script_witness": null,
         "ripemd160_preimages": {},
         "sha256_preimages": {},
         "hash160_preimages": {},
         "hash256_preimages": {},
         "proprietary": [],
         "unknown": []
       }
     ],
     "outputs": [
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       },
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       }
     ]
   },
   {
     "global": {
       "unsigned_tx": {
         "version": 2,
         "lock_time": 0,
         "input": [
           {
             "previous_output": "4fac5f4526a712ad202029cb713469f15c65925be29ac52f89cb637d03b3b678:0",
             "script_sig": "",
             "sequence": 2116,
             "witness": []
           }
         ],
         "output": [
           {
             "value": 9010000,
             "script_pubkey": "001487a87e0e17a80a2d2bd65c421a1090df8ed6cc9a"
           }
         ]
       },
       "version": 0,
       "xpub": {},
       "proprietary": [],
       "unknown": []
     },
     "inputs": [
       {
         "non_witness_utxo": null,
         "witness_utxo": {
           "value": 9010000,
           "script_pubkey": "0020460ef8a2d0ab4e58e940fbcbd21303543d6d32a2cc6a1c566dc3d08e564aafd0"
         },
         "partial_sigs": {
           "02d3c32217f7bc3d43f1b8cfd7425379a3bf07074f1a3b4d243546e80e69b0c172": "e95b534aecc4325ade5c3241d06c4606de2244a990d01879b4d8
9370e31a3b9b2fe7f242505eb76915931de3a23b6f06d59a7f437c98cf083b84296859a5755b01"                                                         
         },
         "sighash_type": "SIGHASH_ALL",
         "redeem_script": null,
         "witness_script": "8292632102d3c32217f7bc3d43f1b8cfd7425379a3bf07074f1a3b4d243546e80e69b0c172ad024408b268927c8292632102214f6c
e3917541ca51705ea29e592dd4e39cfffcf8f46d43e26011e331e6f5bdad02e007b26892935187",                                                        
         "bip32_derivation": [],
         "final_script_sig": null,
         "final_script_witness": null,
         "ripemd160_preimages": {},
         "sha256_preimages": {},
         "hash160_preimages": {},
         "hash256_preimages": {},
         "proprietary": [],
         "unknown": []
       }
     ],
     "outputs": [
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       }
     ]
   },
   {
     "global": {
       "unsigned_tx": {
         "version": 2,
         "lock_time": 0,
         "input": [
           {
             "previous_output": "d9b7e135a0265e77b7cab8c9254cbe2638bca168c00120dde56e41fb74e36d5a:1",
             "script_sig": "",
             "sequence": 2116,
             "witness": []
           }
         ],
         "output": [
           {
             "value": 6005000,
             "script_pubkey": "001487a87e0e17a80a2d2bd65c421a1090df8ed6cc9a"
           }
         ]
       },
       "version": 0,
       "xpub": {},
       "proprietary": [],
       "unknown": []
     },
     "inputs": [
       {
         "non_witness_utxo": null,
         "witness_utxo": {
           "value": 6010000,
           "script_pubkey": "00206709d4f25ab69955961cc8538e5d58343ae3aa3709a3fd9c7c0fa33f4af63887"
         },
         "partial_sigs": {
           "03bac00d55195f4822f0d6660b43e2a0c20bb162542fe7656400024c499edb21a1": "0f24413cf9e4a0d53ff24496969d357b5c0a95f25b61f98d9fda
de8a2c8c612a5dcc211242ff81fd3836c7adaa8a9c1988a5f48719d87b2fe1c34afb666c198601"                                                         
         },
         "sighash_type": "SIGHASH_ALL",
         "redeem_script": null,
         "witness_script": "8292632103bac00d55195f4822f0d6660b43e2a0c20bb162542fe7656400024c499edb21a1ad024408b268927c8292632103ea9437
4570b77c401224ffe335b4dd4a640e5cd7d52c3d2f9e5fe3a5b02e481ead02e007b26892935187",                                                        
         "bip32_derivation": [],
         "final_script_sig": null,
         "final_script_witness": null,
         "ripemd160_preimages": {},
         "sha256_preimages": {},
         "hash160_preimages": {},
         "hash256_preimages": {},
         "proprietary": [],
         "unknown": []
       }
     ],
     "outputs": [
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       }
     ]
   },
   {
     "global": {
       "unsigned_tx": {
         "version": 2,
         "lock_time": 0,
         "input": [
           {
             "previous_output": "d9b7e135a0265e77b7cab8c9254cbe2638bca168c00120dde56e41fb74e36d5a:1",
             "script_sig": "",
             "sequence": 2016,
             "witness": []
           }
         ],
         "output": [
           {
             "value": 3000000,
             "script_pubkey": "51200279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817"
           },
           {
             "value": 3005000,
             "script_pubkey": "0020d023b8ffc5162902a1902e12d0282957fb4726a0f83efc2cb7efc4a6d4247483"
           }
         ]
       },
       "version": 0,
       "xpub": {},
       "proprietary": [],
       "unknown": []
     },
     "inputs": [
       {
         "non_witness_utxo": null,
         "witness_utxo": {
           "value": 6010000,
           "script_pubkey": "00206709d4f25ab69955961cc8538e5d58343ae3aa3709a3fd9c7c0fa33f4af63887"
         },
         "partial_sigs": {
           "03ea94374570b77c401224ffe335b4dd4a640e5cd7d52c3d2f9e5fe3a5b02e481e": "7fef952d3488420612e2ff5bb422606112357085b7dcb745534e
59c31db9795076f54f9173448a0ffd7f93f98139ce0f155583427356b77f5da8be69393a67f301"                                                         
         },
         "sighash_type": "SIGHASH_ALL",
         "redeem_script": null,
         "witness_script": "8292632103bac00d55195f4822f0d6660b43e2a0c20bb162542fe7656400024c499edb21a1ad024408b268927c8292632103ea9437
4570b77c401224ffe335b4dd4a640e5cd7d52c3d2f9e5fe3a5b02e481ead02e007b26892935187",                                                        
         "bip32_derivation": [],
         "final_script_sig": null,
         "final_script_witness": null,
         "ripemd160_preimages": {},
         "sha256_preimages": {},
         "hash160_preimages": {},
         "hash256_preimages": {},
         "proprietary": [],
         "unknown": []
       }
     ],
     "outputs": [
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       },
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       }
     ]
   },
   {
     "global": {
       "unsigned_tx": {
         "version": 2,
         "lock_time": 0,
         "input": [
           {
             "previous_output": "e3b104521048350140ffb52914cc780fe45a44c733e2524a25ec1a79c235639b:1",
             "script_sig": "",
             "sequence": 2116,
             "witness": []
           }
         ],
         "output": [
           {
             "value": 3000000,
             "script_pubkey": "001487a87e0e17a80a2d2bd65c421a1090df8ed6cc9a"
           }
         ]
       },
       "version": 0,
       "xpub": {},
       "proprietary": [],
       "unknown": []
     },
     "inputs": [
       {
         "non_witness_utxo": null,
         "witness_utxo": {
           "value": 3005000,
           "script_pubkey": "0020d023b8ffc5162902a1902e12d0282957fb4726a0f83efc2cb7efc4a6d4247483"
         },
         "partial_sigs": {
           "02d9259ccb8d82d21b80155926dc8dd840f22a862792eba28c935b5221bda7f696": "58848a5e8abb37ac1c395ec5934e984bd25496488a0ca718ce28
2ce742686a247156f7c42a84b07db71f1d265ef9ee3dcab34491ee62cac6d6d064cb3abf87a201"                                                         
         },
         "sighash_type": "SIGHASH_ALL",
         "redeem_script": null,
         "witness_script": "8292632102d9259ccb8d82d21b80155926dc8dd840f22a862792eba28c935b5221bda7f696ad024408b268927c82926321037a7ffb
dac37874b4128c484318f3a9c0f0f2088628181d2ed83add9e4ab291c1ad02e007b26892935187",                                                        
         "bip32_derivation": [],
         "final_script_sig": null,
         "final_script_witness": null,
         "ripemd160_preimages": {},
         "sha256_preimages": {},
         "hash160_preimages": {},
         "hash256_preimages": {},
         "proprietary": [],
         "unknown": []
       }
     ],
     "outputs": [
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       }
     ]
   },
   {
     "global": {
       "unsigned_tx": {
         "version": 2,
         "lock_time": 0,
         "input": [
           {
             "previous_output": "e3b104521048350140ffb52914cc780fe45a44c733e2524a25ec1a79c235639b:1",
             "script_sig": "",
             "sequence": 2016,
             "witness": []
           }
         ],
         "output": [
           {
             "value": 3000000,
             "script_pubkey": "51200279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817"
           }
         ]
       },
       "version": 0,
       "xpub": {},
       "proprietary": [],
       "unknown": []
     },
     "inputs": [
       {
         "non_witness_utxo": null,
         "witness_utxo": {
           "value": 3005000,
           "script_pubkey": "0020d023b8ffc5162902a1902e12d0282957fb4726a0f83efc2cb7efc4a6d4247483"
         },
         "partial_sigs": {
           "037a7ffbdac37874b4128c484318f3a9c0f0f2088628181d2ed83add9e4ab291c1": "ad0cb6da9994d8b1ae6aea2e158c728887d5f3c9a57bfbc0346d
85ffdf30769e370fb72b1067fc7cb62e7350a5624b2a07e376baa8ec0e769b0187d08663ec9c01"                                                         
         },
         "sighash_type": "SIGHASH_ALL",
         "redeem_script": null,
         "witness_script": "8292632102d9259ccb8d82d21b80155926dc8dd840f22a862792eba28c935b5221bda7f696ad024408b268927c82926321037a7ffb
dac37874b4128c484318f3a9c0f0f2088628181d2ed83add9e4ab291c1ad02e007b26892935187",                                                        
         "bip32_derivation": [],
         "final_script_sig": null,
         "final_script_witness": null,
         "ripemd160_preimages": {},
         "sha256_preimages": {},
         "hash160_preimages": {},
         "hash256_preimages": {},
         "proprietary": [],
         "unknown": []
       }
     ],
     "outputs": [
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       }
     ]
   },
   {
     "global": {
       "unsigned_tx": {
         "version": 2,
         "lock_time": 0,
         "input": [
           {
             "previous_output": "0a9038bbb488729f23c0c1d7c6cfa98ea8464f204fcd9f8d5d90ab91a995d2ba:0",
             "script_sig": "",
             "sequence": 4294967294,
             "witness": []
           }
         ],
         "output": [
           {
             "value": 9010000,
             "script_pubkey": "0020460ef8a2d0ab4e58e940fbcbd21303543d6d32a2cc6a1c566dc3d08e564aafd0"
           },
           {
             "value": 190986940,
             "script_pubkey": "0014b423d53997e1607cf64e31a5a107360fa69db3bd"
           }
         ]
       },
       "version": 0,
       "xpub": {},
       "proprietary": [],
       "unknown": []
     },
     "inputs": [
       {
         "non_witness_utxo": null,
         "witness_utxo": null,
         "partial_sigs": {},
         "sighash_type": null,
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "final_script_sig": null,
         "final_script_witness": null,
         "ripemd160_preimages": {},
         "sha256_preimages": {},
         "hash160_preimages": {},
         "hash256_preimages": {},
         "proprietary": [],
         "unknown": []
       }
     ],
     "outputs": [
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       },
       {
         "redeem_script": null,
         "witness_script": null,
         "bip32_derivation": [],
         "proprietary": [],
         "unknown": []
       }
     ]
   }
 ],
 [
   {
     "color": "green",
     "metadata": {
       "label": "continue_expansion"
     },
     "utxo_metadata": [
       {},
       {}
     ]
   },
   {
     "color": "green",
     "metadata": {
       "label": "stop_expansion"
     },
     "utxo_metadata": [
       {}
     ]
   },
   {
     "color": "green",
     "metadata": {
       "label": "stop_expansion"
     },
     "utxo_metadata": [
       {}
     ]
   },
   {
     "color": "green",
     "metadata": {
       "label": "continue_expansion"
     },
     "utxo_metadata": [
       {},
       {}
     ]
   },
   {
     "color": "green",
     "metadata": {
       "label": "stop_expansion"
     },
     "utxo_metadata": [
       {}
     ]
   },
   {
     "color": "green",
     "metadata": {
       "label": "continue_expansion"
     },
     "utxo_metadata": [
       {}
     ]
   },
   {
     "color": "black",
     "metadata": {
       "label": "funding"
     },
     "utxo_metadata": {}
   }
 ]
]