Descriptor Trait/Typeclass:
Table of API on along the rows, and columns showing the descriptor type. Each box represents
- y = always succeeds
- n = always fails
- yn = may succeed
All descriptors sh/wsh/shwsh/tr/bare support miniscript descriptors
| error[E0308]: mismatched types | |
| --> src/test_random_miniscripts.rs:32:44 | |
| | | |
| 32 | let ms: Result<_, ()> = ms.translate_pk( | |
| | ^^^^^^^^^^^^ one type is more general than the other | |
| | | |
| = note: expected type `FnOnce<(&std::string::String,)>` | |
| found type `FnOnce<(&std::string::String,)>` |
| let ms = match desc { | |
| Descriptor::Sh(ref sh) => { | |
| match sh.as_inner(){ | |
| ShInner::Wsh(wsh ) => { | |
| match wsh.as_inner() { | |
| WshInner::Ms(ref ms) => ms | |
| } | |
| } | |
| } | |
| } |
New fields required:
PSBT_IN_MUSIG_PARTICIPANT_PUBLIC_KEYS: (<x_only_pk(agg_pk_to_sign)><x_only_pk(agg_pk)>) -> <[x_only_pk]*>: For example, (a, b) -> [c] where b = Musig2_KeyAgg([c]) and a is a tweaked(BIP32 tweak or x-only tweak or both) key derived from b where the tweaking information is present in PSBT_IN_TAP_BIP32_DERIVATION in case of BIP32 tweak. In case, a is the output key, an additional BIP341 tweak is applied. The tweak information is provided in PSBT_IN_TAP_INTERNAL_KEY or PSBT_IN_TAP_MERKLE_ROOT. The full xpub for the aggregated agg_pk can be provided in PBST_GLOBAL_XPUB field
PSBT_IN_TAP_MUSIG2_PUB_NONCE: (<x_only_pk(participant_key), x_only_pk(agg_pk_to_sign), leaf_hash>) -> <pub_nonce> (serialized pub_nonce including R1 and R2).
PSBT_IN_TAP_PARTIAL_SIGNATURE: (<x_only_pk(participant_key), x_only_pk(agg_pk_to_sign), leaf_hash>) -> <partial_sig> (serialized partial_sig)
| // Some user struct for trees | |
| enum Tree { | |
| Node(Tree,Tree), | |
| Leaf(Miniscript), | |
| } | |
| impl Tree { | |
| fn update_builder(&self, builder: TaprootBuilder, depth: usize) -> TaprootBuilder { | |
| match self { |
(Feel free to suggest add/copy/edit anything from this doc into anything that we need)
Notable Events:
| #unsigned_psbt,signed_psbt,(pk;sk,)* | |
| 70736274ff01005202000000014f1081b4b3f3527113058a48b6fd84d968f212c1c0d334d637f77d294b3289f80100000000010000000148d5f50500000000160014b6e35acec5146ef531a6372137cd45f104f8f8f8da0e995f0001011f00e1f50500000000160014773dfa9e21789bf357c19b7db8a4c7df97d930c6220603ab1ac1872a38a2f196bed5a6047f0da2c8130fe8de49fc4d5dfb201f7611d8e204773dfa9e0000,70736274ff01005202000000014f1081b4b3f3527113058a48b6fd84d968f212c1c0d334d637f77d294b3289f80100000000010000000148d5f50500000000160014b6e35acec5146ef531a6372137cd45f104f8f8f8da0e995f0001011f00e1f50500000000160014773dfa9e21789bf357c19b7db8a4c7df97d930c6220203ab1ac1872a38a2f196bed5a6047f0da2c8130fe8de49fc4d5dfb201f7611d8e24830450221009f58243e91c0272fe8f617bba3d05d4d3f3112ad30bfcb83053a353f38b1cc8102202bbbb144a78090840132ffabb3fc6aa193c1346e29d9444a156e799d605fcd6901220603ab1ac1872a38a2f196bed5a6047f0da2c8130fe8de49fc4d5dfb201f7611d8e204773dfa9e0000,03ab1ac1872a38a2f196bed5a6047f0da2c8130fe8de49fc4d5dfb201f7611d8e2;cMeb8vatuSpDLwokavVgGWFc2gF8xKDRfA |
Run each jet for the selected input and choose the worst case amongst those inputs. For example, when running Add32, we run bench 50 random inputs and select the worst case amongst those
| { | |
| "Add32": 60.6159814446884, | |
| "AnnexHash": 211.09026343236047, | |
| "AssetAmountHash": 180.8254919736737, | |
| "Bip0340Verify": 45984.13321032714, | |
| "BuildTapbranch": 1435.412867661228, | |
| "BuildTapleafSimplicity": 1015.4756900209926, | |
| "CalculateAsset": 360.06007299543614, | |
| "CalculateConfidentialToken": 350.8989606414178, | |
| "CalculateExplicitToken": 348.558227539948, |
| class Solution: | |
| def minimizeArrayValue(self, nums: List[int]) -> int: | |
| total_sum = 0 | |
| ans = 0 | |
| for i, v in enumerate(nums): | |
| capacity = ans * (i + 1) | |
| total_sum += v | |
| # Can we accomodate last value within current answer | |
| if total_sum > capacity: | |
| # Restribute equally. |