Add taproot privacy optimisations in policy compiler
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
bdk-cli compile --type tr のエントリーポイントを追跡し、現在の compile 呼び出しと単一 leaf の手動ラッピングを調査してください。その経路を、選言および threshold の例に対する rust-miniscript の compile_tr の出力と比較してください。taproot ポリシーが個別の leaf を使用し、結果のツリーに意図した Huffman 最適化が適用されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the enhancement
bdk-cli compile --type tr "$POL" currently only calls compile and manually wraps the result into a single taproot leaf, instead of using compile_tr from rust-miniscript that splits disjunctions into separate leaves and Huffman-optimises the tree. Using compile_tr would be a good compromise, though compile_tr_private_experimental exists and goes one step further in privacy optimisation.
Use case
When compiling a disjunctive policy to a taproot descriptor, each spending condition should ideally be its own leaf so that only the used path is revealed on-chain. Currently all conditions are bundled into a single leaf, missing the privacy benefits of taproot's script tree.
Additional context
The following shows the output of all three rust-miniscript functions for reference:
Example 1: or(pk(A),pk(B))
compile:
or_b(pk(A),s:pk(B))
compile_tr:
internal key : B
tap tree leaves (1 total):
depth=0 script=pk(A)
compile_tr_private_experimental:
internal key : B
tap tree leaves (1 total):
depth=0 script=pk(A)
Example 2: thresh(1,pk(A),pk(B),pk(C))
compile:
multi_a(1,A,B,C)
compile_tr:
internal key : C
tap tree leaves (2 total):
depth=1 script=pk(B)
depth=1 script=pk(A)
compile_tr_private_experimental:
internal key : C
tap tree leaves (2 total):
depth=1 script=pk(B)
depth=1 script=pk(A)
Example 3: thresh(2,pk(A),pk(B),pk(C))
compile:
multi_a(2,A,B,C)
compile_tr:
internal key : UNSPENDABLE
tap tree leaves (1 total):
depth=0 script=multi_a(2,A,B,C)
compile_tr_private_experimental:
internal key : UNSPENDABLE
tap tree leaves (3 total):
depth=1 script=and_v(v:pk(A),pk(B))
depth=2 script=and_v(v:pk(B),pk(C))
depth=2 script=and_v(v:pk(A),pk(C))
- 主要言語
- Rust
- スター
- 143
- フォーク
- 98
- 平均マージ
- 6日 8時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bitcoindevkit/bdk-cli のほかの issue
-
Use `ValueEnum` for `--type` in `compile` command対応中かも @chukwudiikeh が 3 日前に担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
bitcoindevkit/bdk-cli#345 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bitcoindevkit/bdk-cli#332 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
`compile` doesn't validate keys and returns unusable descriptors対応中かも @Olorunshogo が 3 日前に担当しました。 オープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
bitcoindevkit/bdk-cli#344 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
bitcoindevkit/bdk-cli#340 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Enforce Core-compatible OP_RETURN / datacarrier and standard tx-size limits in create_tx対応中かも @tvpeter が 16 日前に担当しました。 オープンenhancement
bitcoindevkit/bdk-cli#339 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
bitcoindevkit/bdk-cli の issue をすべて見る
似ている issue
-
ai-priority/P2 bug db/oracle user-priority/P1
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
swc-project/swc#12516 ·
メンテナーはふだん 1 日以内に返信
-
app bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
mls-rs-crypto-awslc: exact aws-lc-rs =1.16.3 pin blocks rustls security update対応中かも @muscariello が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100