Skip to content

ci: Make macOS native task sqlite only - #23682

Merged
maflcko merged 1 commit into
bitcoin:masterfrom
maflcko:2112-ciSqlite
Dec 10, 2021
Merged

maflcko merged 1 commit into
bitcoin:masterfrom
maflcko:2112-ciSqlite

Conversation

@maflcko

@maflcko maflcko commented Dec 6, 2021

Copy link
Copy Markdown
Member

There are many sqlite-only test failures (#23563, #23562), so make one CI task sqlite-only.

Obviously this removes bdb coverage from macOS, but I don't expect this to break very often.

@fanquake fanquake added the Tests label Dec 6, 2021
@theStack

theStack commented Dec 6, 2021

Copy link
Copy Markdown
Contributor

Strong Concept ACK

@maflcko

maflcko commented Dec 6, 2021

Copy link
Copy Markdown
Member Author

#23684 🥲

@fanquake

fanquake commented Dec 7, 2021

Copy link
Copy Markdown
Member

Concept ACK

@Sjors

Sjors commented Dec 7, 2021

Copy link
Copy Markdown
Member

On the one hand this seems alright, now that we're gradually deprecating BDB. But at the same time, we haven't finished the wallet upgrade tooling, which requires the presence of both.

@maflcko

maflcko commented Dec 7, 2021

Copy link
Copy Markdown
Member Author

Given that there are plenty of devs on macOS and all the remaining CI tasks also test bdb, I don't think this will cause any issues.

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Dec 7, 2021
…s` and add to test runner

035767f test: add interface_bitcoin_cli.py --descriptors to test_runner.py (Sebastian Falbesoner)
e4fa28a test: fix test interface_bitcoin_cli.py for descriptor wallets (Sebastian Falbesoner)

Pull request description:

  The functional test interface_bitcoin_cli.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`), see bitcoin#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 bitcoin#23684, should also pave the way for bitcoin#23682.

Top commit has no ACKs.

Tree-SHA512: 39b780e25e4c7094cb3378e0f10d4a8aebac1500b7b2d68de47e54e23b9b5efe5afcf8765bb8398eeaf56968e2586a1b294a0f8773c7d90f4188a0f00b8501ff
@maflcko

maflcko commented Dec 7, 2021

Copy link
Copy Markdown
Member Author

Blocked on #23686 (comment)

@DrahtBot

DrahtBot commented Dec 7, 2021 •

Copy link
Copy Markdown
Contributor

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

Conflicts

No conflicts as of last run.

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Dec 8, 2021
…wallet type availability

b57bf25 test: interface_bitcoin_cli.py: check specified wallet type availability (Sebastian Falbesoner)

Pull request description:

  Currently the test `interface_bitcoin_cli.py` performs the wallet-relevant parts if _any_ wallet type support is compiled in, independently of
  whether the test is run with legacy or descriptor wallet specified. This leads to a failure if the test is started with the `--legacy-wallet` parameter, but bitcoind is compiled without BDB support, see e.g
   bitcoin#23686 (comment)

  Fix this by checking if the specified wallet type (BDB for legacy wallet, SQLite for descriptor wallet) is available.

  Should further pave the way for bitcoin#23682.

ACKs for top commit:
  achow101:
    ACK b57bf25

Tree-SHA512: ddb5a94ba61133eff8de79d4946b3b9d476232b26e83bf768894cac4691e72602f88b6c02c72b992e12c2feb9bff1f0a2e0a265948a00954311104add1347184
@maflcko

maflcko commented Dec 8, 2021

Copy link
Copy Markdown
Member Author

next failure:

2021-12-08T17:56:13.138000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  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 132, in main
    self.run_test()
  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/feature_rbf.py", line 79, in run_test
    self.test_rpc()
  File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin19/test/functional/feature_rbf.py", line 542, in test_rpc
    self.init_wallet(node=0)
  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
    n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
  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
    return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
  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__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  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__
    raise JSONRPCException(response['error'], status)
test_framework.authproxy.JSONRPCException: Compiled without bdb support (required for legacy wallets) (-4)

@luke-jr

luke-jr commented Dec 9, 2021

Copy link
Copy Markdown
Contributor

Why not remove it from one of the Linux tasks instead?

@maflcko

maflcko commented Dec 9, 2021

Copy link
Copy Markdown
Member Author

Why not remove it from one of the Linux tasks instead?

Why, and which one? They'd also loose coverage, since we run Linux with sanitizers enabled.

maflcko pushed a commit to bitcoin-core/gui that referenced this pull request Dec 9, 2021
…llet type availability

84bc35d test: feature_rbf.py: check specified wallet type availability (Sebastian Falbesoner)

Pull request description:

  The test currently leads to a failure if in general wallet support is compiled, but the library for the specified type (BDB/SQLite) is not, i.e.  if started with the `--legacy-wallet` parameter, but bitcoind is compiled without BDB support, see e.g. bitcoin/bitcoin#23682 (comment)

  Fix this by checking if the specified wallet type (BDB for legacy wallet, SQLite for descriptor wallet) is available.

  Also move the helper `is_specified_wallet_compiled()` to the
  test framework's class BitcoinTestFramework first, so it can be reused.

  Should further pave the way for #23682. On my local instance without BDB compiled, all targets in test_runner pass now.

ACKs for top commit:
  mzumsande:
    ACK 84bc35d, changes loook good for me and I confirmed that this fixes the error encountered on master when running the test `--without-bdb`.

Tree-SHA512: 1575c03c793c8e0ac195d0914eff75d02604301c8fb77d0fdb7c0b245561569c0c7db387ef4de499044b68ab6e14b4b78b955f6e74c84197bcaed95f439c9824
@maflcko

maflcko commented Dec 9, 2021 •

Copy link
Copy Markdown
Member Author

next failure:

 test  2021-12-09T10:13:33.507000Z TestFramework (ERROR): Assertion failed 
                                   Traceback (most recent call last):
                                     File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin/test/functional/test_framework/test_framework.py", line 132, in main
                                       self.run_test()
                                     File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin/test/functional/feature_coinstatsindex.py", line 51, in run_test
                                       self._test_coin_stats_index()
                                     File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin/test/functional/feature_coinstatsindex.py", line 176, in _test_coin_stats_index
                                       assert_equal(res6['block_info'], {
                                     File "/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-apple-darwin/test/functional/test_framework/util.py", line 50, in assert_equal
                                       raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
                                   AssertionError: not(
{'prevout_spent': Decimal('111.00000000'), 'coinbase': Decimal('50.01006620'), 'new_outputs_ex_coinbase': Decimal('89.99993380'), 'unspendable': Decimal('20.99000000'), 'unspendables': {'genesis_block': Decimal('0E-8'), 'bip30': Decimal('0E-8'), 'scripts': Decimal('20.99000000'), 'unclaimed_rewards': Decimal('0E-8')}} == 
{'unspendable': Decimal('20.99000000'), 'prevout_spent': 111, 'new_outputs_ex_coinbase': Decimal('89.99993620'), 'coinbase': Decimal('50.01006380'), 'unspendables': {'genesis_block': 0, 'bip30': 0, 'scripts': Decimal('20.99000000'), 'unclaimed_rewards': 0}})

maflcko pushed a commit that referenced this pull request Dec 9, 2021
… add to test runner

61fb410 test: add feature_coinstatsindex.py --descriptors to test_runner.py (Sebastian Falbesoner)
50b044a test: fix test feature_coinstatsindex.py for descriptor wallets (Sebastian Falbesoner)

Pull request description:

  The functional test feature_coinstatsindex.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`; or if BDB is not compiled, see #23682 (comment)). 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.

  Should further pave the way for #23682.

ACKs for top commit:
  MarcoFalke:
    cr ACK 61fb410

Tree-SHA512: 300a53f539c0b874da5fc1dd1e4e41b9408dc5526c5858c79f0aabf2ab07e57df4c9cc627fafe25246206752754a91a2977a3df8f8b2d98fb98e51c7e4d81633
@maflcko

maflcko commented Dec 9, 2021 •

Copy link
Copy Markdown
Member Author

CI is green now

@fanquake fanquake left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK fad2e0a - clearly worthwhile having a sqlite only CI given the amount of bugs this has turned up in the past week or so. Tested running the functional tests with a --without-bdb build on macOS and Linux.

@maflcko
maflcko merged commit d5724b8 into bitcoin:master Dec 10, 2021
@maflcko
maflcko deleted the 2112-ciSqlite branch December 10, 2021 08:18
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
…llet type availability

0e18674 test: feature_rbf.py: check specified wallet type availability (Sebastian Falbesoner)

Pull request description:

  The test currently leads to a failure if in general wallet support is compiled, but the library for the specified type (BDB/SQLite) is not, i.e.  if started with the `--legacy-wallet` parameter, but bitcoind is compiled without BDB support, see e.g. bitcoin/bitcoin#23682 (comment)

  Fix this by checking if the specified wallet type (BDB for legacy wallet, SQLite for descriptor wallet) is available.

  Also move the helper `is_specified_wallet_compiled()` to the
  test framework's class BitcoinTestFramework first, so it can be reused.

  Should further pave the way for #23682. On my local instance without BDB compiled, all targets in test_runner pass now.

ACKs for top commit:
  mzumsande:
    ACK 0e18674, changes loook good for me and I confirmed that this fixes the error encountered on master when running the test `--without-bdb`.

Tree-SHA512: 1575c03c793c8e0ac195d0914eff75d02604301c8fb77d0fdb7c0b245561569c0c7db387ef4de499044b68ab6e14b4b78b955f6e74c84197bcaed95f439c9824
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
…escriptors` and add to test runner

7b3cddc test: add feature_coinstatsindex.py --descriptors to test_runner.py (Sebastian Falbesoner)
f2aba12 test: fix test feature_coinstatsindex.py for descriptor wallets (Sebastian Falbesoner)

Pull request description:

  The functional test feature_coinstatsindex.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`; or if BDB is not compiled, see bitcoin/bitcoin#23682 (comment)). 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.

  Should further pave the way for #23682.

ACKs for top commit:
  MarcoFalke:
    cr ACK 7b3cddc

Tree-SHA512: 300a53f539c0b874da5fc1dd1e4e41b9408dc5526c5858c79f0aabf2ab07e57df4c9cc627fafe25246206752754a91a2977a3df8f8b2d98fb98e51c7e4d81633
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
28482cc ci: Make macOS native task sqlite only (MarcoFalke)

Pull request description:

  There are many sqlite-only test failures (#23563, #23562), so make one CI task sqlite-only.

  Obviously this removes bdb coverage from macOS, but I don't expect this to break very often.

ACKs for top commit:
  fanquake:
    ACK 28482cc - clearly worthwhile having a sqlite only CI given the amount of bugs this has turned up in the past week or so. Tested running the functional tests with a `--without-bdb` build on macOS and Linux.

Tree-SHA512: d88ad576bbe974a51a2d115e4102fc1bd73772b7393dfa99700fbfd1bdf5deebbf247e35d09757639649a6ad5b193c0998c7db679301a7c012572dfd54a6a289
@bitcoin bitcoin locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants