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

Make Psbt::sighash_ecdsa private #2344

Open
Kixunil opened this issue Jan 16, 2024 · 2 comments · May be fixed by #2367
Open

Make Psbt::sighash_ecdsa private #2344

Kixunil opened this issue Jan 16, 2024 · 2 comments · May be fixed by #2367
Labels
1.0 Issues and PRs required or helping to stabilize the API API break This PR requires a version bump for the next release

Comments

@Kixunil
Copy link
Collaborator

Kixunil commented Jan 16, 2024

The method takes &mut SighashCache which doesn't enforce that the transaction is equal to unsigned_tx which looks broken. Judging from other methods around it should've been private.

Note: I have some idea how to avoid cloning the transaction during signing but this method being public significantly restricts the design.

@Kixunil Kixunil added question 1.0 Issues and PRs required or helping to stabilize the API labels Jan 16, 2024
@tcharding
Copy link
Member

I've worked on that code so I took a look, I don't see any reason that it should be public. IMO it would be fine to make it private. FWIW I'm re-writing the psbt stuff at the moment, I have not gotten to the signing API yet though. It will likely need some work to add taproot support.

@Kixunil
Copy link
Collaborator Author

Kixunil commented Jan 16, 2024

OK, let's make it private. I think my upcoming PR might help with signing and other things.

@Kixunil Kixunil added API break This PR requires a version bump for the next release and removed question labels Jan 16, 2024
@Kixunil Kixunil changed the title Why is Psbt::sighash_ecdsa public? Make Psbt::sighash_ecdsa private Jan 16, 2024
@Kixunil Kixunil linked a pull request Jan 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Issues and PRs required or helping to stabilize the API API break This PR requires a version bump for the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants