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

Chia-Network / chia-blockchain / 35512708893
90%

Build:
DEFAULT BRANCH: main
Ran 20 Sep 2026 02:57PM 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.297% (-0.03%) from 90.322%
35512708893

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)

19950 of 24892 branches covered (80.15%)

Branch coverage included in aggregate %.

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

44 existing lines in 6 files now uncovered.

117097 of 126881 relevant lines covered (92.29%)

1.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
90.23
0.0% chia/_tests/core/test_cost_calculation.py
1
72.87
0.27% 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
7
77.16
-0.89% chia/daemon/server.py
5
75.76
-4.55% chia/introducer/introducer.py
2
86.15
-0.21% chia/data_layer/data_layer.py
2
84.55
-0.11% chia/full_node/full_node.py
1
84.29
-0.2% chia/seeder/dns_server.py
Jobs
ID Job ID Ran Files Coverage
1 35512708893.1 20 Sep 2026 02:57PM UTC 1880
90.3
GitHub Action Run
Source Files on build 35512708893
  • Tree
  • List 940
  • Changed 36
  • Source Changed 20
  • Coverage Changed 30
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35512708893
  • b9055a15 on github
  • Prev Build on main (#35348737559)
  • Next Build on main (#35614979760)
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