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

Add support for musig() key expressions #230

Draft
wants to merge 15 commits into
base: develop
Choose a base branch
from
Draft

Add support for musig() key expressions #230

wants to merge 15 commits into from

Conversation

bigspider
Copy link
Collaborator

@bigspider bigspider commented Feb 21, 2024

Closes: #208

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 83.58209% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 84.78%. Comparing base (e6b45ad) to head (e7adc3a).

Files Patch % Lines
src/common/wallet.c 82.81% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #230      +/-   ##
===========================================
- Coverage    84.85%   84.78%   -0.07%     
===========================================
  Files           17       17              
  Lines         2192     2235      +43     
===========================================
+ Hits          1860     1895      +35     
- Misses         332      340       +8     
Flag Coverage Δ
unittests 84.78% <83.58%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…ed some comments.

Generalizing to key expressions containing musig() makes it necessary to distinguish
the key expressions in the wallet policy from the actual key placeholders that are
just indexes to the list of key informations (@num in the descriptor template),
whereas the two concepts were often not clearly separated in the code base.

Renaming to "key expressions" makes the distinction more clear.
…on type is used; generalized some parts of the code that are not generalized to musig key expressions, and annotated some others.
uint32_t addr_index_step = input->in_out.address_index;

uint8_t bip32_tweak_1[32];
uint8_t bip32_tweak_2[32];

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable bip32_tweak_2 is not used.
Comment on lines +450 to +454
// int pk_offset = is_tap ? 1 : 0;
// if (memcmp(pubkey.compressed_pubkey + pk_offset, bip32_derivation_pubkey, key_len) != 0)
// {
// return 0;
// }

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Copy link

sonarcloud bot commented May 17, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
8.2% Coverage on New Code (required ≥ 80%)
10.4% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

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.

MuSig2 support
2 participants