Skip to content

Abundance-backed proof of space and wgpu GPU plotter - #3

Draft
vedhavyas wants to merge 8 commits into
mainfrom
feat/wgpu-plotter-gpu
Draft

Abundance-backed proof of space and wgpu GPU plotter#3
vedhavyas wants to merge 8 commits into
mainfrom
feat/wgpu-plotter-gpu

Conversation

@vedhavyas

Copy link
Copy Markdown
Owner

The CPU abundance-backed proof of space work (the five commits also in autonomys#3878) plus the wgpu GPU plotter on top.

The CPU commits pull abundance's proof of space in as a git dependency wrapped as ChiaV2Table, add a farm-level cutover point so old sectors keep reading on the old path while new ones plot on abundance, and dispatch per sector by history size.

The last commit is the GPU side: ChiaV2Table moves to abundance's dense proof path, and a new subspace-proof-of-space-wgpu crate drives abundance's wgpu shaders (Vulkan/Metal) and feeds the proofs into our interleaved KZG encode, mirroring the CUDA backend. It is wired into the farm and cluster plotters behind a wgpu feature that, unlike cuda/rocm, builds on macOS too.

Abundance deps are patched to my fork (vedhavyas/abundance) for now so this builds end to end; that gets re-pointed upstream once the abundance side lands. GPU/CPU byte-identity still needs abundance's find_proofs Metal fix before it can be validated end to end.

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.
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.
Reworks ChiaV2Table onto abundance's dense proof path and adds a wgpu records encoder (Vulkan/Metal) mirroring the CUDA backend, wired into the farm and cluster plotters behind a wgpu cargo feature. Abundance dependencies are patched to my fork for review.
@vedhavyas
vedhavyas changed the base branch from main to feat/wgpu-plotter July 3, 2026 08:14
@vedhavyas
vedhavyas changed the base branch from feat/wgpu-plotter to main July 3, 2026 08:14
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