2024-12-11 21:07:30 +01:00
|
|
|
|
|
|
|
|
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
|
2024-12-12 22:02:27 +01:00
|
|
|
import Challenge.Verifier
|
2024-12-11 21:07:30 +01:00
|
|
|
|
|
|
|
|
import qualified Data.ByteString.Char8 as B
|
|
|
|
|
import qualified Data.ByteString.Lazy.Char8 as L
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
main = do
|
2024-12-12 22:02:27 +01:00
|
|
|
-- let prefix = "fibonacci"
|
|
|
|
|
-- let prefix = "recursion_outer"
|
2024-12-12 11:33:26 +01:00
|
|
|
let prefix = "lookup"
|
|
|
|
|
|
2024-12-13 20:20:43 +01:00
|
|
|
text_common <- L.readFile ("../json/" ++ prefix ++ "_common.json")
|
|
|
|
|
text_vkey <- L.readFile ("../json/" ++ prefix ++ "_vkey.json" )
|
|
|
|
|
text_proof <- L.readFile ("../json/" ++ prefix ++ "_proof.json" )
|
2024-12-11 21:07:30 +01:00
|
|
|
|
2024-12-12 22:02:27 +01:00
|
|
|
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
|
|
|
|
2024-12-12 22:02:27 +01:00
|
|
|
let challenges = proofChallenges common_data verifier_data proof_data
|
2024-12-12 13:27:45 +01:00
|
|
|
|
2024-12-12 22:02:27 +01:00
|
|
|
print challenges
|