Skip to content

Optimize 1-of-N thresholds to or()s #126

Open
@darosior

Description

@darosior

#113 left out a FIXME that we are unsure to fix at all, opening this to clarify if we want it or not.

We now optimize N-of-N thresholds to and(), and i propose to do the same for 1-of-N thresholds (using or()s). After discussing this with sipa (who implemented this in C++) and @sanket1729 the main issue with the latter seems to be the exponential complexity with the number of or()s.

I personally think (user point of view) that if the complexity growth is only applied on the policy compilation it's fine, as we only ever compile once to miniscript per user and then store the Miniscript Descriptor while the Script size is felt onchain For Ever (:tm:).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions