feat: add Goldilocks backend + two-field differential fixtures#460
Open
BornPsych wants to merge 4 commits into
Open
feat: add Goldilocks backend + two-field differential fixtures#460BornPsych wants to merge 4 commits into
BornPsych wants to merge 4 commits into
Conversation
|
@BornPsych is attempting to deploy a commit to the World Foundation Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Adds
provekit-backend-goldilocks, a second backend that instantiates the field-generic spine over the ~192-bit Goldilocks cubic extensionField64_3, and restructuresprovekit-fixturesso 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 extensionField64_3is 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 implementingProofField/FieldHashplus aregister()call, nothing more. (Pre-EF/BF the embedding isIdentity<Field64_3>, so base == ext for now; the base≠ext split lands once zkWHIR supports it.)What changed
provekit-backend-goldilocks(new):GoldilocksFieldwithEmbedding = Identity<Field64_3>; aFieldHashimpl with aSha256default hash, 24-byte little-endian canonical bytes, digest-spread hashing, and a transcript sponge;register()installs theField64_3NTT engine in whir's global registry. Mirrors theprovekit-backend-bn254layout.provekit-fixtures: the bn254-onlyroundtrip.rs/soundness.rsare replaced bytests/shared/mod.rs— field-generic<P: FieldHash>test bodies plusroundtrip_suite!/soundness_suite!macros — and four thin per-field instantiation files (bn254_*,goldilocks_*). The same assertions now run over both fields.Verification
cargo build --workspacegreen.provekit-fixtures: bn254 6 roundtrip + 4 soundness, goldilocks 6 roundtrip + 4 soundness — all pass; 2 benches ignored.provekit-backend-goldilocksunit 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.