test: fix interface_bitcoin_cli.py --descriptors and add to test runner #23686

pull theStack wants to merge 2 commits into bitcoin:master from theStack:202112-test-fix-interface_bitcoin_cli-with-descriptors changing 2 files +5 −1
  1. theStack commented at 7:21 pm on December 6, 2021: member

    The functional test interface_bitcoin_cli.py currently fails on master branch, if descriptor wallets are used (argument --descriptors), see #23684. This is due to the fact that different change output types are used for created transactions (P2WPKH for legacy wallets, P2TR for descriptor wallets; the former doesn’t have a ScriptPubKeyMan for bech32m), resulting in different tx sizes and hence also fees. Fix this by explicitely setting the output type via passing both -addresstype=bech32 and -changetype=bech32 as argument. The former would not be needed by now, but makes the test more deterministic and avoids a failure if bech32m becomes the default address type.

    Fixes #23684, should also pave the way for #23682.

  2. test: fix test interface_bitcoin_cli.py for descriptor wallets e4fa28a322
  3. test: add interface_bitcoin_cli.py --descriptors to test_runner.py 035767f54a
  4. DrahtBot added the label Tests on Dec 6, 2021
  5. MarcoFalke commented at 7:50 am on December 7, 2021: member
    lgtm
  6. MarcoFalke merged this on Dec 7, 2021
  7. MarcoFalke closed this on Dec 7, 2021

  8. MarcoFalke commented at 8:55 am on December 7, 2021: member

    https://cirrus-ci.com/task/5707611839397888?logs=ci#L2648

     046/228 - interface_bitcoin_cli.py --legacy-wallet failed, Duration: 1 s
     1stdout:
     22021-12-07T08:49:36.678000Z TestFramework (INFO): Initializing test directory /private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/test_runner/test_runner__🏃_20211207_004607/interface_bitcoin_cli_180
     32021-12-07T08:49:36.946000Z TestFramework (ERROR): JSONRPC error
     4Traceback (most recent call last):
     5  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/test_framework.py", line 131, in main
     6    self.setup()
     7  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/test_framework.py", line 288, in setup
     8    self.setup_network()
     9  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/test_framework.py", line 382, in setup_network
    10    self.setup_nodes()
    11  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/test_framework.py", line 409, in setup_nodes
    12    self.import_deterministic_coinbase_privkeys()
    13  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/test_framework.py", line 426, in import_deterministic_coinbase_privkeys
    14    self.init_wallet(node=i)
    15  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/test_framework.py", line 433, in init_wallet
    16    n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
    17  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/test_node.py", line 704, in createwallet
    18    return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
    19  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/coverage.py", line 49, in __call__
    20    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    21  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/test_framework/authproxy.py", line 144, in __call__
    22    raise JSONRPCException(response['error'], status)
    23test_framework.authproxy.JSONRPCException: Compiled without bdb support (required for legacy wallets) (-4)
    
  9. theStack deleted the branch on Dec 7, 2021
  10. sidhujag referenced this in commit 5f365b1676 on Dec 7, 2021
  11. MarcoFalke referenced this in commit f727d814bd on Dec 8, 2021
  12. RandyMcMillan referenced this in commit 6a6dd04c06 on Dec 23, 2021
  13. RandyMcMillan referenced this in commit df325dbcc3 on Dec 23, 2021
  14. DrahtBot locked this on Dec 8, 2022

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: 2024-11-17 21:12 UTC

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