Skip to content

factor out compute_plot_group_id_v2() and expose it to python - #1479

Merged
arvidn merged 1 commit into
mainfrom
compute_plot_group_id_v2
Jul 13, 2026
Merged

factor out compute_plot_group_id_v2() and expose it to python#1479
arvidn merged 1 commit into
mainfrom
compute_plot_group_id_v2

Conversation

@arvidn

@arvidn arvidn commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Note

Low Risk
Refactor-only extraction of existing v2 hashing with dedicated tests; compute_plot_id_v2 behavior is preserved via delegation.

Overview
v2 plot group ID is now a first-class helper: compute_plot_group_id_v2 implements sha256(strength + plot_pk + (pool_pk | contract_ph)), and compute_plot_id_v2 calls it before hashing plot_index and meta_group (same formula as before, just split).

Python bindings add compute_plot_group_id_v2 in the wheel (api.rs, module registration) with matching stubs in generate_type_stubs.py / chia_rs.pyi. New Rust regression tests cover pool-pk and contract-puzzle-hash variants for the group ID.

Reviewed by Cursor Bugbot for commit 184b215. Bugbot is set up for automated code reviews on this repo. Configure here.

@coveralls-official

Copy link
Copy Markdown

Coverage Report for CI Build 28596604212

Coverage decreased (-0.04%) to 81.484%

Details

  • Coverage decreased (-0.04%) from the base build.
  • Patch coverage: 13 uncovered changes across 2 files (14 of 27 lines covered, 51.85%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
wheel/src/api.rs 13 1 7.69%
crates/chia-protocol/src/proof_of_space.rs 14 13 92.86%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 18935
Covered Lines: 15429
Line Coverage: 81.48%
Coverage Strength: 11921444.41 hits per line

💛 - Coveralls

@arvidn
arvidn requested a review from almogdepaz July 6, 2026 14:39
@arvidn
arvidn merged commit 1ad07eb into main Jul 13, 2026
84 checks passed
@arvidn
arvidn deleted the compute_plot_group_id_v2 branch July 13, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants