darosior / python-bip380

Bitcoin Output Script Descriptors with Miniscript extension
MIT License
20 stars 5 forks source link

Witness size worst case calculation #11

Open darosior opened 2 years ago

darosior commented 2 years ago

We have this calculation for the number of executed OPs and the number of stack elements. It would be nice to implement it for the witness size as well, as it would allow to compute feerate of presigned transactions in advance.

darosior commented 2 years ago

The relevant data structure where we track those: https://github.com/darosior/python-bip380/blob/7b79c4719d3d311dec9c7bc5e6d63c79608a3b42/bip380/miniscript/satisfaction.py#L189-L206