8000 txscript: add more detail to invalid tapscript merkle proof error by Roasbeef · Pull Request #2284 · btcsuite/btcd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

txscript: add more detail to invalid tapscript merkle proof error #2284

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Roasbeef
Copy link
Member
@Roasbeef Roasbeef commented Dec 3, 2024

In this commit, we add more detail to the invalid tapscript merkle proof error. Before this commit, the error was blank, making such a case hard to debug. We'll now log the expected witness program, what we derived, and also the passed in tapscript root.

In this commit, we add more detail to the invalid tapscript merkle proof
error. Before this commit, the error was blank, making such a case hard
to debug. We'll now log the expected witness program, what we derived,
and also the passed in tapscript root.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12143498639

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 9 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.009%) to 57.246%

Files with Coverage Reduction New Missed Lines %
peer/peer.go 9 74.01%
Totals Coverage Status
Change from base Build 12142686341: -0.009%
Covered Lines: 29891
Relevant Lines: 52215

💛 - Coveralls

@Roasbeef Roasbeef requested a review from Copilot March 28, 2025 19:37
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves debugging for invalid tapscript merkle proofs by adding detailed error messages.

  • Updates test cases to verify specific error codes based on manipulated data.
  • Enhances the error message in VerifyTaprootLeafCommitment to include the derived witness program, expected witness program, and tapscript root.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
txscript/taproot_test.go Updated test cases to include expected error codes and modify mutation logic on proofs.
txscript/taproot.go Enhanced error reporting with a detailed formatted string showing witness program details.

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

Successfully merging this pull request may close these issues.

2 participants
0