qa: regenerate hardcoded regtest chain for kernel lib unit tests #35338

pull darosior wants to merge 1 commits into bitcoin:master from darosior:2605_regenerate_hardcoded_regtest_chain changing 2 files +210 −210
  1. darosior commented at 8:15 PM on May 20, 2026: member

    The kernel library uses a harcoded regtest block chain in the unit tests. This chain was generated prior to #32155 and its coinbase transactions are not BIP 54 compatible.

    This PR updates the hardcoded chain to be BIP 54 compatible and contain more transactions. It was generated based on the chain from the wallet_migration.py functional test as it contains coins for a wide variety of output types (though it may be useful to add more transactions spending from these output types). Some trivial hardcoded values in the unit test had to be updated to match the new chain.

  2. qa: regenerate hardcoded regtest chain for kernel lib unit tests 98f706c698
  3. DrahtBot added the label Tests on May 20, 2026
  4. DrahtBot commented at 8:15 PM on May 20, 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/35338.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK sedited, alexanderwiederin

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited approved
  6. sedited commented at 7:41 AM on May 21, 2026: contributor

    ACK 98f706c698ae77fc91cd46ba2c3750b125d95016

    Will probably re-generate this again at some point. Ideally we'd have a generation tool that does this for all kernel bindings with chains of interesting transactions.

  7. alexanderwiederin commented at 8:49 AM on May 21, 2026: contributor

    ACK 98f706c698ae77fc91cd46ba2c3750b125d95016

    Ran the test locally.

  8. fanquake merged this on May 21, 2026
  9. fanquake closed this on May 21, 2026

  10. stringintech commented at 9:43 AM on May 21, 2026: contributor

    Post-merge ACK.

    <details> <summary>Tested with diff</summary>

    **diff --git a/src/test/kernel/test_kernel.cpp b/src/test/kernel/test_kernel.cpp
    index e6d215dc57..c790d809ec 100644
    --- a/src/test/kernel/test_kernel.cpp
    +++ b/src/test/kernel/test_kernel.cpp
    @@ -1171,6 +1171,14 @@ BOOST_AUTO_TEST_CASE(btck_chainman_regtest_tests)
     
         for (const auto block_tree_entry : chain.Entries()) {
             auto block{chainman->ReadBlock(block_tree_entry)};
    +
    +        if (block_tree_entry.GetHeight() > 0) {
    +            std::cout << "Asserting coinbase bip54 compatibility at height " << block_tree_entry.GetHeight() << std::endl;
    +            const TransactionView coinbase_tx{block->Transactions()[0]};
    +            BOOST_CHECK_EQUAL(coinbase_tx.GetLocktime(), block_tree_entry.GetHeight() - 1);
    +            BOOST_CHECK_NE(coinbase_tx.GetInput(0).GetSequence(), 0xffffffff);
    +        }
    +
             for (const auto transaction : block->Transactions()) {
                 std::vector<TransactionInput> inputs;
                 std::vector<TransactionOutput> spent_outputs;
    **
    

    </details>

    Ideally we'd have a generation tool that does this for all kernel bindings with chains of interesting transactions.

    I'd like to work on that. :)

  11. darosior deleted the branch on May 21, 2026

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-21 21:50 UTC

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