Add taproot privacy optimisations in policy compiler
Maintainer antworten meist innerhalb von 4 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
Verfolge den Einstiegspunkt bdk-cli compile --type tr und prüfe den aktuellen compile-Aufruf sowie das manuelle Wrapping eines einzelnen Leafs. Vergleiche diesen Pfad mit der Ausgabe von rust-miniscripts compile_tr für die disjunktiven und Threshold-Beispiele; als erledigt gilt die Aufgabe, wenn Taproot-Policies separate Leaves verwenden und der resultierende Baum die vorgesehene Huffman-Optimierung erhält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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))
- Vorherrschende Sprache
- Rust
- Sterne
- 142
- Forks
- 103
- Ø Merge
- 5 T. 21 Std.
- Gemergte PRs (30 T.)
- 7
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus bitcoindevkit/bdk-cli
-
Remove "wallet" field from `WalletConfigInner`Evtl. vergeben @Jennycj hat das vor 3 Tagen übernommen. Offenenhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bitcoindevkit/bdk-cli#332 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 4 Tagen
-
`warn!` output is invisible unless `RUST_LOG` is setEvtl. vergeben @chukwudiikeh hat das vor 1 Tag übernommen. Offen
bitcoindevkit/bdk-cli#352 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 4 Tagen
-
enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
bitcoindevkit/bdk-cli#349 ·
Maintainer antworten meist innerhalb von 4 Tagen
-
`compile` doesn't validate keys and returns unusable descriptorsEvtl. vergeben @Olorunshogo hat das vor 6 Tagen übernommen. Offenenhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
bitcoindevkit/bdk-cli#344 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 4 Tagen
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 50/100
bitcoindevkit/bdk-cli#340 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 4 Tagen
Alle Issues in bitcoindevkit/bdk-cli
Ähnliche Issues
-
documentation good first issue
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
sujithputta02/Esapay#13 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
tursodatabase/turso#10002 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
topgrade-rs/topgrade#2419 ·
Maintainer antworten meist innerhalb von 1 Tag
-
review-bot
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
midagedev/bloomery#318 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Chia-Network/clvm_rs#863 ·
Maintainer antworten meist innerhalb von 1 Tag