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

descriptors: Improve max satisfaction weight estimates for recovery path inputs #1454

Open
jp1ac4 opened this issue Nov 11, 2024 · 0 comments
Labels
Bug Something isn't working as expected

Comments

@jp1ac4
Copy link
Collaborator

jp1ac4 commented Nov 11, 2024

When estimating the max satisfaction weight of a transaction input, we use a different approach depending on whether we are considering a primary or non-primary spending path. These can give different values for the same element, e.g. a Schnorr signature for a non-primary path estimate will include a byte for the sighash suffix. For primary paths, we use rust-miniscript's planning module, and I think we should use that also for non-primary paths to ensure consistency in the estimates.

Furthermore, a non-primary estimate currently considers the max across all paths, which could be the primary path still. Ideally, there would be a way to specify which spending path we are using and to get the estimate for this path only.

The impact of the above is that the fee for a recovery transaction may be higher than necessary to achieve the target feerate.

@nondiremanuel nondiremanuel added the Bug Something isn't working as expected label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants