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

Chia-Network / chia-blockchain / 35444987899
90%

Build:
DEFAULT BRANCH: main
Ran 19 Sep 2026 03:11PM UTC
Jobs 1
Files 940
Run time 2min
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

18 Sep 2026 08:04PM UTC coverage: 90.27% (-0.05%) from 90.322%
35444987899

push

github

web-flow
Retype BlockGenerator.program from SerializedProgram to bytes (#21405)

* Retype BlockGenerator.program from SerializedProgram to raw bytes

BlockGenerator.program (and NewBlockGenerator) was typed as
SerializedProgram, which chia_rs deliberately refuses to parse if the
bytes are ever a future non-classic-CLVM encoding (e.g. serde_2026).
Every producer eagerly called SerializedProgram.from_bytes() on the
generator bytes, and every consumer that didn't need a Program just
called bytes(...) on it again.

Retype .program as plain bytes, and only wrap it back into a
SerializedProgram at the handful of call sites that genuinely need a
Program object because they run it or hand it to a chia_rs function
that only accepts one: get_spends_for_trusted_block(),
get_spends_for_trusted_block_with_conditions(),
get_puzzle_and_solution_for_coin(), compute_block_cost(), and the v0
UnfinishedBlock.transactions_generator field.

This also fixes a latent bug in get_block_generator(): it used to call
get_transactions_generator_program(), which ran
SerializedProgram.from_bytes() on the generator bytes and would raise
ValueError for a valid post-HF2 (serde_2026) generator, silently
rejecting the block via the try/except in
multiprocess_validation.py. Deleted get_transactions_generator_program
since nothing needs it anymore.

No behavior change for v0 blocks: verified via targeted test runs.

🤖 Generated with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add explicit GeneratorFormat to BlockGenerator

Addresses Arvid's review of #21405. `program: bytes` alone throws
away whether the bytes are classic CLVM or serde_2026. Richard's call
was a chia-blockchain-local tag, not widening SerializedProgram (that
was already rejected for chia_rs, see the generator-format-type-spike
report).

Adds `GeneratorFormat` (CLASSIC=0, SERDE_2026=1, mirroring the
existing version=0/1 convention) and a `format: GeneratorFormat`
field on `BlockGenerator`/`NewBlockGenerator`, alongsi... (continued)

19936 of 24892 branches covered (80.09%)

Branch coverage included in aggregate %.

43 of 45 new or added lines in 17 files covered. (95.56%)

67 existing lines in 10 files now uncovered.

117069 of 126881 relevant lines covered (92.27%)

1.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
90.23
0.0% chia/_tests/core/test_cost_calculation.py
1
72.63
0.03% chia/full_node/full_node_rpc_api.py

Coverage Regressions

Lines Coverage ∆ File
27
76.11
-14.16% chia/_tests/core/util/test_lockfile.py
11
70.21
-1.25% chia/timelord/timelord.py
7
77.16
-0.89% chia/daemon/server.py
6
84.26
-0.4% chia/full_node/full_node.py
5
75.76
-4.55% chia/introducer/introducer.py
4
75.34
-0.75% chia/server/node_discovery.py
3
80.15
-0.59% chia/server/server.py
2
86.15
-0.21% chia/data_layer/data_layer.py
1
93.84
-0.59% chia/_tests/simulation/test_simulation.py
1
85.2
0.11% chia/wallet/wallet_node.py
Jobs
ID Job ID Ran Files Coverage
1 35444987899.1 19 Sep 2026 03:10PM UTC 1880
90.27
GitHub Action Run
Source Files on build 35444987899
  • Tree
  • List 940
  • Changed 35
  • Source Changed 20
  • Coverage Changed 29
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35444987899
  • b9055a15 on github
  • Prev Build on main (#35348737559)
  • Next Build on main (#35512708893)
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