Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Under Taproot don't (always) use the max satisfaction weight for a script #1006

Open
darosior opened this issue Mar 14, 2024 · 1 comment
Open
Assignees
Labels
Daemon / Liana library This is about lianad or the liana library (not the GUI) Enhancement Improving an existing functionality

Comments

@darosior
Copy link
Member

darosior commented Mar 14, 2024

To avoid introducing more complexity, #985 kept the size estimation of an input spending a coin sent to our descriptor to be the maximum possible between all spending paths. However under Taproot spending from different paths might make a huge difference and we may well be overestimating the size of the spending transaction (therefore overpaying the fees).

There is something we can do using Alekos' planning module in rust-miniscript as we have information about how a transaction may be spent at the time of creation due to how the nSequence is set. We could use the maximum satisfaction size between all spending paths available for instance.

But the low hanging fruit really is when the primary path is a single key which becomes the Taproot internal key. We could detect this case even without using the planning module.

@darosior darosior added Daemon / Liana library This is about lianad or the liana library (not the GUI) Enhancement Improving an existing functionality labels Mar 14, 2024
@darosior darosior self-assigned this Mar 14, 2024
@nondiremanuel
Copy link
Collaborator

The low hanging fruit part will be managed in a separate issue (#1118 )

@nondiremanuel nondiremanuel moved this to Todo in Liana General Jun 15, 2024
@nondiremanuel nondiremanuel added this to the Liana v7 milestone Jun 25, 2024
@nondiremanuel nondiremanuel modified the milestones: v7 - Liana, v8 - Liana Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daemon / Liana library This is about lianad or the liana library (not the GUI) Enhancement Improving an existing functionality
Projects
Status: Todo
Development

No branches or pull requests

2 participants