Skip to content

Commit

Permalink
deploy-new-params
Browse files Browse the repository at this point in the history
  • Loading branch information
Kais committed Nov 1, 2024
1 parent 3f079fd commit cb8c8fa
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion script/output/holesky_dev/v1-deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"addresses": {
"queryClientImpl": "0xE1b71B57Ea95ae274018aE844ae7013F39Cb06Dc",
"queryClientProxy": "0x5C189dC46c2c6136dBaFdAAa02Db46CD2dF683A3",
"registryImpl": "0x63089C6363e8db17D5C984F5B02b00d07D34A0B6",
"registryImpl": "0xA33defDADfdd9fd325B583964F866069DE4c01Ed",
"registryProxy": "0xC9135b51c4DD04B6E082e2cB56a5C26b3a53Ee47"
},
"chainInfo": {
Expand Down
3 changes: 2 additions & 1 deletion script/util/copy-verifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ CODE_DIR_PATH=groth16-framework/test_data
BRANCH=main
VERIFIER_FILE=./src/v1/Groth16Verifier.sol
VERIFIER_EXTENSIONS_FILE=./src/v1/Groth16VerifierExtensions.sol
VERIFIER_SOL_URL="https://pub-64a4eb6e897e425083647b3e0e8539a1.r2.dev/groth16_assets/verifier.sol"

cd $GIT_REPO_PATH && \
git fetch origin $BRANCH && \
git checkout $BRANCH && \
git pull origin $BRANCH && \
cd -

cp "${GIT_REPO_PATH}/${CODE_DIR_PATH}/verifier.sol" $VERIFIER_FILE
wget -O $VERIFIER_FILE $VERIFIER_SOL_URL
cp "${GIT_REPO_PATH}/${CODE_DIR_PATH}/Groth16VerifierExtensions.sol" $VERIFIER_EXTENSIONS_FILE

# Use as library instead of contract
Expand Down
46 changes: 23 additions & 23 deletions src/v1/Groth16Verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,57 +59,57 @@ library Groth16Verifier {

// Groth16 alpha point in G1
uint256 constant ALPHA_X =
11289158266594761791304774965892460756780769979322398541382304989776158172888;
3178329822318468224934843275534557736964841382968721975242878371551080001892;
uint256 constant ALPHA_Y =
5881254655617724694508075086453521632233746036948951270219418199020346294032;
9026843967616178132587238931768543648144195939828557177978428905696327010143;

// Groth16 beta point in G2 in powers of i
uint256 constant BETA_NEG_X_0 =
10316640952806131773953534286387669517375040244819327364412697314648001977805;
2360661940587297971830916237330676779070475331930084272533732201067486147219;
uint256 constant BETA_NEG_X_1 =
15005486689465173044852376317376850968291769917227325984191811997346121977181;
13166332558858993205960010400829872839588995096645399777294548835855404675457;
uint256 constant BETA_NEG_Y_0 =
8527752002297783055088114202601924693110979755291819182649728374806510452335;
3844468732830460709205477289187740889754428167245994362974375858411084855850;
uint256 constant BETA_NEG_Y_1 =
14770566491050296469768264327654969396199364242006402077187220154552375623410;
3669860118847183279743935655046760816041109331954666258111503242265138915000;

// Groth16 gamma point in G2 in powers of i
uint256 constant GAMMA_NEG_X_0 =
17725775837747791707828160092279615418171619335689414679208227973011967950978;
5425297354519915741785365306521579223558565898221387075958217730522262215352;
uint256 constant GAMMA_NEG_X_1 =
14520726636981875711601838269813439351795280500631412638543326005586078509109;
20918890028837393851489538814036905483347735563781618763722276350959936276902;
uint256 constant GAMMA_NEG_Y_0 =
10975435875833610645484597314547377375310152434098413186675499365871740986946;
4780756766300831484757004240277298693257095754699144480308550752311151707974;
uint256 constant GAMMA_NEG_Y_1 =
10563080580456451632738608193694999034422583079674671818551993958400524893595;
7848796437547074123989629796193282678021827400670322002439194820232708603179;

// Groth16 delta point in G2 in powers of i
uint256 constant DELTA_NEG_X_0 =
15670681828153644607212636106672377912193468781853232738925713974813786654558;
11006924246846236974954987235641775900294669936061388150823828687021940090666;
uint256 constant DELTA_NEG_X_1 =
19121054579303056091674382105639513054370782609079017108893590176688553187455;
18540409077344575696913849607391407075570342913577865727131138836941213417555;
uint256 constant DELTA_NEG_Y_0 =
8565719555080561859610547507985735834301529527158490032837207078476836370989;
2425350267794137339579983126200071818110957676285217033406298259184833821480;
uint256 constant DELTA_NEG_Y_1 =
9505469580014179140628317027431149232931342930188269082244188355737705411010;
17618237570813398021763344992475134239201023900425244547360452056470255418443;

// Constant and public input points
uint256 constant CONSTANT_X =
19752781636864303082313062343491396031199264629355217079289455240778678846109;
11972844419836633390685561259113532255478392262212231129559561876962543203137;
uint256 constant CONSTANT_Y =
9801078219761780158929889886508029855598180762735275298363892772082755517970;
15743758944636558836437438767796600569858639936446871756725816308323091199354;
uint256 constant PUB_0_X =
9743473280226596587501581875504184571065525135035489724682391696151649543614;
6969471384800697842033482502451044481131308101127420041340577777798468000509;
uint256 constant PUB_0_Y =
8689662043692196201410644591632524526570906357454901034342313765545441692946;
19710471312445142702325608778952710507777855133516059548280246484624703250379;
uint256 constant PUB_1_X =
12693171637922242718074793739610622749796494867336715282121306736408371894975;
7827876836353049865762713411853392316439416163118781484041358083998453616114;
uint256 constant PUB_1_Y =
752618170115893634876101018362340704153975187123696931422295093479134169079;
17143101853218033625794636814125047586381073567741003988681540920487489905005;
uint256 constant PUB_2_X =
5398157214492609827247596232342286303556142988219435450382607621737536785269;
21223993520446273888057527797204463494932635122532232174892266030235131844564;
uint256 constant PUB_2_Y =
15262294918861246687269674701202876743710912476510036442166565513386426003088;
17227591946757803030814495811100311808589868388990529619011596688041206554061;

/// Negation in Fp.
/// @notice Returns a number x such that a + x = 0 in Fp.
Expand Down Expand Up @@ -622,5 +622,5 @@ library Groth16Verifier {
}

bytes32 constant CIRCUIT_DIGEST =
0x1fb9c5d0cf67fa6b9c0645cd4385c67d81be612b2efa4e524c054990c5ae6216;
0x2cb55360bdb1063b3a04d04b6aa4cc7e50d60d86ee8c78095dd7b1bef6b9bf05;
}

0 comments on commit cb8c8fa

Please sign in to comment.