Skip to content

feat: add Goldilocks backend + two-field differential fixtures#460

Open
BornPsych wants to merge 4 commits into
worldfnd:sl/goldilocks-field-abstractionfrom
BornPsych:ys/goldilocks-backend-and-fixtures
Open

feat: add Goldilocks backend + two-field differential fixtures#460
BornPsych wants to merge 4 commits into
worldfnd:sl/goldilocks-field-abstractionfrom
BornPsych:ys/goldilocks-backend-and-fixtures

Conversation

@BornPsych

Copy link
Copy Markdown
Collaborator

Summary

Adds provekit-backend-goldilocks, a second backend that instantiates the field-generic spine over the ~192-bit Goldilocks cubic extension Field64_3, and restructures provekit-fixtures so the prove→verify and soundness suites run over both bn254 and goldilocks from shared, field-generic test bodies. bn254 is unchanged.

This is the backend half of the field-generic work: #458/#459 made the spine generic over <P: ProofField> and added the scheme builder + fixtures; this PR shows a second, structurally different field plugs in with no spine edits.

Why

The spine was made field-generic precisely so a non-bn254 field could be added as a backend crate plus an instantiation, with no changes to common / prover / verifier. Goldilocks is the validation field: a 64-bit prime whose cubic extension Field64_3 is large enough (~192 bits) to draw Fiat-Shamir challenges from. This PR is the proof that the seam holds — the backend is a marker type implementing ProofField / FieldHash plus a register() call, nothing more. (Pre-EF/BF the embedding is Identity<Field64_3>, so base == ext for now; the base≠ext split lands once zkWHIR supports it.)

What changed

  • provekit-backend-goldilocks (new): GoldilocksField with Embedding = Identity<Field64_3>; a FieldHash impl with a Sha256 default hash, 24-byte little-endian canonical bytes, digest-spread hashing, and a transcript sponge; register() installs the Field64_3 NTT engine in whir's global registry. Mirrors the provekit-backend-bn254 layout.
  • provekit-fixtures: the bn254-only roundtrip.rs / soundness.rs are replaced by tests/shared/mod.rs — field-generic <P: FieldHash> test bodies plus roundtrip_suite! / soundness_suite! macros — and four thin per-field instantiation files (bn254_*, goldilocks_*). The same assertions now run over both fields.
  • Workspace: registers the new crate as a member + workspace dep, and adds it as a fixtures dev-dep.

Verification

  • cargo build --workspace green.
  • provekit-fixtures: bn254 6 roundtrip + 4 soundness, goldilocks 6 roundtrip + 4 soundness — all pass; 2 benches ignored.
  • provekit-backend-goldilocks unit tests (byte roundtrip) pass.

Stacks on #459 (open); until that merges, the commit list above includes #459's commits — the Goldilocks-specific changes are the final 2 commits.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@BornPsych is attempting to deploy a commit to the World Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@BornPsych BornPsych changed the base branch from main to sl/goldilocks-field-abstraction June 24, 2026 04:42
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