Skip to content

lightning-li/plonk_verifier_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

plonk verifier contract usage

How to

  1. cd proof_generation; go mod tidy; go run .

this will output:

================================================
public inputs: [121]
serialize proof: [BigNumber.from("14680740918398965588360411700466004413189468343466508336971965319717983459612"), BigNumber.from("6117262912204511056142095710001607552576921442472316759718446960718348376419"), BigNumber.from("11611283729594401329180644477703913609118920180410016261588135627989530259911"), BigNumber.from("10277098359785470820254880821636642224648162920328040027048479971872514824090"), BigNumber.from("12162152551263665917309397569246573207800926167741907476722088509162402055582"), BigNumber.from("7320955475164054907099482372412509628195320811987815685376268211425636021557"), BigNumber.from("10954644471324753256947154985401546210768201407571030045949113786577703139842"), BigNumber.from("6073373250545839189773460900474630524464153575774197706940376160965834698340"), BigNumber.from("17531797988333704776340714603824054300314819840488986072877262287035298616231"), BigNumber.from("12553205975312783837834780589471702336024399480460640145582899103265505487423"), BigNumber.from("4458625846280727958801308584674330811132055358754624843413230111127875124145"), BigNumber.from("2226306379388180042605594961512500476281946917873652055592698085216366531093"), BigNumber.from("14313793128133978063215732522416274811760644831463764936417688585729177354847"), BigNumber.from("16739992126081575854416833403096065020779712303665298093095836298908688976547"), BigNumber.from("9256092380708520633101061791762416043619632670323616328030099179348346652310"), BigNumber.from("21158091772670585697267200368359763401094563499047099206688756654775993692324"), BigNumber.from("5310340286550951194140894165505059200910869718546301732183544249002138464038"), BigNumber.from("13922250686517015657467744987679941485491432348793426073321360854836831312728"), BigNumber.from("4620715377673744940698886398106975734761148030909772322464812727259483339894"), BigNumber.from("8018732669704754002537586607474521714948018254682172080616617960895575598954"), BigNumber.from("8809158522400931097952845769235926513945537735557780535189800809934601956172"), BigNumber.from("10458139164288025761116173634840200501091969941691100336454867953856528428702"), BigNumber.from("177340914404896543454163393864030391931513824861112517393710774622640260122"), BigNumber.from("20897483417036971162648071975167841775490266316705718898322914971948303059700"), BigNumber.from("21456269764763313273969268117452794867407486919918600591212458907990972100210"), BigNumber.from("7249695656623638351074402097056883653077398205220500361310626497957182699226")]
================================================

and generate PlonkVerifier.sol in src dir;

  1. then copy PlonkVerifier.sol to verifier_contracts/contracts/;

  2. modify verifier_contracts/test/PlonkVerifier.ts, copy step 1's output public inputs and serialize proof to arguments of plonkVerifier.verify_serialized_proof;

  3. cd verifier_contracts; npx hardhat compile && npx hardhat test

This will output:

  PlonkVerifier
verify proof successfully? true
    ✔ verify_serialized_proof (961ms)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published