Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure constraints are applied appropriately #95

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions go-sdk/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ require (
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
)

Expand All @@ -46,8 +46,8 @@ require (
github.com/iden3/go-rapidsnark/types v0.0.2 // indirect
github.com/iden3/go-rapidsnark/witness/v2 v2.0.0
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/sys v0.26.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/postgres v1.5.9
gorm.io/driver/sqlite v1.5.6
Expand Down
8 changes: 8 additions & 0 deletions go-sdk/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJ
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
Expand All @@ -99,10 +101,16 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM=
golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8=
golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
20 changes: 10 additions & 10 deletions solidity/contracts/lib/verifier_anon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ contract Groth16Verifier_Anon {
uint256 constant deltay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;


uint256 constant IC0x = 3319550867918389158760504882166910322350814301529999793881219927624926812218;
uint256 constant IC0y = 8112223961732708620307943835229149349073269785468907951921031999005579432360;
uint256 constant IC0x = 5164307371815896911515696671738873844048257722050909867831835990637012101701;
uint256 constant IC0y = 12354927596117908346199755324136696518322064372058485349259909333082372370635;

uint256 constant IC1x = 15096629411914632277607546989315689233719395046718808409188927196068752404150;
uint256 constant IC1y = 10362984186384929304750673294926421618922019817172373369678893994019850088343;
uint256 constant IC1x = 20222371576460641197340148762590738473920678083533188719662074960764475697689;
uint256 constant IC1y = 7897001712913914338190514293992881005369467044069819357567910495239020142075;

uint256 constant IC2x = 20815066981450336832314867142721691503062320369984936892703152358416699839703;
uint256 constant IC2y = 1557645147102593228134281419019838535030988955617584297402100851233797935185;
uint256 constant IC2x = 1504125502076828772513804635767555623024057782300194162723850417077389521740;
uint256 constant IC2y = 858320369100031974724283697183785213773993091633560622385563288753711881155;

uint256 constant IC3x = 18849972338795474978690234885011750409362042163141639815802084633533672717587;
uint256 constant IC3y = 11592628208735263354121581365973913318820007731347818812301423349302617899582;
uint256 constant IC3x = 5493470858249230343108142412555674050720320624568365358155164359336581986287;
uint256 constant IC3y = 11317628322030591465286609049996565879526614862359528856821175025851564803769;

uint256 constant IC4x = 10387575294448289661300123614024155521733638164071044346711512029585672920273;
uint256 constant IC4y = 11497205022291710792060689976216697813796698175621592132942830938000465594885;
uint256 constant IC4x = 21434069923620544033418441313691498595963078701376702207210110500016155495561;
uint256 constant IC4y = 8164005755254962127084858831575606145119101801687857812612476525976966267935;


// Memory data
Expand Down
84 changes: 42 additions & 42 deletions solidity/contracts/lib/verifier_anon_batch.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,68 +43,68 @@ contract Groth16Verifier_AnonBatch {
uint256 constant deltay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;


uint256 constant IC0x = 3944445075228117821565047604309603820750410202018016930603758668358261843334;
uint256 constant IC0y = 19711951516505465677916699605008107163330091662763114395955513140341801084904;
uint256 constant IC0x = 5861890033538026212667750668572473120788004819983455742285567105342353828661;
uint256 constant IC0y = 14554943693784272414673670067771585529532330995100148763403115114448877035365;

uint256 constant IC1x = 10024224123696554332933959563789684919413349073272276892782203947930331299424;
uint256 constant IC1y = 20519109008487818648924793377164949144965439508556951350226813126173272972409;
uint256 constant IC1x = 4739729125948578143112487239601694156755949850082652619305531308271151884771;
uint256 constant IC1y = 17749371344655824264585964787550860034959402409108396453133976804583835130552;

uint256 constant IC2x = 1142173056187437846551638621853081194566151147956191754797065528924777141391;
uint256 constant IC2y = 16031000099246098401525163660770199821855637849160899105526656734827553900160;
uint256 constant IC2x = 14013416492351286258930685726812465840700541217811991086500109772059195611474;
uint256 constant IC2y = 17341037787926101776428292785405504332612709297224939583579473367142427226146;

uint256 constant IC3x = 7098793361958481515578594788921578408626331172533029034769487091259177553933;
uint256 constant IC3y = 18915702772411484313477583493617809166313147544546482894351481289848486181796;
uint256 constant IC3x = 16336125231474892941667849003611054653113378791694063869451412356483463985561;
uint256 constant IC3y = 16709372045210908645558210606323811804038958109984713200681465725462349228313;

uint256 constant IC4x = 19005971096426827854128837349584492075969620357702027599715901169439142039107;
uint256 constant IC4y = 17532207718210544125714029032797641112877037912343528214735964170516471571921;
uint256 constant IC4x = 1350933976763269071586957867294447937413800700092037844783181601781418103174;
uint256 constant IC4y = 20750311635827819546297608986632539297126216889087963597245665338649882002531;

uint256 constant IC5x = 1936021015178206426119341748943108180794913319638205912535284413609581525602;
uint256 constant IC5y = 7967302136211472331990287049203658686597431243250329181974784035551218197358;
uint256 constant IC5x = 18501231329275950544200822436029438898273816039878357368580284740930603918349;
uint256 constant IC5y = 16510519818898985288434662540928597848930750415753674143154410631185500112194;

uint256 constant IC6x = 9992554524016746312003618199582955623647477467519651007496252737703754630352;
uint256 constant IC6y = 997153275981161531565982027728817123365375819829482012091549818270423282402;
uint256 constant IC6x = 427412941873824848381412611056494125871790409703845220166618687524391209220;
uint256 constant IC6y = 10167070060121087105778748574545912745978987835036254100788097410173501412000;

uint256 constant IC7x = 7712197579878897669743418158040651069819471864798300359532421509343128597573;
uint256 constant IC7y = 20498432515857145880555260380958760566875858463167134358631571286825812813269;
uint256 constant IC7x = 21680316401697530387659464976920243382540489663483955131578556609062302835516;
uint256 constant IC7y = 2771032069976544571540203366171061199405282280032342847790829625616631647712;

uint256 constant IC8x = 18584297171621908469803449997963801603823813214190833275839121570817476657021;
uint256 constant IC8y = 2445386723403677400308664765622312273023037374330967243299653211986462592642;
uint256 constant IC8x = 1589311253286323023458190860456307249957732223306580780846961205512934847218;
uint256 constant IC8y = 15833650494813701499577469336077389128198297210161519294143908475223515119621;

uint256 constant IC9x = 14133192108880623735273270944236158184105520798975796184751235384867979739155;
uint256 constant IC9y = 20404122581377456550753849206502073960629482972120621127516616915445683083056;
uint256 constant IC9x = 21638568856698830240031070255671678582986420697404695863717930104267814161320;
uint256 constant IC9y = 6975344041422413085553707201542268576262375864550055884252037251260047316151;

uint256 constant IC10x = 21620582086891038692341479911819403068709367310253070056590551238915328633223;
uint256 constant IC10y = 18630174909646554249973638979405958638024971216151180247838752724473240059069;
uint256 constant IC10x = 15566951744091774571845346864625632071562245268051450620323746657341194468372;
uint256 constant IC10y = 15914767178458871606751985281168248486865781320875596838197186668380476371625;

uint256 constant IC11x = 6342596883522327201634816902398912758838128458794280117859726335647563585947;
uint256 constant IC11y = 2824016079010236948181204053147426819259406110745168974616977685808163801290;
uint256 constant IC11x = 8870987399617616621565790607227519512363052138281107719713711770259195535562;
uint256 constant IC11y = 16576269088408263050408687625313770698422473413425428513433714723321646898172;

uint256 constant IC12x = 43159074190541489778203261134463021016969587199344421115375597833984885585;
uint256 constant IC12y = 17350896801758852580882302620622451451656238190131669741645781468036782408702;
uint256 constant IC12x = 4302631833151351458482421257465143931437663458677202329023634462155064365599;
uint256 constant IC12y = 10473604306887315063978965617794993524128852056520678852181652265045583989925;

uint256 constant IC13x = 5321216183955287064016722685217746316057734432786380277070838310613909336891;
uint256 constant IC13y = 2334801222880043538040480613345627043718796655094720160375512110863749425857;
uint256 constant IC13x = 10582158030205725561097015536549835398898162476729099047306076287629106871344;
uint256 constant IC13y = 14682837745334444080673007316454703694306486261985003264248721319007334479744;

uint256 constant IC14x = 3896684584635540489763375035772495988353847533817784420117417709276419469254;
uint256 constant IC14y = 10946516808373943526791204345554417681977551778921357378409837151667749092291;
uint256 constant IC14x = 11029547759155411999286197812647814990318800254899998378660231932754125196682;
uint256 constant IC14y = 16084428567867324049086244023860598710803653871684454604196448361202927418469;

uint256 constant IC15x = 13544430687582833351555151609955883457501780885438485005798150036967658669454;
uint256 constant IC15y = 12107768107013128150501889862480428065699648543203108548328101125430038577111;
uint256 constant IC15x = 1131984867972909408440829748802232780744768465826965195607437394686286413627;
uint256 constant IC15y = 1027448343262935656852093908415087517053342078127862257282557746183650002095;

uint256 constant IC16x = 20956163448328444323344906937345570843311197655153127557251918352529849395595;
uint256 constant IC16y = 9598212570598439607775417965490373879497529804091617545914636036363751490464;
uint256 constant IC16x = 13773651067643441656258855495261241624865695567386017806188387539831324444653;
uint256 constant IC16y = 10099048929651180856696561584499995020406508763374700440471459482571469923244;

uint256 constant IC17x = 8449456092675518202758567183735078063848547815110371262936870940442334259757;
uint256 constant IC17y = 21524144134927604254378260953498622529381737979908227933427485851545206692964;
uint256 constant IC17x = 7261522173107989025754700034160229984396817947135820259206143417601541759243;
uint256 constant IC17y = 14197346282964216302960496946080841539639325641322779752411061233650174236593;

uint256 constant IC18x = 393847122473837845101843958338171385083705802293147226527157239309984511996;
uint256 constant IC18y = 10752382192217751383168301683456208551797510589007358704657988919297497446610;
uint256 constant IC18x = 16804288461152811240273272526375896569268609716294064392984996572956810172145;
uint256 constant IC18y = 4263264235883275783920963131811238561265613954374210889318327987454695983008;

uint256 constant IC19x = 15228891166659766368605640799948864234093810898436039102385035716690203722442;
uint256 constant IC19y = 10660180881739048220615741801758109202106271107338130476996669627381881546392;
uint256 constant IC19x = 595455057683637626512977674120429818667714277492803563528527493388253182962;
uint256 constant IC19y = 6206917820423018505484295069638549645856906308850248630512399872229440772926;

uint256 constant IC20x = 7611617887611604008702014435739239029985615041644938533863855284962222542764;
uint256 constant IC20y = 830253140800199591016113383493114526088389823306942699451888210794961973972;
uint256 constant IC20x = 11593280811993289290352475831100253791227442039341254544883515411103749159202;
uint256 constant IC20y = 19908836799588537779624973978158215794141858934866399503207571702467035492203;


// Memory data
Expand Down
Loading
Loading