test: remove unnecessary rpc calls from feature_dbcrash #35394

pull willcl-ark wants to merge 1 commits into bitcoin:master from willcl-ark:faster-dbcrash changing 1 files +2 −2
  1. willcl-ark commented at 11:17 AM on May 27, 2026: member

    On my machine dbcrash takes 17 minutes to run (wihtout --usecli), and is making on the order of 200,000 RPC calls. The bulk of these come from miniwallet's send_self_transfer_multi which calls miniwallets sendrawtransaction, which does:

        def sendrawtransaction(self, *, from_node, tx_hex, maxfeerate=0, **kwargs):
            txid = from_node.sendrawtransaction(hexstring=tx_hex, maxfeerate=maxfeerate, **kwargs)
            self.scan_tx(from_node.decoderawtransaction(tx_hex))
            return txid
    

    The second decoderawtransaction here doubles the number of RPC calls per send, and feature_dbcrash doesn't use the miniwallet utxo list outside of setup and rescans, it already tracks it's own utxo_list, so this is wasted work.

    By creating the transaction and sending using a direct node RPC to send, we can halve the number of rpc calls in this section.

    This change reduces the runtime to 9 minutes for me.

  2. test: speed up feature_dbcrash c17cc76a18
  3. DrahtBot added the label Tests on May 27, 2026
  4. DrahtBot commented at 11:17 AM on May 27, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko commented at 12:47 PM on May 27, 2026: member

    nice. 40% faster for me.

    review ACK c17cc76a1877a5ee5f60501eb66d0ef2e5ebfe1e 📐

    <details><summary>Show signature</summary>

    Signature:

    untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    trusted comment: review ACK c17cc76a1877a5ee5f60501eb66d0ef2e5ebfe1e 📐
    wnAIBqDFh9uNG5TJXZltY8jgTmo5Tk6EOFxPuBD97QkYhO2dEmXBq2N/namqp9LJkzjp/VPkc8WeUlJmlhrmBA==
    

    </details>

  6. fanquake merged this on May 27, 2026
  7. fanquake closed this on May 27, 2026

Labels

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: 2026-05-31 17:50 UTC

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