Support PoS2 plot groups - #21396
Draft
haorldbchi wants to merge 2 commits into
Draft
Support PoS2 plot groups#21396haorldbchi wants to merge 2 commits into
haorldbchi wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
testnetbit 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.
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
.plot2files to PoS2 plot groups (.gplot), where one file can contain multiple plots keyed byplot_indexand a shared plot group ID.Discovery and provers scan
*.gplotand treat V2get_id()as the group ID, withplot_id_for_index(),get_param_for_index(), andV2Qualitycarrying plot index so challenge lookup, iteration checks, and solving use the correct member plot.Harvester → farmer protocol renames
PartialProofsData.plot_idtoplot_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 memberplot_idviacompute_plot_id_v2for the solver and rebuilds the challenge withcalculate_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 intovalidate_proof_v2.solve_proofand plot creation drop the obsoletetestnetflag; V2 creation usescreate_v2_single_plot_groupandcompute_plot_group_id_v2.Tests, internal docs, and
.gitignoreare 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.