Skip to content

Conversation

@notmandatory
Copy link
Member

@notmandatory notmandatory commented Sep 1, 2022

This update also required recalculating the PSBT proofs due to BDK removing partial signatures, see bitcoindevkit/bdk-cli#118 (review).

Once this PR is merged I'll publish a new bdk-reserves release version 0.22.0.

@notmandatory
Copy link
Member Author

@ulrichard I did the basic changes to update to the bdk 0.22 release candidate. Do you have time to investigate why some tests are failing?

@rajarshimaitra
Copy link
Contributor

Thanks @notmandatory for the PR.. Code changes looks good to me.. Here's the possible reason why the tests might be failing.

  • We changed the get_funded_wallet code in bdk, so the transaction created by get_funded_wallet looks different than before.

  • Which is used in all the failing tests and then calls wallet.verify_proof() against a hardcoded PSBT here

    fn get_signed_proof() -> PSBT {
    let psbt = "cHNidP8BAH4BAAAAAmw1RvG4UzfnSafpx62EPTyha6VslP0Er7n3TxjEpeBeAAAAAAD/////FcB9C8LQwqAoYxGcM/YLhUt3XZIQUmFAlaJlBjVmFO8AAAAAAP////8BUMMAAAAAAAAZdqkUn3/QltN+0sDj9/DPySS+70/862iIrAAAAAAAAQEKAAAAAAAAAAABUQEHAAABAR9QwwAAAAAAABYAFOzlJlcQU9qGRUyeBmd56vnRUC5qIgIDKwVYB4vsOGlKhJM9ZZMD4lddrn6RaFkRRUEVv9ZEh+NHMEQCICY1Ikn5FTh1KYCpJz7VHyybI1xIcwdtRzOSzmIn6L7RAiBPEOj74R91LZJot3HQ0QbR2zqJnXQG8iL/s7YSBpSOfwEBBwABCGsCRzBEAiAmNSJJ+RU4dSmAqSc+1R8smyNcSHMHbUczks5iJ+i+0QIgTxDo++EfdS2SaLdx0NEG0ds6iZ10BvIi/7O2EgaUjn8BIQMrBVgHi+w4aUqEkz1lkwPiV12ufpFoWRFFQRW/1kSH4wAA";
    let psbt = base64::decode(&psbt).unwrap();
    deserialize(&psbt).unwrap()
    }

  • This PSBT probably needs to be updated to match against the new funding transaction. But I don't fully understand how it was created. Maybe @ulrichard can help us here..

@notmandatory
Copy link
Member Author

notmandatory commented Sep 2, 2022

@rajarshimaitra thanks for the tip! yes I did have to re-calculate the proof PSBT and that fixed the tests. I think the difference is caused by the new PSBT default signing options, on finalize remove partial signatures. I didn't check the individual bits and bytes but the new PSBTs are much smaller.

Copy link
Contributor

@rajarshimaitra rajarshimaitra left a comment

Choose a reason for hiding this comment

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

tACK dadb44c

Thanks for figuring the psbt @notmandatory!! This works..

@notmandatory notmandatory marked this pull request as draft September 5, 2022 22:00
@notmandatory notmandatory self-assigned this Sep 5, 2022
@notmandatory notmandatory mentioned this pull request Sep 5, 2022
21 tasks
@notmandatory notmandatory force-pushed the update_bdk022 branch 2 times, most recently from 99f565f to 71cfb91 Compare September 8, 2022 13:17
@notmandatory notmandatory marked this pull request as ready for review September 8, 2022 13:20
@notmandatory notmandatory merged commit 6f742ff into bitcoindevkit:main Sep 8, 2022
@ulrichard
Copy link
Collaborator

Sorry for the late reaction. I was busy with other things. Looks all good to me. Thanks for your efforts.

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.

3 participants