Skip to content

Support PoS2 plot groups - #21396

Draft
haorldbchi wants to merge 2 commits into
mainfrom
hb.pos2-plot-groups
Draft

haorldbchi wants to merge 2 commits into
mainfrom
hb.pos2-plot-groups

Conversation

@haorldbchi

@haorldbchi haorldbchi commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

This is a sister PR to Chia-Network/chia_rs#1517 and depends on it which in turn depends on Chia-Network/pos2-chip#118 to work.

Purpose:

Support PoS2 plot groups instead of raw v2 plots which will not be supported, although single-plot groups can be created.

This also removes the testnet bit from usage as this was obsoleted, allowing v2 plots to work on both testnet and mainnet.

This PR intends to touch as little as possible from the existing v2 plot support work, and simply apply the minimum required changes in order to support the plot group interface.

  • Important: taproot implementation has been slightly modified for v2 plots and must be updated here.

Note

High Risk
Changes core proof-of-space validation, harvester/farmer protocol fields, and V2 challenge/plot-ID math on the farming path; requires matching chia_rs behavior.

Overview
This PR retargets V2 farming from standalone .plot2 files to PoS2 plot groups (.gplot), where one file can contain multiple plots keyed by plot_index and a shared plot group ID.

Discovery and provers scan *.gplot and treat V2 get_id() as the group ID, with plot_id_for_index(), get_param_for_index(), and V2Quality carrying plot index so challenge lookup, iteration checks, and solving use the correct member plot.

Harvester → farmer protocol renames PartialProofsData.plot_id to plot_group_id, buckets partial proofs per plot index (multiple messages per file), and builds the PoS challenge from the group ID. The farmer derives the member plot_id via compute_plot_id_v2 for the solver and rebuilds the challenge with calculate_pos_challenge(plot_group_id, …) when assembling full proofs.

Consensus validation (verify_and_get_quality_string) uses the group ID for V2 challenge hashing and passes plot index / meta group into validate_proof_v2. solve_proof and plot creation drop the obsolete testnet flag; V2 creation uses create_v2_single_plot_group and compute_plot_group_id_v2.

Tests, internal docs, and .gitignore are updated for the new naming and behavior.

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

@haorldbchi
haorldbchi deployed to windows-code-signing September 11, 2026 20:55 — with GitHub Actions Active
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.

1 participant