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

sync with master #8

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "./node_modules/gts/",
"rules": {
"node/no-unpublished-import": ["off"],
"node/no-unpublished-require": ["off"],
"no-console": ["error", {"allow": ["warn", "error"]}]
"node/no-unpublished-require": ["off"]
}
}
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hollowdb-express",
"description": "hollowdb express server",
"version": "1.0.0",
"version": "0.1.0",
"main": ".build/src/index.js",
"repository": "https://github.com/firstbatchxyz/hollowdb-express.git",
"author": "FirstBatch Team <[email protected]>",
Expand All @@ -14,18 +14,16 @@
"node": ">=10.4.0"
},
"dependencies": {
"@redis/client": "^1.5.7",
"cors": "^2.8.5",
"express": "^4.18.2",
"helmet": "^6.1.5",
"hollowdb": "^1.2.1",
"hollowdb": "^1.2.4",
"http-status-codes": "^2.2.0",
"joi": "^17.9.2",
"warp-contracts": "^1.4.5",
"warp-contracts-lmdb": "^1.1.10"
},
"devDependencies": {
"@ethersproject/sha2": "^5.7.0",
"@types/chai": "^4.3.5",
"@types/cors": "^2.8.13",
"@types/express": "^4.17.17",
Expand All @@ -34,12 +32,11 @@
"@types/node-fetch": "^2.6.3",
"arlocal": "^1.1.60",
"chai": "^4.3.7",
"gts": "^3.1.1",
"gts": "^5.0.1",
"hollowdb-prover": "^0.1.4",
"mocha": "^10.2.0",
"node-fetch": "2",
"poseidon-lite": "^0.2.0",
"rimraf": "^5.0.0",
"snarkjs": "^0.6.11",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"warp-contracts-plugin-deploy": "^1.0.8"
Expand Down
1 change: 0 additions & 1 deletion src/clients/hollow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class HollowClient implements Client {
}

public async destroy(): Promise<void> {
// TODO: check if this is the right way to close the warp
try {
await this.hollowdb.warp.close();
} catch (error) {
Expand Down
3 changes: 0 additions & 3 deletions src/clients/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import {hollowClient} from './hollow';
// import {bundlrClient} from './bundlr';

/**
* Calls destroy of each client singleton.
*/
export async function destroyClients(): Promise<void> {
// await Promise.all([hollowClient().destroy(), bundlrClient().destroy()]);
await hollowClient().destroy();
}

Expand All @@ -14,7 +12,6 @@ export async function destroyClients(): Promise<void> {
*/
export async function setupClients(): Promise<void> {
await hollowClient().setup();
// await bundlrClient().setup();
}

export abstract class Client {
Expand Down
1 change: 1 addition & 0 deletions src/controllers/hollow.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export async function update(
) {
const {key, value, proof} = request.body;
try {
console.log({key, value});
await hollowClient().hollowdb.update(key, value, proof);
return respond.success(response, 'success', {}, StatusCodes.OK);
} catch (err) {
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export async function killServer(server: Server, exitProcess = false) {
}

if (require.main === module) {
// get contractTxId as an argument
if (process.argv.length !== 3) {
throw new Error('Please provide contractTxId as an argument.');
}
Expand Down
Binary file removed test/circuit/prover_key.zkey
Binary file not shown.
63 changes: 0 additions & 63 deletions test/circuit/verification_key.json

This file was deleted.

Binary file not shown.
Binary file added test/circuits/prover_key.zkey
Binary file not shown.
104 changes: 104 additions & 0 deletions test/circuits/verification_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"protocol": "groth16",
"curve": "bn128",
"nPublic": 3,
"vk_alpha_1": [
"20491192805390485299153009773594534940189261866228447918068658471970481763042",
"9383485363053290200918347156157836566562967994039712273449902621266178545958",
"1"
],
"vk_beta_2": [
[
"6375614351688725206403948262868962793625744043794305715222011528459656738731",
"4252822878758300859123897981450591353533073413197771768651442665752259397132"
],
[
"10505242626370262277552901082094356697409835680220590971873171140371331206856",
"21847035105528745403288232691147584728191162732299865338377159692350059136679"
],
[
"1",
"0"
]
],
"vk_gamma_2": [
[
"10857046999023057135944570762232829481370756359578518086990519993285655852781",
"11559732032986387107991004021392285783925812861821192530917403151452391805634"
],
[
"8495653923123431417604973247489272438418190587263600148770280649306958101930",
"4082367875863433681332203403145435568316851327593401208105741076214120093531"
],
[
"1",
"0"
]
],
"vk_delta_2": [
[
"11096476230717829080921080828303680418718548209290765115650368393406749321227",
"7414278320325607053366257407789378698851914311524495776205092446127474520511"
],
[
"2470657146902522453784285243550034516374209897768447910390853516758984991575",
"16842374418174551970382288054846603736379810398474787602359265849980131152280"
],
[
"1",
"0"
]
],
"vk_alphabeta_12": [
[
[
"2029413683389138792403550203267699914886160938906632433982220835551125967885",
"21072700047562757817161031222997517981543347628379360635925549008442030252106"
],
[
"5940354580057074848093997050200682056184807770593307860589430076672439820312",
"12156638873931618554171829126792193045421052652279363021382169897324752428276"
],
[
"7898200236362823042373859371574133993780991612861777490112507062703164551277",
"7074218545237549455313236346927434013100842096812539264420499035217050630853"
]
],
[
[
"7077479683546002997211712695946002074877511277312570035766170199895071832130",
"10093483419865920389913245021038182291233451549023025229112148274109565435465"
],
[
"4595479056700221319381530156280926371456704509942304414423590385166031118820",
"19831328484489333784475432780421641293929726139240675179672856274388269393268"
],
[
"11934129596455521040620786944827826205713621633706285934057045369193958244500",
"8037395052364110730298837004334506829870972346962140206007064471173334027475"
]
]
],
"IC": [
[
"1655549413518972190198478012616802994254462093161203201613599472264958303841",
"21742734017792296281216385119397138748114275727065024271646515586404591497876",
"1"
],
[
"8538073699656227825163355641395289145009552590080232568085584821550249860613",
"8704806061262342714592321601225786534575473630380054397904947301359468671240",
"1"
],
[
"9567910551099174794221497568036631681620409346997815381833929247558241020796",
"17282591858786007768931802126325866705896012606427630592145070155065868649172",
"1"
],
[
"2434853173162649068447421511321061073472455335468728003828652731887388976893",
"14790703359767191307987302507410037352421804608082610413926081208484297007480",
"1"
]
]
}
Loading
Loading