qa: use NORMAL_GBT_REQUEST_PARAMS consistently in functional tests #35333

pull darosior wants to merge 1 commits into bitcoin:master from darosior:2605_qa_GBT_constant changing 5 files +17 −13
  1. darosior commented at 2:22 PM on May 20, 2026: member

    Functional tests have a constant that defines normal parameters to getblocktemplate but some tests were still hardcoding its value. This PR updates those tests to use the constant instead, so that if normal parameters to getblocktemplate need to be changed, it is only necessary to change them in a single place.

    This is preparatory work for the implementation of BIP 54, which introduces a new GBT "forced" rule.

  2. DrahtBot added the label Tests on May 20, 2026
  3. DrahtBot commented at 2:22 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/35333.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake, sedited
    Stale ACK maflcko

    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.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35049 (test: remove circular dependency between authproxy and util by rkrux)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. maflcko commented at 2:39 PM on May 20, 2026: member

    review ACK 1b08d2cf0a6967422abae9ea26f2293153a7214c 🐼

    <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 1b08d2cf0a6967422abae9ea26f2293153a7214c 🐼
    i1mQ91bdri68X2nUbnBaC1O4oTaPV6NGA8Y+DcYwu0OcYsvYBVuHj6D+iA+YmfwKSqzkbdhjcnKpI9K6ey/4CQ==
    

    </details>

  5. fanquake commented at 3:43 PM on May 20, 2026: member

    Missed some instances in mining_basic.py and mining_template_verification.py?

  6. sedited commented at 3:57 PM on May 20, 2026: contributor

    Missed some instances in mining_basic.py and mining_template_verification.py?

    I think both of them set proposal mode?

  7. darosior commented at 4:09 PM on May 20, 2026: member

    Indeed, but i should still update it to not hardcode the rules list like i did in mining_getblocktemplate_longpoll.py.

  8. darosior force-pushed on May 20, 2026
  9. darosior commented at 4:14 PM on May 20, 2026: member

    Updated to add the missing instances. Thanks.

  10. maflcko commented at 6:14 AM on May 21, 2026: member

    lgtm ACK 50f1152e9f4470a55f5192adee41fcffb3dda835

  11. qa: use NORMAL_GBT_REQUEST_PARAMS consistently
    Some functional tests were still hardcoding parameters. Using the
    constant allows to change the rules in a single place if necessary.
    ca5483a662
  12. in test/functional/mining_template_verification.py:87 in 50f1152e9f outdated
      81 | @@ -81,7 +82,7 @@ def truncated_final_transaction_test(self, node, block):
      82 |              template_request={
      83 |                  "data": block.serialize()[:-1].hex(),
      84 |                  "mode": "proposal",
      85 | -                "rules": ["segwit"],
      86 | +                **NORMAL_GBT_REQUEST_PARAMS,
      87 |              }
      88 |          )
    


    sedited commented at 8:12 AM on May 21, 2026:

    Is this still missing the one on line 118?


    darosior commented at 3:26 PM on May 21, 2026:

    Ugh. I grepped "\'rules\'" instead of "'rules'". Fixed, thanks.

  13. darosior force-pushed on May 21, 2026
  14. fanquake commented at 3:52 PM on May 21, 2026: member

    ACK ca5483a6628065aa6ae828cafea4ba81b30d78e7

  15. DrahtBot requested review from maflcko on May 21, 2026
  16. sedited approved
  17. sedited commented at 4:01 PM on May 21, 2026: contributor

    ACK ca5483a6628065aa6ae828cafea4ba81b30d78e7

  18. sedited merged this on May 21, 2026
  19. sedited closed this on May 21, 2026

  20. darosior deleted the branch on May 21, 2026


maflcko

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-22 19:51 UTC

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