-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[CHIA-3649][CHIA-3657][CHIA-3732][CHIA-3666] proof-of-space v2 support #20296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arvidn
wants to merge
15
commits into
main
Choose a base branch
from
pos2-simulations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
1e6d6bc to
686e568
Compare
5513836 to
3410782
Compare
2dd5d58 to
e7ac280
Compare
38fbba8 to
efbdb8b
Compare
efbdb8b to
f6efe94
Compare
…changed. There is no quality proof scan filter
4b8663b to
48f48e5
Compare
48f48e5 to
f400a04
Compare
…the hard fork, with only the farm reward coin
… need more time to run all the tests, on CI.
f400a04 to
ce9248c
Compare
Contributor
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changed
Required label for PR that categorizes merge commit message as "Changed" for changelog
coverage-diff
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.
Purpose:
This PR adds support for v2 plots to chia-blockchain, activating at the hard fork height (which is still set to a place-holder).
These changes are best reviewed one commit at a time.
A good starting point is for getting a sense of these changes is
chia/plotting/prover.py, which defines the interface to the "Prover". This reads plot files and finds proofs of space, used by the farmer.The main updates can be summarized as:
chiapos.BlockTools(the core of the simulator)ConsensusModeenum values to the test fixture. This will make many of our tests run two more times covering the v1 phase-out and v2-only chains.todo_v2_plotskeyword, to make them easy to find and identify.todo_v2_plotscomment.Current Behavior:
New Behavior:
Testing
Test chains
Since the test fixtures now have two more parameters, all of our test chains are generated in two more versions.
The test chains are generated by test fixtures, so automatically by running a test that references one of these fixtures. The test plots are cached in
~/.chia/blocksto be re-used across test runs. The longer chains can take quite a while to generate.Test plots
We also have new v2 test plots. v2 test plots are k-18 and about 700kB each. In order to have a somewhat even netspace compared to the existing v1 test plots, we have 150 v2 plots (vs. 20 v1 plots). These test plots are generated by running the tests that set up the
BlockToolssimulation. They are cached in~/.chia/test-plotsto be re-used across test runs.To run tests locally, you need the new test plots and chains. You can either generate them or download them from the
test-cacherepository.Generating them takes at least 1 hour on a fast machine. It can be quite CPU and memory intensive, so you may limit the number of parallel jobs to a few fewer than cores on the machine (using
-n).You can download them from the
test-cacherepository. Here: Chia-Network/test-cache#23Backwards compatibility
Some of our tests depend on exactly the test plots we use, and the number of them. So when you update your
~/.chia/plotsto include the new plots, you may need to clear and reset that directory if you want to move back tomain(until this PR lands).BlockToolswill check that the number of test plots it picked up is exactly the number we expect. This adds some friction to switching back and forth between this PR andmain, for testing.Note
Introduce PoS v2 plots end‑to‑end (prover/plotting→harvester/farmer/solver), add new consensus modes including HF3 and post phase‑out, and update simulator/tests, constants, CI, and deps accordingly.
V2ProverAPI (get_qualities_for_challenge()without filter),V2Qualitycarries partial proof, and updatedPartialProoffields.create_v2_plots()and generate v2 plots inBlockTools; include v2 in simulator startup.PLAIN,HARD_FORK_2_0,HARD_FORK_3_0,HARD_FORK_3_0_AFTER_PHASE_OUT) with per‑mode constants and difficulty tweaks; adjust filter bits and removeQUALITY_PROOF_SCAN_FILTERusage.PartialProofsData; Farmer requests solves; Solver produces full proofs; logs/messages usefragments.limit_consensus_modesmarks, adjust expectations (rewards, generator refs, pool keys), tweak parameters/timeouts, and regenerate per‑mode test chains/filenames.BLOCKS_AND_PLOTS_VERSIONto0.45.1; upgradechia_rsto0.36.0; increase various test job timeouts.Written by Cursor Bugbot for commit f06ebdf. This will update automatically on new commits. Configure here.