test: 999 of 999 multisig #28179

issue Sjors openend this issue on July 28, 2023
  1. Sjors commented at 10:56 am on July 28, 2023: member

    Motivation

    The stack size limit of 1000 confuses even those who designed it.

    It would be useful to have a test to demonstrate that a 999 of 999 Taproot multisig is possible: multi_a(999, P1, …, P999). Especially to make sure our wallet can spend from it and doesn’t allow a bigger one (no 999 of 1000 and no 1 of 1000).

    Possible solution

    Either expand the descriptors unit test and/or one of the wallet functional tests.

    Useful Skills

    Python and a basic understanding of output descriptors. Understanding (Mini)script (interpreter) is not necessary unless you actually want to understand why the limit is there.

    Guidance for new contributors

    Want to work on this issue?

    For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

  2. Sjors added the label good first issue on Jul 28, 2023
  3. maflcko added the label Tests on Jul 28, 2023
  4. darosior commented at 10:16 pm on July 30, 2023: member

    For what it’s worth we already test a 1-of-N multi_a where N is randomly picked from [1; 999]: https://github.com/bitcoin/bitcoin/blob/64440bb733896a7a2caf902825e0406cb993e666/test/functional/wallet_taproot.py#L495-L501

    Also:

    The stack size limit of 1000 confuses even those who designed it.

    The stack limit was introduced by Satoshi in 757f0769d8360ea043f469f3a35f6ec204740446 (https://github.com/bitcoin/bitcoin/commit/757f0769d8360ea043f469f3a35f6ec204740446#diff-27496895958ca30c47bbb873299a2ad7a7ea1003a9faa96b317250e3b7aa1fefR817-R818).

  5. Sjors commented at 10:54 am on July 31, 2023: member
    That test is a good starting point. The current version picks one random number so it’s not really testing the limit (in a single CI run). It also doesn’t test N-of-N (hopefully that’s not too slow).
  6. eriknylund commented at 1:15 pm on August 3, 2023: contributor
    @Sjors I’ve had a look at adding the tests mentioned in the issue by extending the tests in wallet_taproot.py. I’ll open a PR - happy to get feedback on it.
  7. SambhavsCreation commented at 2:48 pm on August 9, 2023: none
    Is someone still working on this? Please let me know as if not I might start working on it myself
  8. eriknylund commented at 2:50 pm on August 9, 2023: contributor

    Is someone still working on this? Please let me know as if not I might start working on it myself

    I have a PR #28212 open for it, so please review if you have a chance. 🙏

  9. subhakundu commented at 4:21 pm on December 10, 2023: none
    Is someone working on it? Otherwise, I would like to work on it. This is the first time I will work on Bitcoin code base. I see, this is the only first-time not active issue.
  10. eriknylund commented at 4:27 pm on December 10, 2023: contributor

    Is someone working on it? Otherwise, I would like to work on it. This is the first time I will work on Bitcoin code base. I see, this is the only first-time not active issue.

    I have a PR #28212 open for it, so please review if you have a chance. 🙏


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-03 10:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me