Skip to content

Commit 8ebf968

Browse files
martyallclaude
andauthored
Dummy (#114)
* Compute stepDummyUnfinalizedProof via expand_deferred Replace ad-hoc tick-derived placeholder values with a full PureScript implementation of OCaml's Wrap_deferred_values.expand_deferred applied to proof.ml:dummy. All deferred values (xi, perm, zetaToSrsLength, zetaToDomainSize, combinedInnerProduct, b, ftEval0) are now computed from first principles using existing building blocks: - frSpongeChallengesPure for xi/evalscale (sponge transcript) - permScalar for perm (permutation argument) - ftEval0 from permContribution + gateConstraints - CIP via Horner fold with sg evals from bPoly - computeB for challenge polynomial evaluation Key discoveries during implementation: - Backend.Tick = Vesta_based_plonk (not Pallas), so srs_length_log2 = StepIPARounds = 16, not WrapIPARounds = 15 - OCaml Vector.map (list-based ::) evaluates side effects right-to-left, requiring reversed tick generation for prev_evals - zkPolynomial uses permutationVanishingPolynomial, not vanishesOnZkAndPreviousRows (which is F.one without lookups) Also: make stepDummyUnfinalizedProof polymorphic over shifted type (Type1/Type2) so it works for both constant-level and circuit-level usage. Replace all genDummyUnfinalizedProof random generators with the production library value. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Replace random dummy generators with production library values Move dummyStepAdvice from TestContext (random Gen) to Pickles.Dummy (deterministic, matching OCaml's proof.ml:dummy): - Messages: Pallas generator for all commitment points - Opening proof: generator for delta/sg/lr, Ro.tock() for z1/z2 - FOP proof state: stepDummyUnfinalizedProof (expand_deferred) Remove genDummyUnfinalizedProof and dummyStepAdvice random generators from TestContext. All test files now use library values exclusively. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Clean up unused imports from dummy generator removal Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * move some commitments to params * Address review feedback: bounds guard, strict fixtures, clean comments - P0: Add SRS bounds check in pallas/vesta_srs_b_poly_commitment to return an error instead of panicking on out-of-bounds slice - P1: assertField now throws on missing fixture keys instead of silently passing, preventing typos from hiding regressions - P2: Replace contradictory self-correcting tock counter comments with a single clean count matching the actual code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * add exhaustiveness checl * cargo fmt * Capture tock evals, compute wrap perm, add fixture exhaustiveness check - Replace discarded Phase 3 tock calls with wrapDummyEvals :: AllEvals WrapField in roComputeResult, using the same right-to-left eval order - Compute wrapDummyUnfinalizedProof.perm via permScalar on wrapDummyEvals instead of hardcoding from OCaml fixture — validates tock eval ordering - Share computed perm with computeDummySgValues (remove last hardcoded string) - Add "every fixture output key is checked" exhaustiveness test - assertField tracks checked keys via Ref; input-only keys (prev_evals.*, step_input.*) are exempt since they're verified indirectly through outputs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Use Shifted typeclass for Type2, compute wrap perm, add exhaustiveness check - Capture Phase 3 tock evals as wrapDummyEvals in roComputeResult (same right-to-left eval order as Step prev_evals) - Compute wrapDummyUnfinalizedProof.perm via permScalar on wrapDummyEvals instead of hardcoding — validates tock eval ordering matches OCaml - Replace manual Type2 shifting (type2Shift, shifted helper) with the existing Shifted (F f) (Type2 (F f)) typeclass instance - Add fixture exhaustiveness test ensuring every output key is asserted - Remove tockEvalPair, type2Shift, fromStr helpers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8ba27e4 commit 8ebf968

File tree

22 files changed

+1364
-468
lines changed

22 files changed

+1364
-468
lines changed

packages/crypto-provider/src/kimchi/circuit.rs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,3 +2677,65 @@ pub fn vesta_challenge_poly_commitment(
26772677
generic::challenge_poly_commitment::<PallasGroup>(&**verifier_index, &chals)
26782678
.map(|coords| coords.into_iter().map(External::new).collect())
26792679
}
2680+
2681+
/// Compute challenge polynomial commitment from Pallas SRS directly.
2682+
/// Pallas curve: scalar field = Fq. Challenges are Fq, result point has Fp coords.
2683+
/// OCaml: `SRS.Fq.b_poly_commitment srs challenges` (Dummy.Ipa.Wrap.compute_sg)
2684+
#[napi]
2685+
pub fn pallas_srs_b_poly_commitment(
2686+
srs: &PallasCRSExternal,
2687+
challenges: Vec<&PallasFieldExternal>,
2688+
) -> Result<Vec<VestaFieldExternal>> {
2689+
let chals: Vec<PallasScalarField> = challenges.iter().map(|f| ***f).collect();
2690+
let coeffs = poly_commitment::commitment::b_poly_coefficients(&chals);
2691+
if coeffs.len() > srs.g.len() {
2692+
return Err(Error::new(
2693+
Status::GenericFailure,
2694+
format!(
2695+
"SRS too small: need {} generators, have {}",
2696+
coeffs.len(),
2697+
srs.g.len()
2698+
),
2699+
));
2700+
}
2701+
let g = &srs.g[..coeffs.len()];
2702+
use super::super::pasta::types::ProjectivePallas;
2703+
let result: ProjectivePallas = ::ark_ec::VariableBaseMSM::msm_unchecked(g, &coeffs);
2704+
let affine: PallasGroup = result.into();
2705+
if let Some((x, y)) = affine.to_coordinates() {
2706+
Ok(vec![External::new(x), External::new(y)])
2707+
} else {
2708+
Err(Error::new(Status::GenericFailure, "point at infinity"))
2709+
}
2710+
}
2711+
2712+
/// Compute challenge polynomial commitment from Vesta SRS directly.
2713+
/// Vesta curve: scalar field = Fp. Challenges are Fp, result point has Fq coords.
2714+
/// OCaml: `SRS.Fp.b_poly_commitment srs challenges` (Dummy.Ipa.Step.compute_sg)
2715+
#[napi]
2716+
pub fn vesta_srs_b_poly_commitment(
2717+
srs: &VestaCRSExternal,
2718+
challenges: Vec<&VestaFieldExternal>,
2719+
) -> Result<Vec<PallasFieldExternal>> {
2720+
let chals: Vec<VestaScalarField> = challenges.iter().map(|f| ***f).collect();
2721+
let coeffs = poly_commitment::commitment::b_poly_coefficients(&chals);
2722+
if coeffs.len() > srs.g.len() {
2723+
return Err(Error::new(
2724+
Status::GenericFailure,
2725+
format!(
2726+
"SRS too small: need {} generators, have {}",
2727+
coeffs.len(),
2728+
srs.g.len()
2729+
),
2730+
));
2731+
}
2732+
let g = &srs.g[..coeffs.len()];
2733+
use super::super::pasta::types::ProjectiveVesta;
2734+
let result: ProjectiveVesta = ::ark_ec::VariableBaseMSM::msm_unchecked(g, &coeffs);
2735+
let affine: VestaGroup = result.into();
2736+
if let Some((x, y)) = affine.to_coordinates() {
2737+
Ok(vec![External::new(x), External::new(y)])
2738+
} else {
2739+
Err(Error::new(Status::GenericFailure, "point at infinity"))
2740+
}
2741+
}

packages/pickles-circuit-diffs/src/Pickles/CircuitDiffs/PureScript/IvpStep.purs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Pickles.Types (StepField)
2121
import Pickles.Verify (incrementallyVerifyProof)
2222
import Safe.Coerce (coerce)
2323
import Snarky.Backend.Compile (compilePure)
24-
import Snarky.Circuit.DSL (class CircuitM, Bool(..), BoolVar, F, FVar, SizedF, Snarky, assertEq, assertEqual_, const_)
24+
import Snarky.Circuit.DSL (class CircuitM, Bool(..), BoolVar, F(..), FVar, SizedF, Snarky, assertEq, assertEqual_, const_)
2525
import Snarky.Circuit.Kimchi (SplitField(..), Type2(..), groupMapParams)
2626
import Snarky.Constraint.Kimchi (KimchiConstraint)
2727
import Snarky.Constraint.Kimchi as Kimchi
@@ -144,25 +144,27 @@ ivpStepCircuit { lagrangeComms, blindingH } input = do
144144
constDummySg :: AffinePoint (FVar StepField)
145145
constDummySg = { x: const_ dummyWrapSg.x, y: const_ dummyWrapSg.y }
146146

147+
constDummyPt = let { x: F x', y: F y' } = dummyPallasPt in { x: const_ x', y: const_ y' }
148+
147149
ivpParams =
148150
{ curveParams: curveParams (Proxy @PallasG)
149151
, lagrangeComms
150152
, blindingH
151153
, correctionMode: PureCorrections
152-
, sigmaCommLast: dummyPallasPt
153-
, columnComms:
154-
{ index: (Vector.replicate dummyPallasPt) :: Vector 6 _
155-
, coeff: (Vector.replicate dummyPallasPt) :: Vector 15 _
156-
, sigma: (Vector.replicate dummyPallasPt) :: Vector 6 _
157-
}
158-
, indexDigest: zero
159154
, endo: stepEndo
160155
, groupMapParams: groupMapParams (Proxy @PallasG)
161156
, useOptSponge: false
162157
}
163158
ivpInput =
164159
{ publicInput: input.publicInput
165160
, sgOld: constDummySg :< constDummySg :< Vector.nil
161+
-- VK data as circuit variables (dummy constants for circuit-diff test)
162+
, sigmaCommLast: constDummyPt
163+
, columnComms:
164+
{ index: (Vector.replicate constDummyPt) :: Vector 6 _
165+
, coeff: (Vector.replicate constDummyPt) :: Vector 15 _
166+
, sigma: (Vector.replicate constDummyPt) :: Vector 6 _
167+
}
166168
, deferredValues: input.deferredValues
167169
, wComm: input.wComm
168170
, zComm: input.zComm

packages/pickles-circuit-diffs/src/Pickles/CircuitDiffs/PureScript/IvpWrap.purs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Pickles.Verify (incrementallyVerifyProof)
2222
import Pickles.Wrap.OtherField as WrapOtherField
2323
import Safe.Coerce (coerce)
2424
import Snarky.Backend.Compile (compilePure)
25-
import Snarky.Circuit.DSL (class CircuitM, Bool(..), BoolVar, F, FVar, SizedF, Snarky, assertEq, assertEqual_)
25+
import Snarky.Circuit.DSL (class CircuitM, Bool(..), BoolVar, F(..), FVar, SizedF, Snarky, assertEq, assertEqual_, const_)
2626
import Snarky.Circuit.Kimchi (SplitField(..), Type1(..), Type2(..), groupMapParams)
2727
import Snarky.Constraint.Kimchi (KimchiConstraint)
2828
import Snarky.Constraint.Kimchi as Kimchi
@@ -142,25 +142,27 @@ ivpWrapCircuit
142142
-> Snarky (KimchiConstraint WrapField) t m Unit
143143
ivpWrapCircuit { lagrangeComms, blindingH } input = do
144144
let
145+
constDummyPt = let { x: F x', y: F y' } = dummyVestaPt in { x: const_ x', y: const_ y' }
146+
145147
ivpParams =
146148
{ curveParams: curveParams (Proxy @VestaG)
147149
, lagrangeComms
148150
, blindingH
149151
, correctionMode: InCircuitCorrections
150-
, sigmaCommLast: dummyVestaPt
151-
, columnComms:
152-
{ index: (Vector.replicate dummyVestaPt) :: Vector 6 _
153-
, coeff: (Vector.replicate dummyVestaPt) :: Vector 15 _
154-
, sigma: (Vector.replicate dummyVestaPt) :: Vector 6 _
155-
}
156-
, indexDigest: zero
157152
, endo: wrapEndo
158153
, groupMapParams: groupMapParams (Proxy @VestaG)
159154
, useOptSponge: true
160155
}
161156
ivpInput =
162157
{ publicInput: input.publicInput
163158
, sgOld: Vector.nil
159+
-- VK data as circuit variables (dummy constants for circuit-diff test)
160+
, sigmaCommLast: constDummyPt
161+
, columnComms:
162+
{ index: (Vector.replicate constDummyPt) :: Vector 6 _
163+
, coeff: (Vector.replicate constDummyPt) :: Vector 15 _
164+
, sigma: (Vector.replicate constDummyPt) :: Vector 6 _
165+
}
164166
, deferredValues: input.deferredValues
165167
, wComm: input.wComm
166168
, zComm: input.zComm
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
module Test.DummyFixture (spec) where
2+
3+
-- | Compare PureScript dummy values against OCaml fixture.
4+
-- | Fixture: packages/pickles-circuit-diffs/test/fixtures/dummy_values.txt
5+
-- | Generator: mina/src/lib/crypto/pickles/dump_dummy/dump_dummy.ml
6+
7+
import Prelude
8+
9+
import Data.Array as Array
10+
import Data.Foldable (for_)
11+
import Data.Maybe (Maybe(..))
12+
import Data.Set as Set
13+
import Data.String as String
14+
import Data.Tuple (Tuple(..))
15+
import Data.Vector as Vector
16+
import Effect.Aff (Aff)
17+
import Effect.Class (liftEffect)
18+
import Effect.Exception (throw)
19+
import Effect.Ref (Ref)
20+
import Effect.Ref as Ref
21+
import JS.BigInt as BigInt
22+
import Node.Buffer as Buffer
23+
import Node.Encoding (Encoding(..))
24+
import Node.FS.Sync as FS
25+
import Pickles.Dummy (computeDummySgValues, stepDummyUnfinalizedProof, wrapDummyUnfinalizedProof)
26+
import Pickles.Types (StepField, WrapField)
27+
import Pickles.Verify.Types (UnfinalizedProof)
28+
import Snarky.Backend.Kimchi.Impl.Pallas as PallasImpl
29+
import Snarky.Backend.Kimchi.Impl.Vesta as VestaImpl
30+
import Snarky.Circuit.DSL (F(..))
31+
import Snarky.Circuit.DSL.SizedF (toField, unwrapF) as SizedF
32+
import Snarky.Circuit.Kimchi (Type1(..), toFieldPure)
33+
import Snarky.Curves.Class (EndoScalar(..), endoScalar, toBigInt)
34+
import Snarky.Curves.Pallas (ScalarField) as Pallas
35+
import Snarky.Curves.Vesta (ScalarField) as Vesta
36+
import Snarky.Types.Shifted (Type2(..))
37+
import Test.Spec (SpecT, describe, it)
38+
import Test.Spec.Assertions (shouldEqual)
39+
40+
-- | Parse the fixture file into (key, value) pairs
41+
parseFixture :: String -> Array (Tuple String String)
42+
parseFixture content =
43+
Array.mapMaybe parseLine (String.split (String.Pattern "\n") content)
44+
where
45+
parseLine line =
46+
case String.indexOf (String.Pattern ": ") line of
47+
Nothing -> Nothing
48+
Just idx ->
49+
let
50+
key = String.take idx line
51+
val = String.drop (idx + 2) line
52+
in
53+
if String.take 1 key == "#" || String.null key then Nothing
54+
else Just (Tuple key (String.trim val))
55+
56+
lookupFixture :: String -> Array (Tuple String String) -> Maybe String
57+
lookupFixture key entries = do
58+
Tuple _ v <- Array.find (\(Tuple k _) -> k == key) entries
59+
pure v
60+
61+
-- | Assert a fixture value matches and record the key as checked.
62+
assertField :: Ref (Set.Set String) -> String -> String -> Array (Tuple String String) -> Aff Unit
63+
assertField checkedRef label expected entries = do
64+
liftEffect $ Ref.modify_ (Set.insert label) checkedRef
65+
case lookupFixture label entries of
66+
Nothing -> liftEffect $ throw ("Missing fixture key: " <> label)
67+
Just val -> expected `shouldEqual` val
68+
69+
-- | Load fixture and create a checked-keys ref. Returns (entries, checkedRef).
70+
loadFixture :: Aff { entries :: Array (Tuple String String), checked :: Ref (Set.Set String) }
71+
loadFixture = do
72+
buf <- liftEffect $ FS.readFile "packages/pickles-circuit-diffs/test/fixtures/dummy_values.txt"
73+
content <- liftEffect $ Buffer.toString UTF8 buf
74+
checked <- liftEffect $ Ref.new Set.empty
75+
pure { entries: parseFixture content, checked }
76+
77+
spec :: SpecT Aff Unit Aff Unit
78+
spec = describe "Pickles.Dummy fixture comparison" do
79+
-- Shared ref tracks which fixture keys have been asserted across all tests
80+
checkedRef <- liftEffect $ Ref.new Set.empty
81+
82+
let
83+
assert entries = assertField checkedRef
84+
85+
it "all dummy values match OCaml dump_dummy fixture" do
86+
{ entries } <- loadFixture
87+
let a = assert entries
88+
89+
-- Create SRS for sg computation
90+
let pallasSrs = PallasImpl.pallasCrsCreate (2 `pow` 15) -- Tock/Wrap SRS
91+
let vestaSrs = VestaImpl.vestaCrsCreate (2 `pow` 16) -- Tick/Step SRS
92+
93+
let dv = computeDummySgValues pallasSrs vestaSrs
94+
95+
-- Wrap IPA challenges expanded
96+
for_ (Array.zip (Array.range 0 14) (Vector.toUnfoldable dv.ipa.wrap.challengesExpanded)) \(Tuple i v) ->
97+
a ("wrap_challenge_expanded_" <> show i) (showFq v) entries
98+
99+
-- Step IPA challenges expanded
100+
for_ (Array.zip (Array.range 0 15) (Vector.toUnfoldable dv.ipa.step.challengesExpanded)) \(Tuple i v) ->
101+
a ("step_challenge_expanded_" <> show i) (showFp v) entries
102+
103+
-- Wrap sg
104+
a "wrap_sg_x" (showFp dv.ipa.wrap.sg.x) entries
105+
a "wrap_sg_y" (showFp dv.ipa.wrap.sg.y) entries
106+
107+
-- Step sg
108+
a "step_sg_x" (showFq dv.ipa.step.sg.x) entries
109+
a "step_sg_y" (showFq dv.ipa.step.sg.y) entries
110+
111+
-- Unfinalized intermediate values
112+
a "unfinalized.zeta_expanded" (showFq dv.unfinalized.zetaExpanded) entries
113+
a "unfinalized.alpha_expanded" (showFq dv.unfinalized.alphaExpanded) entries
114+
115+
-- Unfinalized plonk derived values
116+
let unwrapType2 (Type2 (F x)) = x
117+
a "unfinalized.plonk.perm" (showFq (unwrapType2 dv.unfinalized.plonk.perm)) entries
118+
a "unfinalized.plonk.zeta_to_srs_length" (showFq (unwrapType2 dv.unfinalized.plonk.zetaToSrsLength)) entries
119+
a "unfinalized.plonk.zeta_to_domain_size" (showFq (unwrapType2 dv.unfinalized.plonk.zetaToDomainSize)) entries
120+
121+
-- Unfinalized other values
122+
a "unfinalized.combined_inner_product" (showFq dv.unfinalized.combinedInnerProduct) entries
123+
a "unfinalized.b" (showFq dv.unfinalized.b) entries
124+
a "unfinalized.sponge_digest" (showFq dv.unfinalized.spongeDigest) entries
125+
126+
it "wrapDummyUnfinalizedProof matches OCaml Unfinalized.Constant.dummy" do
127+
{ entries } <- loadFixture
128+
let a = assert entries
129+
130+
let
131+
du = wrapDummyUnfinalizedProof
132+
df = du.deferredValues
133+
unwrapType2 (Type2 (F x)) = x
134+
EndoScalar wrapEndo = (endoScalar :: EndoScalar Pallas.ScalarField)
135+
expandChal c = toFieldPure (SizedF.unwrapF c) wrapEndo
136+
137+
-- Bulletproof challenges must equal the wrap IPA challenges (expanded)
138+
for_ (Array.zip (Array.range 0 14) (Vector.toUnfoldable df.bulletproofChallenges)) \(Tuple i c) ->
139+
a ("wrap_challenge_expanded_" <> show i) (showFq (expandChal c)) entries
140+
141+
-- Plonk scalar challenges (expanded) must match fixture
142+
a "unfinalized.zeta_expanded" (showFq (expandChal df.plonk.zeta)) entries
143+
a "unfinalized.alpha_expanded" (showFq (expandChal df.plonk.alpha)) entries
144+
145+
-- Plonk shifted scalars
146+
a "unfinalized.plonk.perm" (showFq (unwrapType2 df.plonk.perm)) entries
147+
a "unfinalized.plonk.zeta_to_srs_length" (showFq (unwrapType2 df.plonk.zetaToSrsLength)) entries
148+
a "unfinalized.plonk.zeta_to_domain_size" (showFq (unwrapType2 df.plonk.zetaToDomainSize)) entries
149+
150+
-- CIP and b
151+
a "unfinalized.combined_inner_product" (showFq (unwrapType2 df.combinedInnerProduct)) entries
152+
a "unfinalized.b" (showFq (unwrapType2 df.b)) entries
153+
154+
-- Sponge digest
155+
let F spongeDigest = du.spongeDigestBeforeEvaluations
156+
a "unfinalized.sponge_digest" (showFq spongeDigest) entries
157+
158+
it "stepDummyUnfinalizedProof matches OCaml expand_deferred fixture" do
159+
{ entries } <- loadFixture
160+
let a = assert entries
161+
162+
let
163+
du :: UnfinalizedProof _ (F StepField) (Type1 (F StepField)) Boolean
164+
du = stepDummyUnfinalizedProof
165+
df = du.deferredValues
166+
unwrapType1 (Type1 (F x)) = x
167+
EndoScalar stepEndo = (endoScalar :: EndoScalar Vesta.ScalarField)
168+
expandChal c = toFieldPure (SizedF.unwrapF c) stepEndo
169+
170+
-- Plonk shifted scalars (Type1)
171+
a "step_deferred.plonk.perm" (showFp (unwrapType1 df.plonk.perm)) entries
172+
a "step_deferred.plonk.zeta_to_srs_length" (showFp (unwrapType1 df.plonk.zetaToSrsLength)) entries
173+
a "step_deferred.plonk.zeta_to_domain_size" (showFp (unwrapType1 df.plonk.zetaToDomainSize)) entries
174+
175+
-- CIP and b (Type1)
176+
a "step_deferred.combined_inner_product" (showFp (unwrapType1 df.combinedInnerProduct)) entries
177+
a "step_deferred.b" (showFp (unwrapType1 df.b)) entries
178+
179+
-- xi
180+
a "step_deferred.xi_packed" (showFp (SizedF.toField (SizedF.unwrapF df.xi))) entries
181+
a "step_deferred.xi_expanded" (showFp (expandChal df.xi)) entries
182+
183+
-- Sponge digest
184+
let F spongeDigest = du.spongeDigestBeforeEvaluations
185+
a "step_deferred.sponge_digest" (showFp spongeDigest) entries
186+
187+
it "every fixture output key is checked" do
188+
{ entries } <- loadFixture
189+
checked <- liftEffect $ Ref.read checkedRef
190+
-- Input keys (prev_evals.*, step_input.*, step_deferred.ft_eval0) are intermediate
191+
-- values used by stepDummyUnfinalizedProof internally. They're verified indirectly
192+
-- through the final output values that depend on them.
193+
let
194+
isInputKey k =
195+
String.take 11 k == "prev_evals."
196+
|| String.take 11 k == "step_input."
197+
|| k == "step_deferred.ft_eval0"
198+
let outputKeys = Set.fromFoldable $ Array.filter (not <<< isInputKey) $ map (\(Tuple k _) -> k) entries
199+
let unchecked = Set.difference outputKeys checked
200+
when (not $ Set.isEmpty unchecked) do
201+
liftEffect $ throw $ "Unchecked fixture keys: " <> show (Set.toUnfoldable unchecked :: Array String)
202+
203+
where
204+
showFp :: StepField -> String
205+
showFp = BigInt.toString <<< toBigInt
206+
207+
showFq :: WrapField -> String
208+
showFq = BigInt.toString <<< toBigInt
209+
210+
pow :: Int -> Int -> Int
211+
pow _ 0 = 1
212+
pow b n = b * pow b (n - 1)

packages/pickles-circuit-diffs/test/Test/Pickles/CircuitDiffs/Main.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import Snarky.Curves.Pasta (PallasG, VestaG)
5858
import Snarky.Curves.Vesta as Vesta
5959
import Snarky.Data.EllipticCurve (AffinePoint)
6060
import Snarky.Types.Shifted (Type1(..))
61+
import Test.DummyFixture as DummyFixture
6162
import Test.Spec (SpecT, beforeAll_, describe, it)
6263
import Test.Spec.Assertions (shouldEqual)
6364
import Test.Spec.Reporter.Console (consoleReporter)
@@ -444,3 +445,4 @@ spec =
444445
describe "Linearization" do
445446
exactMatch "linearization_step_circuit" (fromCompiledCircuit compileLinearizationStep)
446447
exactMatch "linearization_wrap_circuit" (fromCompiledCircuit compileLinearizationWrap)
448+
DummyFixture.spec

0 commit comments

Comments
 (0)