• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Chia-Network / chia-blockchain / 39244025475
91%

Build:
DEFAULT BRANCH: main
Ran 19 Oct 2026 01:09PM UTC
Jobs 1
Files 940
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Oct 2026 11:21AM UTC coverage: 90.262% (-0.09%) from 90.349%
39244025475

push

github

web-flow
cap the batch size when creating block generators (#21418)

<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->

### Purpose:

feed the block builder/serializer smaller batches of work. In case it's
slow, we'll get stuck for a shorter time before checking the timeout.

### Current Behavior:

We maximize the batch

### New Behavior:

We submit the batch as soon as it exceeds 100 spends

<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->

### Testing Notes:

<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes farming/block-assembly batching in a hot path; behavior under
timeout or very large items may differ, but consensus limits and
inclusion rules are unchanged.
> 
> **Overview**
> **Block generator creation** now flushes pending mempool transactions
to `BlockBuilder` in smaller chunks instead of growing one batch until
block cost is hit.
> 
> `create_block_generator2()` introduces **`MAX_SPENDS_PER_BATCH`
(100)** and commits the in-flight batch when adding the next item would
push **`batch_spends + len(unique_coin_spends)`** over that limit (in
addition to the existing max-block-cost flush). The goal is to bound
work per `add_spend_bundles()` call so the generation **timeout** can be
checked between batches. A single mempool item with more than 100 spends
is still submitted as **one** batch—it is not split.
> 
> A new unit test **`test_create_block_generator2_spend_batch_cap`**
monkeypatches `BlockBuilder.add_spend_bundles` and asserts batch sizes
`[50, MAX_SPENDS_PER_BATCH + 5]` for 50 single-spend items p... (continued)

20016 of 25014 branches covered (80.02%)

Branch coverage included in aggregate %.

25 of 25 new or added lines in 2 files covered. (100.0%)

93 existing lines in 27 files now uncovered.

117910 of 127793 relevant lines covered (92.27%)

1.85 hits per line

Coverage Regressions

Lines Coverage ∆ File
22
76.11
-11.95% chia/_tests/core/util/test_lockfile.py
11
70.29
-1.25% chia/timelord/timelord.py
10
83.91
-0.5% chia/full_node/full_node.py
7
77.16
-0.89% chia/daemon/server.py
7
88.37
-6.4% chia/server/chia_policy.py
6
83.72
-12.79% chia/_tests/core/server/test_event_loop.py
4
94.01
-2.18% chia/util/db_wrapper.py
3
94.46
-1.17% chia/simulator/setup_services.py
2
93.85
-0.3% chia/data_layer/data_store.py
2
97.06
-0.65% chia/util/file_keyring.py
2
90.0
-3.33% chia/util/files.py
2
76.0
-16.0% chia/util/json_util.py
1
86.8
-0.29% chia/cmds/plotnft_funcs.py
1
95.5
-0.5% chia/full_node/block_store.py
1
54.43
-0.61% chia/plotters/bladebit.py
1
87.95
-0.51% chia/rpc/rpc_server.py
1
84.29
-0.2% chia/seeder/dns_server.py
1
75.34
-0.3% chia/server/node_discovery.py
1
81.76
-0.15% chia/server/server.py
1
90.03
-0.13% chia/server/ws_connection.py
1
99.37
-0.05% chia/_tests/core/mempool/test_mempool_manager.py
1
99.34
-0.33% chia/_tests/rpc/test_rpc_server.py
1
93.84
-0.59% chia/_tests/simulation/test_simulation.py
1
96.88
-3.13% chia/_tests/util/test_replace_str_to_bytes.py
1
84.92
-0.17% chia/wallet/wallet_node.py
1
92.18
-0.05% chia/wallet/wallet_state_manager.py
1
96.61
-3.39% chia/wallet/wallet_user_store.py
Jobs
ID Job ID Ran Files Coverage
1 39244025475.1 19 Oct 2026 01:09PM UTC 1880
90.26
GitHub Action Run
Source Files on build 39244025475
  • Tree
  • List 940
  • Changed 30
  • Source Changed 2
  • Coverage Changed 30
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #39244025475
  • f7162427 on github
  • Prev Build on main (#39035397859)
  • Next Build on main (#39258501453)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc