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

Possible to hit assertion failure in malleability check #29

Open
apoelstra opened this issue Oct 3, 2022 · 2 comments
Open

Possible to hit assertion failure in malleability check #29

apoelstra opened this issue Oct 3, 2022 · 2 comments

Comments

@apoelstra
Copy link
Member

apoelstra commented Oct 3, 2022

Adding this to miniscript/mod.rs results in a panic.

    #[test]
    fn test_regression_29() {
        let _ = Descriptor::<String>::from_str("eltr(,thresh(1,spk_eq(,00)))");
    }
assertion failed: self.mall.non_malleable || self.corr.input != Input::Zero', /store/home/apoelstra/code/ElementsProject/elements-miniscript/fuzzing/src/miniscript/types/mod.rs:556:9
@apoelstra
Copy link
Member Author

apoelstra commented Oct 3, 2022

I think the issue is that our extensions are all Dissat::Unknown and also Input::zero. These combine in the threshold malleability logic from upstream which says that any threshold where not every sub-fragment is Dissat::Unique must be malleable.

(This logic seems wrong to me, btw, at least in the case that k == n, but we'll accept it for now.)

Anyway I think Input::Zero and Dissat::Unknown are logically incompatible ... I think that if we have Input::Zero we should always have Dissat::Unique, and changing this will fix the bug.

Trying to find a smaller test case..

@sanket1729
Copy link
Member

Converting this issue into revisiting all the correctness/malleability properties for extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants