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

PoC: Use tweaked NUMS key for non-spendable Taproot script leaves #1289

Draft
wants to merge 1 commit into
base: cold-group-key
Choose a base branch
from

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Jan 10, 2025

This serves as a PoC which we should be able to use to test hardware wallets. This PR does not include all necessary doc updates.

This PR updates the NewNonSpendableScriptLeaf function to use a deterministic tweaked NUMS (Nothing-Up-My-Sleeve) key for generating non-spendable Taproot leaves. The previous OP_RETURN-based approach is replaced with a pk(data) Miniscript script (<pubkey> OP_CHECKSIG), ensuring broader compatibility with modern hardware wallets.


Notes for Reviewers

@ffranr ffranr self-assigned this Jan 10, 2025
@ffranr
Copy link
Contributor Author

ffranr commented Jan 10, 2025

With this change. tapd nodes v0.5 and older will fail to validate new group key V1 assets.

@ffranr ffranr requested a review from gijswijs January 10, 2025 17:04
@coveralls
Copy link

coveralls commented Jan 10, 2025

Pull Request Test Coverage Report for Build 12733974902

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • 22 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.02%) to 40.782%

Files with Coverage Reduction New Missed Lines %
tapgarden/planter.go 2 71.0%
tapdb/universe.go 4 80.91%
tapgarden/caretaker.go 4 68.5%
asset/asset.go 4 75.52%
universe/interface.go 8 53.68%
Totals Coverage Status
Change from base Build 12709993838: 0.02%
Covered Lines: 26509
Relevant Lines: 65001

💛 - Coveralls

@ffranr ffranr force-pushed the nums-non-spend-leaves branch from af75235 to f6a7f79 Compare January 10, 2025 19:50
@ffranr ffranr changed the title Use tweaked NUMS key for non-spendable Taproot script leaves PoC: Use tweaked NUMS key for non-spendable Taproot script leaves Jan 10, 2025
@dstadulis dstadulis added this to the v0.6 milestone Jan 10, 2025
This Proof-of-Concept demonstrates the NUMS-tweak formulation for
hardware wallet testing.

The NewNonSpendableScriptLeaf function now generates non-spendable
Taproot leaves using a deterministic NUMS (Nothing-Up-My-Sleeve) key,
tweaked with arbitrary data. This replaces the previous raw OP_RETURN
approach with a `pk(data)` Miniscript script (`<pubkey> OP_CHECKSIG`),
improving compatibility with current hardware wallets.
@ffranr ffranr force-pushed the nums-non-spend-leaves branch from f6a7f79 to d09b5bf Compare January 12, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

3 participants