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

Chia-Network / chia-blockchain / 35389407672
90%

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 10:30PM 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.253% (-0.07%) from 90.322%
35389407672

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)

19916 of 24892 branches covered (80.01%)

Branch coverage included in aggregate %.

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

69 existing lines in 29 files now uncovered.

117064 of 126881 relevant lines covered (92.26%)

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
7
88.37
-6.4% chia/server/chia_policy.py
6
84.3
-0.36% chia/full_node/full_node.py
6
83.72
-12.79% chia/_tests/core/server/test_event_loop.py
5
75.76
-4.55% chia/introducer/introducer.py
5
74.89
-1.2% chia/server/node_discovery.py
5
87.17
-3.1% chia/_tests/core/util/test_lockfile.py
3
80.15
-0.59% chia/server/server.py
3
94.43
-1.17% chia/simulator/setup_services.py
2
86.15
-0.21% chia/data_layer/data_layer.py
2
93.85
-0.3% chia/data_layer/data_store.py
2
86.22
-0.17% chia/full_node/full_node_api.py
2
94.46
-1.54% chia/util/db_wrapper.py
2
96.73
-1.31% chia/util/file_keyring.py
2
90.0
-3.33% chia/util/files.py
2
76.0
-16.0% chia/util/json_util.py
2
84.92
-0.17% chia/wallet/wallet_node.py
1
86.8
-0.59% 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
90.03
-0.13% chia/server/ws_connection.py
1
99.37
-0.05% chia/_tests/core/mempool/test_mempool_manager.py
1
94.12
-2.94% chia/_tests/core/util/test_file_keyring_synchronization.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.43
-3.57% chia/_tests/util/test_replace_str_to_bytes.py
1
92.11
-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 35389407672.1 18 Sep 2026 10:30PM UTC 1880
90.25
GitHub Action Run
Source Files on build 35389407672
  • Tree
  • List 940
  • Changed 51
  • Source Changed 20
  • Coverage Changed 45
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35389407672
  • b9055a15 on github
  • Prev Build on main (#35348737559)
  • Next Build on main (#35444987899)
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