Abundance-backed proof of space (CPU) - #3878
Closed
vedhavyas wants to merge 5 commits into
Closed
Conversation
Latest nightly that still supports generic_const_exprs.
Pull abundance's ab-proof-of-space as a pinned, alloc/parallel-gated git dependency, so the no_std runtime never links it. chia_v2::ChiaV2Table wraps its chiapos Tables, looking proofs up under Subspace's s-bucket convention (find_proof with challenge.to_le_bytes()) so they verify under the existing ChiaTable verifier; verification delegates to ChiaTable. Bumps chacha20 0.10.0 -> 0.10.1 (API-only) to satisfy abundance.
PlotMetadataHeader gains a cutover field (Option<HistorySize>) and a typed PlotMetadataVersion (V0/V1); a version-aware Decode reads old V0 headers as cutover = None and rejects unknown versions (the old-binary lockout). Opening a V0 plot records the cutover as the highest history size among existing sectors and rewrites the header as V1. New-sector plotting then waits until history advances past the cutover, so no sector is stamped at history_size <= cutover and later misread with the old proof-of-space. Sectors at or below the cutover use the old proof-of-space, newer ones the new; nothing dispatches on it yet.
Contributor
Author
|
@BugBot run |
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 15d87a9. Configure here.
PosTable (subspace-proof-of-space, alloc-gated) dispatches between the old ChiaTable and the new ChiaV2Table; both proofs verify under ChiaTable, so the choice is a farmer-side read/prove concern. The Table trait gains generator_for(is_post_cutover) and SolutionCandidates a history_size() accessor; the farmer picks per sector by comparing history_size against the farm's cutover at reading, proving, and auditing. New sectors always use the new implementation.
Cross-verify abundance-backed proofs against the existing ChiaTable verifier, a plot->read round-trip, and the per-sector V1/V2 dispatch selection. Point the benches at the new table.
vedhavyas
force-pushed
the
feat/wgpu-plotter
branch
from
July 2, 2026 08:50
15d87a9 to
339b2df
Compare
This was referenced Jul 3, 2026
Contributor
Author
|
Closing in favor of #3883, which takes the wgpu GPU approach instead of the CPU-only path here. |
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 pulls abundance's proof-of-space into the farmer and makes it the default for anything newly plotted. It's just the CPU side of the wgpu plotter work - the GPU backend is on its own branch and I'll land the two together, so this one's a draft and shouldn't merge alone. Splitting it out lets the CPU part get reviewed separately.
The wrapper uses the seed and looks proofs up the way we already do (our s-bucket convention), so they verify under the existing
ChiaTableverifier with a test to verify the same.Old and new plots live side by side using a cutover point I store in the plot metadata header: anything at or below it still reads and proves with the old proof-of-space, anything newer uses the new one. New plotting waits until history moves past the cutover so no sector straddles it. A fresh farm has no cutover, so it's all new from the start.
Probably easiest to review commit by commit:
add abundance-backed proof of space- the git dep, thechia_v2wrapper, and the Cargo wiring.add farm cutover point with in-place v0 upgrade- the header version enum, the cutover field, the version-aware decode and in-place upgrade, and the plotting pause.dispatch proof-of-space per sector by history size- thePosTabledispatch enum wired into read/prove/audit.add tests and benches for the abundance proof of space- cross-verify, a plot/read round-trip, the dispatch-selection tests, and the benches pointed at the new table. Kept last so you can skip it on a first pass.Code contributor checklist: