plonky2-verifier/src/testmain.hs

34 lines
1.0 KiB
Haskell
Raw Normal View History

module Main where
--------------------------------------------------------------------------------
import Data.Aeson
import Types
2024-12-13 20:45:45 +01:00
import Hash.Sponge
import Hash.Digest
2024-12-13 20:42:44 +01:00
import Algebra.Goldilocks
import Challenge.Verifier
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.Char8 as L
--------------------------------------------------------------------------------
main = do
-- let prefix = "fibonacci"
-- let prefix = "recursion_outer"
2024-12-12 11:33:26 +01:00
let prefix = "lookup"
text_common <- L.readFile ("../json/" ++ prefix ++ "_common.json")
text_vkey <- L.readFile ("../json/" ++ prefix ++ "_vkey.json" )
text_proof <- L.readFile ("../json/" ++ prefix ++ "_proof.json" )
let Just common_data = decode text_common :: Maybe CommonCircuitData
let Just verifier_data = decode text_vkey :: Maybe VerifierOnlyCircuitData
let Just proof_data = decode text_proof :: Maybe ProofWithPublicInputs
2024-12-13 20:42:44 +01:00
let challenges = proofChallenges common_data verifier_data proof_data
2024-12-12 13:27:45 +01:00
print challenges