test: add p2pk support to wallet_implicity_segwit.py #32152

pull musaHaruna wants to merge 1 commits into bitcoin:master from musaHaruna:add-p2pk-support-to-wallet-implicity-segwit-test changing 1 files +80 −7
  1. musaHaruna commented at 10:31 am on March 27, 2025: none

    This pull request modifies wallet_implicity_segwit.py by adding support for Pay-to-Public-Key (P2PK) transactions. It addresses a previously noted TODO, which suggested that P2PK transactions will be nice to be tested as part of the wallet implicit segwit functionality. The modification expands the test to include transactions involving P2PK outputs, which are handled by Bitcoin Core in a non-native way (simulated using legacy addresses). The updated test ensures that Bitcoin Core correctly processes and recognizes P2PK transactions alongside legacy, Bech32, and P2SH-SegWit address types.

    The reason behind this PR is to address the standing TODO—“Might be nice to test p2pk here too”—by explicitly testing the P2PK scenario. By generating a legacy address to retrieve the public key, creating a raw transaction, modifying its scriptPubKey to a P2PK format, and then funding, signing, and broadcasting it, this enhancement confirms that P2PK transactions are correctly processed both before and after node restarts.

  2. DrahtBot commented at 10:31 am on March 27, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32152.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  3. DrahtBot added the label Tests on Mar 27, 2025
  4. test: add p2pk support to wallet_implicity_segwit.py fed5a07c2a
  5. musaHaruna force-pushed on Mar 27, 2025
  6. DrahtBot added the label CI failed on Mar 27, 2025
  7. DrahtBot commented at 11:15 am on March 27, 2025: contributor

    🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/39507566360

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  8. maflcko commented at 11:22 am on March 27, 2025: member
    the bdb wallet will be removed, so i guess it seems easier to just wait for that to happen instead of modifying code that will be deleted
  9. musaHaruna commented at 11:25 am on March 27, 2025: none

    the bdb wallet will be removed, so i guess it seems easier to just wait for that to happen instead of modifying code that will be deleted

    Okay thanks for the heads up, should I close the PR then?

  10. maflcko commented at 11:27 am on March 27, 2025: member
  11. maflcko closed this on Mar 27, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-03-31 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me