Skip to content

Conversation

@sanket1729
Copy link
Member

@sanket1729 sanket1729 commented Mar 14, 2022

This is the final PR testing of many of the new features in the taproot miniscript release. This defines a new template language for checking all the Psbt APIs (and thereby all the miniscript ones).

    // K : Compressed key available
    // K!: Compressed key with corresponding secret key unknown
    // X: X-only key available
    // X!: X-only key with corresponding secret key unknown

    // Test 1: Simple spend with internal key
    let wit = test_desc::test_desc_satisfy(cl, testdata, "tr(X)");
    assert!(wit.len() == 1);

Right now, it does not test error cases, but I plan to update this framework so that we can also test those.

Based on #308 and #310

@sanket1729 sanket1729 force-pushed the add_desc_tests branch 4 times, most recently from 6fa2490 to e48415b Compare March 14, 2022 15:49
@sanket1729 sanket1729 marked this pull request as ready for review March 14, 2022 15:52
@sanket1729 sanket1729 force-pushed the add_desc_tests branch 2 times, most recently from 7477890 to 7a6c69d Compare March 14, 2022 17:10
Easier for writing future tests. There are no new tests added in this
commit. This only moves cpp tests into test_cpp, deletes read_file.rs
and moves common utilities to test_util.rs
Rework integration framework: Add generic descriptor satisfaction support
Also update block count in generatetoaddress for fast execution of
integration tests
0.21 does not have support for bech32m
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 13c4746

Wow, this is great!!

@sanket1729 sanket1729 merged commit cb1f244 into rust-bitcoin:master Mar 21, 2022
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
13c47464c1fde4e5e3af0785e45f8b01885c0dd2 Update CI to test on 22.0 instead of 0.21 (sanket1729)
51126d3ed45516ab7b5a8894b5ddbc7b469f5887 Add taproot tests (sanket1729)
c25fc05286d00c3a094a4203a637a359e615f131 Add descriptor integration tests (sanket1729)
ae3c98e3564cde6a91fff120dc99c40b25f93cff Move only: Rework Integration Test and makes things more modular (sanket1729)

Pull request description:

  This is the final PR testing of many of the new features in the taproot miniscript release. This defines a new template language for checking all the Psbt APIs (and thereby all the miniscript ones).

  ```rust
      // K : Compressed key available
      // K!: Compressed key with corresponding secret key unknown
      // X: X-only key available
      // X!: X-only key with corresponding secret key unknown

      // Test 1: Simple spend with internal key
      let wit = test_desc::test_desc_satisfy(cl, testdata, "tr(X)");
      assert!(wit.len() == 1);
  ```

  Right now, it does not test error cases, but I plan to update this framework so that we can also test those.

  Based on #308 and #310

ACKs for top commit:
  apoelstra:
    ACK 13c47464c1fde4e5e3af0785e45f8b01885c0dd2

Tree-SHA512: ce39c9b0242460e70f79c57843c69be36de045da6bcc686306a324c7fe58b70a5fe45e858c266a1f816f4e7f8aaf570fb42f64e543de86e2d786e1fa3fa0beb4
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

Successfully merging this pull request may close these issues.

2 participants