From 750b65f187535ed8753a6045f9f36165b0a35d9c Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Sun, 20 Oct 2024 13:08:53 +0300 Subject: [PATCH 1/4] release --- package-lock.json | 28 ++++++++++++++-------------- packages/api/package.json | 4 ++-- packages/common/package.json | 4 ++-- packages/deployment/package.json | 4 ++-- packages/indexer/package.json | 4 ++-- packages/library/package.json | 4 ++-- packages/module/package.json | 4 ++-- packages/persistance/package.json | 4 ++-- packages/processor/package.json | 6 +++--- packages/protocol/package.json | 4 ++-- packages/sdk/package.json | 4 ++-- packages/sequencer/package.json | 4 ++-- packages/stack/package.json | 4 ++-- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d6fe8bb..89b34db7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19901,7 +19901,7 @@ }, "packages/api": { "name": "@proto-kit/api", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "@graphql-tools/stitch": "^9.0.3", @@ -19972,7 +19972,7 @@ }, "packages/common": { "name": "@proto-kit/common", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "lodash": "^4.17.21", @@ -19991,7 +19991,7 @@ }, "packages/deployment": { "name": "@proto-kit/deployment", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "@types/yargs": "^17.0.29", @@ -20056,7 +20056,7 @@ }, "packages/indexer": { "name": "@proto-kit/indexer", - "version": "0.1.1-develop.267+b252853", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "@envelop/extended-validation": "^4.1.0", @@ -20105,7 +20105,7 @@ }, "packages/library": { "name": "@proto-kit/library", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "bigint-isqrt": "^0.3.2", @@ -20128,7 +20128,7 @@ }, "packages/module": { "name": "@proto-kit/module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "lodash": "^4.17.21", @@ -20148,7 +20148,7 @@ }, "packages/persistance": { "name": "@proto-kit/persistance", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "@prisma/client": "^5.18.0", @@ -20172,11 +20172,11 @@ }, "packages/processor": { "name": "@proto-kit/processor", - "version": "0.1.1-develop.267+b252853", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "@inkjs/ui": "^1.0.0", - "@prisma/client": "^5.19.1", + "@prisma/client": "^5.18.0", "@types/yargs": "^17.0.29", "figlet": "^1.7.0", "ink": "^4.4.1", @@ -20230,7 +20230,7 @@ }, "packages/protocol": { "name": "@proto-kit/protocol", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "lodash": "^4.17.21", @@ -20271,7 +20271,7 @@ }, "packages/sdk": { "name": "@proto-kit/sdk", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "@urql/core": "^4.1.4", @@ -20296,7 +20296,7 @@ }, "packages/sequencer": { "name": "@proto-kit/sequencer", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "compute-gcd": "^1.2.1", @@ -20320,7 +20320,7 @@ }, "packages/stack": { "name": "@proto-kit/stack", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "dependencies": { "reflect-metadata": "^0.1.13" @@ -23189,7 +23189,7 @@ "requires": { "@inkjs/ui": "^1.0.0", "@jest/globals": "^29.5.0", - "@prisma/client": "^5.19.1", + "@prisma/client": "^5.18.0", "@proto-kit/api": "*", "@proto-kit/common": "*", "@proto-kit/library": "*", diff --git a/packages/api/package.json b/packages/api/package.json index 19551ca0..ca60a373 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", @@ -43,5 +43,5 @@ "@types/lodash": "^4.14.194", "@types/ws": "^8.5.4" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/common/package.json b/packages/common/package.json index 6fa29f05..5d43d0bd 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", @@ -30,5 +30,5 @@ "@jest/globals": "^29.5.0", "@types/lodash": "^4.14.194" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/deployment/package.json b/packages/deployment/package.json index 31332d1e..6ec47ff0 100644 --- a/packages/deployment/package.json +++ b/packages/deployment/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", @@ -34,5 +34,5 @@ "devDependencies": { "@jest/globals": "^29.5.0" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/indexer/package.json b/packages/indexer/package.json index 33dc2fb2..29f2dbae 100644 --- a/packages/indexer/package.json +++ b/packages/indexer/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.267+b252853", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "prebuild": "npm run prisma:generate", "build": "tsc -p tsconfig.json", @@ -63,5 +63,5 @@ "@types/react": "^18.2.34", "@types/ws": "^8.5.4" }, - "gitHead": "b2528538c73747d000cc3ea99ee26ee415d8248d" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/library/package.json b/packages/library/package.json index 283411ee..9ae8be84 100644 --- a/packages/library/package.json +++ b/packages/library/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", @@ -34,5 +34,5 @@ "@jest/globals": "^29.5.0", "@types/lodash": "^4.14.194" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/module/package.json b/packages/module/package.json index 716257e2..b765a91c 100644 --- a/packages/module/package.json +++ b/packages/module/package.json @@ -2,7 +2,7 @@ "name": "@proto-kit/module", "license": "MIT", "private": false, - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "type": "module", "scripts": { "build": "tsc -p tsconfig.json", @@ -31,5 +31,5 @@ "o1js": "^1.1.0", "tsyringe": "^4.7.0" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/persistance/package.json b/packages/persistance/package.json index b693776d..971be1c1 100644 --- a/packages/persistance/package.json +++ b/packages/persistance/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "npm run prisma-generate && tsc -p tsconfig.json", "prisma-generate": "npx prisma generate", @@ -38,5 +38,5 @@ "@jest/globals": "^29.5.0", "@types/lodash": "^4.14.194" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/processor/package.json b/packages/processor/package.json index 069de190..c0707480 100644 --- a/packages/processor/package.json +++ b/packages/processor/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.267+b252853", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", @@ -24,7 +24,7 @@ "main": "dist/index.js", "dependencies": { "@inkjs/ui": "^1.0.0", - "@prisma/client": "^5.19.1", + "@prisma/client": "^5.18.0", "@types/yargs": "^17.0.29", "figlet": "^1.7.0", "ink": "^4.4.1", @@ -62,5 +62,5 @@ "@types/ink": "^2.0.3", "@types/node": "^20.8.10" }, - "gitHead": "b2528538c73747d000cc3ea99ee26ee415d8248d" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/protocol/package.json b/packages/protocol/package.json index aeb777ba..6df98d91 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", @@ -32,5 +32,5 @@ "@jest/globals": "^29.5.0", "@types/lodash": "^4.14.194" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 8a066434..ae7f356b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": false, "type": "module", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", @@ -36,5 +36,5 @@ "@jest/globals": "^29.5.0", "@types/lodash": "^4.14.194" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/sequencer/package.json b/packages/sequencer/package.json index 5465b1e0..aae588dd 100644 --- a/packages/sequencer/package.json +++ b/packages/sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@proto-kit/sequencer", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "private": false, "type": "module", @@ -37,5 +37,5 @@ "reflect-metadata": "^0.1.13", "ts-pattern": "^4.3.0" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } diff --git a/packages/stack/package.json b/packages/stack/package.json index ce23bf55..baf488f9 100644 --- a/packages/stack/package.json +++ b/packages/stack/package.json @@ -1,6 +1,6 @@ { "name": "@proto-kit/stack", - "version": "0.1.1-develop.833+397881ed", + "version": "0.1.1-develop.1087+9ab55c9b", "license": "MIT", "private": false, "type": "module", @@ -37,5 +37,5 @@ "dependencies": { "reflect-metadata": "^0.1.13" }, - "gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956" + "gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe" } From 5819c9bca0e3a81ff7c692333247c50835e40b09 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Thu, 31 Oct 2024 10:38:15 +0100 Subject: [PATCH 2/4] rename prisma-generate to prisma:generate --- package.json | 2 +- packages/persistance/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e36b5474..62186b2a 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "test:integration": "npx lerna run test:integration -- --passWithNoTests --forceExit", "test:watch": "npx lerna run test:watch", "migrate": "npx lerna run prisma-migrate", - "prisma-generate": "npx lerna run prisma-generate", + "prisma:generate": "npx lerna run prisma:generate", "commit": "cz", "publish:canary": "npx lerna publish prerelease --no-private --exact --yes --canary --preid develop --dist-tag latest --loglevel verbose --force-git-tag --force-publish" }, diff --git a/packages/persistance/package.json b/packages/persistance/package.json index 971be1c1..da280b51 100644 --- a/packages/persistance/package.json +++ b/packages/persistance/package.json @@ -5,8 +5,8 @@ "type": "module", "version": "0.1.1-develop.1087+9ab55c9b", "scripts": { - "build": "npm run prisma-generate && tsc -p tsconfig.json", - "prisma-generate": "npx prisma generate", + "build": "npm run prisma:generate && tsc -p tsconfig.json", + "prisma:generate": "npx prisma generate", "prisma-migrate": "npx prisma migrate deploy", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test ./test-integration", From 0cc314e8320c029d59c282addc65ffd87f0893e9 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Fri, 8 Nov 2024 10:34:54 +0100 Subject: [PATCH 3/4] added a tps test with performance timing/tracking --- .github/workflows/pull-request-develop.yml | 2 +- .nvmrc | 2 +- package.json | 2 +- packages/api/package.json | 2 +- packages/common/package.json | 2 +- packages/common/src/log.ts | 22 ++ packages/deployment/docker/base/entry.sh | 4 +- .../docker/lightnet/docker-compose.yml | 1 - packages/deployment/package.json | 2 +- packages/indexer/package.json | 2 +- packages/library/package.json | 2 +- packages/module/package.json | 2 +- packages/persistance/package.json | 4 +- packages/processor/package.json | 2 +- packages/protocol/package.json | 2 +- packages/sdk/package.json | 2 +- packages/sequencer/package.json | 4 +- .../src/mempool/private/PrivateMempool.ts | 3 + .../sequencing/BlockProducerModule.ts | 19 ++ .../sequencing/TransactionExecutionService.ts | 14 + .../production/trigger/BlockTrigger.ts | 2 + .../production/trigger/ManualBlockTrigger.ts | 7 +- .../sequencer/test-integration/tps.test.ts | 291 ++++++++++++++++++ packages/stack/.env | 4 +- packages/stack/package.json | 6 +- 25 files changed, 380 insertions(+), 25 deletions(-) create mode 100644 packages/sequencer/test-integration/tps.test.ts diff --git a/.github/workflows/pull-request-develop.yml b/.github/workflows/pull-request-develop.yml index 892e86bf..402771cf 100644 --- a/.github/workflows/pull-request-develop.yml +++ b/.github/workflows/pull-request-develop.yml @@ -143,7 +143,7 @@ jobs: run: npm run build - name: "Migrate DB" - run: npm run migrate + run: npm run prisma:migrate - name: "Wait for lightnet readiness" uses: o1-labs/wait-for-mina-network-action@v1 diff --git a/.nvmrc b/.nvmrc index e8b25b54..6eb86db7 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.14.2 \ No newline at end of file +v23 \ No newline at end of file diff --git a/package.json b/package.json index 62186b2a..aecbd481 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "test:ci": "npx lerna run test -- --passWithNoTests --forceExit", "test:integration": "npx lerna run test:integration -- --passWithNoTests --forceExit", "test:watch": "npx lerna run test:watch", - "migrate": "npx lerna run prisma-migrate", + "prisma:migrate": "npx lerna run prisma:migrate", "prisma:generate": "npx lerna run prisma:generate", "commit": "cz", "publish:canary": "npx lerna publish prerelease --no-private --exact --yes --canary --preid develop --dist-tag latest --loglevel verbose --force-git-tag --force-publish" diff --git a/packages/api/package.json b/packages/api/package.json index ca60a373..0575d493 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -8,7 +8,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch" }, diff --git a/packages/common/package.json b/packages/common/package.json index 5d43d0bd..1f1e3e9f 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -8,7 +8,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch" }, diff --git a/packages/common/src/log.ts b/packages/common/src/log.ts index fbd812a3..e1af4e96 100644 --- a/packages/common/src/log.ts +++ b/packages/common/src/log.ts @@ -26,6 +26,14 @@ function logProvable( /* eslint-enable */ export const log = { + timingEnabled: false, + enableTiming: () => { + log.timingEnabled = true; + }, + disableTiming: () => { + log.timingEnabled = false; + }, + provable: { info: (...args: unknown[]) => { logProvable(loglevel.info, ...args); @@ -68,6 +76,20 @@ export const log = { } }, + time: (name: string) => { + if (log.timingEnabled) { + // eslint-disable-next-line no-console + console.time(name); + } + }, + + timeEnd: (name: string) => { + if (log.timingEnabled) { + // eslint-disable-next-line no-console + console.timeEnd(name); + } + }, + warn: (...args: unknown[]) => { loglevel.warn(...args); }, diff --git a/packages/deployment/docker/base/entry.sh b/packages/deployment/docker/base/entry.sh index 37d7a975..e931094a 100644 --- a/packages/deployment/docker/base/entry.sh +++ b/packages/deployment/docker/base/entry.sh @@ -2,7 +2,7 @@ if [[ ${DATABASE_URL} ]]; then echo "Migrating on ${DATABASE_URL}" - npm run migrate; + npm run prisma:migrate; fi #LOGGING_LEVEL=${LOGGING_LEVEL} -node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads --es-module-specifier-resolution=node $@ \ No newline at end of file +node --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node $@ \ No newline at end of file diff --git a/packages/deployment/docker/lightnet/docker-compose.yml b/packages/deployment/docker/lightnet/docker-compose.yml index 093f137a..0561ae97 100644 --- a/packages/deployment/docker/lightnet/docker-compose.yml +++ b/packages/deployment/docker/lightnet/docker-compose.yml @@ -12,5 +12,4 @@ services: - 8080:8080 - 8181:8181 # archive endpoints - - 5432:5432 - 8282:8282 \ No newline at end of file diff --git a/packages/deployment/package.json b/packages/deployment/package.json index 6ec47ff0..dbe75ebe 100644 --- a/packages/deployment/package.json +++ b/packages/deployment/package.json @@ -8,7 +8,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch" }, diff --git a/packages/indexer/package.json b/packages/indexer/package.json index 29f2dbae..1d7ae2eb 100644 --- a/packages/indexer/package.json +++ b/packages/indexer/package.json @@ -9,7 +9,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./src/** ./test/**", "test:watch": "npm run test:file -- ./src/** ./test/** --watch", "prisma:generate": "prisma generate --schema=./prisma/schema.prisma", diff --git a/packages/library/package.json b/packages/library/package.json index 9ae8be84..64cb87ae 100644 --- a/packages/library/package.json +++ b/packages/library/package.json @@ -8,7 +8,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch" }, diff --git a/packages/module/package.json b/packages/module/package.json index b765a91c..4f39c5a0 100644 --- a/packages/module/package.json +++ b/packages/module/package.json @@ -8,7 +8,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch" }, diff --git a/packages/persistance/package.json b/packages/persistance/package.json index da280b51..3d799351 100644 --- a/packages/persistance/package.json +++ b/packages/persistance/package.json @@ -7,10 +7,10 @@ "scripts": { "build": "npm run prisma:generate && tsc -p tsconfig.json", "prisma:generate": "npx prisma generate", - "prisma-migrate": "npx prisma migrate deploy", + "prisma:migrate": "npx prisma migrate deploy", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test ./test-integration", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:integration": "npm run test:file -- ./test-integration/** --runInBand", "test:watch": "npm run test:file -- ./test/** --watch" diff --git a/packages/processor/package.json b/packages/processor/package.json index c0707480..23f147dd 100644 --- a/packages/processor/package.json +++ b/packages/processor/package.json @@ -13,7 +13,7 @@ "pretest": "npm run pre", "pre": "npm run prisma:generate", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "prisma:generate": "prisma generate --schema=./test/prisma/schema.prisma", "test": "npm run test:file -- ./src/** ./test/**", "test:watch": "npm run test:file -- ./src/** ./test/** --watch" diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 6df98d91..5561e085 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -8,7 +8,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch" }, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index ae7f356b..6c589d31 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -8,7 +8,7 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch" }, diff --git a/packages/sequencer/package.json b/packages/sequencer/package.json index aae588dd..0495ba2c 100644 --- a/packages/sequencer/package.json +++ b/packages/sequencer/package.json @@ -8,11 +8,11 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --stack-size=1728 --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch", "integration": "npm run test:file -- ./test-integration/** --runInBand", - "start": "npm run build && node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads --es-module-specifier-resolution=node ./dist/src/entry.js" + "start": "npm run build && node --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node ./dist/src/entry.js" }, "main": "dist/index.js", "publishConfig": { diff --git a/packages/sequencer/src/mempool/private/PrivateMempool.ts b/packages/sequencer/src/mempool/private/PrivateMempool.ts index 706ae2b8..5eae55d6 100644 --- a/packages/sequencer/src/mempool/private/PrivateMempool.ts +++ b/packages/sequencer/src/mempool/private/PrivateMempool.ts @@ -95,6 +95,7 @@ export class PrivateMempool extends SequencerModule implements Mempool { public async getTxs(): Promise { const txs = await this.transactionStorage.getPendingUserTransactions(); + const executionContext = container.resolve( RuntimeMethodExecutionContext ); @@ -103,6 +104,7 @@ export class PrivateMempool extends SequencerModule implements Mempool { const networkState = (await this.getStagedNetworkState()) ?? NetworkState.empty(); + log.time("checkTxValid"); const sortedTxs = await this.checkTxValid( txs, baseCachedStateService, @@ -110,6 +112,7 @@ export class PrivateMempool extends SequencerModule implements Mempool { networkState, executionContext ); + log.timeEnd("checkTxValid"); this.protocol.stateServiceProvider.popCurrentStateService(); return sortedTxs; } diff --git a/packages/sequencer/src/protocol/production/sequencing/BlockProducerModule.ts b/packages/sequencer/src/protocol/production/sequencing/BlockProducerModule.ts index aabda28c..ea8dbd4e 100644 --- a/packages/sequencer/src/protocol/production/sequencing/BlockProducerModule.ts +++ b/packages/sequencer/src/protocol/production/sequencing/BlockProducerModule.ts @@ -97,7 +97,9 @@ export class BlockProducerModule extends SequencerModule { public async tryProduceBlock(): Promise { if (!this.productionInProgress) { try { + log.time("produceBlock"); const block = await this.produceBlock(); + log.timeEnd("produceBlock"); if (block === undefined) { if (!this.allowEmptyBlock()) { @@ -115,6 +117,7 @@ export class BlockProducerModule extends SequencerModule { // Generate metadata for next block + log.time("produceBlockResult"); // TODO: make async of production in the future const result = await this.executionService.generateMetadataForNextBlock( block, @@ -122,6 +125,7 @@ export class BlockProducerModule extends SequencerModule { this.blockTreeStore, true ); + log.timeEnd("produceBlockResult"); return { block, @@ -144,9 +148,13 @@ export class BlockProducerModule extends SequencerModule { txs: PendingTransaction[]; metadata: BlockWithResult; }> { + log.time("collectProductionData > getTxs"); const txs = await this.mempool.getTxs(); + log.timeEnd("collectProductionData > getTxs"); + log.time("collectProductionData > getLatestBlock"); const parentBlock = await this.blockQueue.getLatestBlock(); + log.timeEnd("collectProductionData > getLatestBlock"); if (parentBlock === undefined) { log.debug( @@ -154,11 +162,16 @@ export class BlockProducerModule extends SequencerModule { ); } + log.time("collectProductionData > getMessages"); const messages = await this.messageStorage.getMessages( parentBlock?.block.toMessagesHash.toString() ?? ACTIONS_EMPTY_HASH.toString() ); + log.time("collectProductionData > getMessages"); + + log.time("collectProductionData > determine parent block"); const metadata = parentBlock ?? BlockWithResult.createEmpty(); + log.timeEnd("collectProductionData > determine parent block"); log.debug( `Block collected, ${txs.length} txs, ${messages.length} messages` @@ -173,7 +186,9 @@ export class BlockProducerModule extends SequencerModule { private async produceBlock(): Promise { this.productionInProgress = true; + log.time("collectProductionData"); const { txs, metadata } = await this.collectProductionData(); + log.timeEnd("collectProductionData"); // Skip production if no transactions are available for now if (txs.length === 0 && !this.allowEmptyBlock()) { @@ -184,14 +199,18 @@ export class BlockProducerModule extends SequencerModule { this.unprovenStateService ); + log.time("createBlock"); const block = await this.executionService.createBlock( cachedStateService, txs, metadata, this.allowEmptyBlock() ); + log.timeEnd("createBlock"); + log.time("mergeIntoParent"); await cachedStateService.mergeIntoParent(); + log.timeEnd("mergeIntoParent"); this.productionInProgress = false; diff --git a/packages/sequencer/src/protocol/production/sequencing/TransactionExecutionService.ts b/packages/sequencer/src/protocol/production/sequencing/TransactionExecutionService.ts index dae2a7b7..ef460f74 100644 --- a/packages/sequencer/src/protocol/production/sequencing/TransactionExecutionService.ts +++ b/packages/sequencer/src/protocol/production/sequencing/TransactionExecutionService.ts @@ -241,6 +241,7 @@ export class TransactionExecutionService { Field(lastBlock.toMessagesHash) ); + log.time("createBlock > beforeBlock"); // Get used networkState by executing beforeBlock() hooks const networkState = await this.blockHooks.reduce>( async (reduceNetworkState, hook) => @@ -254,9 +255,11 @@ export class TransactionExecutionService { }), Promise.resolve(lastResult.afterNetworkState) ); + log.timeEnd("createBlock > beforeBlock"); for (const [, tx] of transactions.entries()) { try { + log.time("createBlock > createExecutionTrace"); // Create execution trace // eslint-disable-next-line no-await-in-loop const executionTrace = await this.createExecutionTrace( @@ -264,9 +267,11 @@ export class TransactionExecutionService { tx, networkState ); + log.timeEnd("createBlock > createExecutionTrace"); // Push result to results and transaction onto bundle-hash executionResults.push(executionTrace); + log.time("createBlock > push transactionsHashList"); if (!tx.isMessage) { transactionsHashList.push(tx.hash()); eternalTransactionsHashList.push(tx.hash()); @@ -277,6 +282,7 @@ export class TransactionExecutionService { incomingMessagesList.push(actionHash); } + log.timeEnd("createBlock > push transactionsHashList"); } catch (error) { if (error instanceof Error) { log.error("Error in inclusion of tx, skipping", error); @@ -357,10 +363,12 @@ export class TransactionExecutionService { // TODO This can be optimized a lot (we are only interested in the root at this step) await blockHashInMemoryStore.preloadKey(block.height.toBigInt()); + log.time("generateMetadataForNextBlock > setLeaf"); Object.entries(combinedDiff).forEach(([key, state]) => { const treeValue = state !== undefined ? Poseidon.hash(state) : Field(0); tree.setLeaf(BigInt(key), treeValue); }); + log.timeEnd("generateMetadataForNextBlock > setLeaf"); const stateRoot = tree.getRoot(); const fromBlockHashRoot = blockHashTree.getRoot(); @@ -451,10 +459,12 @@ export class TransactionExecutionService { // The following steps generate and apply the correct STs with the right values this.stateServiceProvider.setCurrentStateService(recordingStateService); + log.time("createExecutionTrace > executeProtocolHooks"); const protocolResult = await this.executeProtocolHooks( runtimeContextInputs, blockContextInputs ); + log.timeEnd("createExecutionTrace > executeProtocolHooks"); if (!protocolResult.status.toBoolean()) { const error = new Error( @@ -476,16 +486,20 @@ export class TransactionExecutionService { ) ); + log.time("createExecutionTrace > applyStateTransitions"); // Apply protocol STs await recordingStateService.applyStateTransitions( protocolResult.stateTransitions ); + log.timeEnd("createExecutionTrace > applyStateTransitions"); + log.time("executeRuntimeMethod"); const runtimeResult = await this.executeRuntimeMethod( method, args, runtimeContextInputs ); + log.timeEnd("executeRuntimeMethod"); log.trace( "STs:", JSON.stringify( diff --git a/packages/sequencer/src/protocol/production/trigger/BlockTrigger.ts b/packages/sequencer/src/protocol/production/trigger/BlockTrigger.ts index 4a1862cb..53571b3e 100644 --- a/packages/sequencer/src/protocol/production/trigger/BlockTrigger.ts +++ b/packages/sequencer/src/protocol/production/trigger/BlockTrigger.ts @@ -70,6 +70,7 @@ export class BlockTriggerBase< ): Promise { const block = await this.blockProducerModule.tryProduceBlock(); + log.time("pushBlock & pushResult"); if (block && enqueueInSettlementQueue) { await this.blockQueue.pushBlock(block.block); this.events.emit("block-produced", block.block); @@ -77,6 +78,7 @@ export class BlockTriggerBase< await this.blockQueue.pushResult(block.result); this.events.emit("block-metadata-produced", block); } + log.timeEnd("pushBlock & pushResult"); return block; } diff --git a/packages/sequencer/src/protocol/production/trigger/ManualBlockTrigger.ts b/packages/sequencer/src/protocol/production/trigger/ManualBlockTrigger.ts index 2a8b755f..df8fba4d 100644 --- a/packages/sequencer/src/protocol/production/trigger/ManualBlockTrigger.ts +++ b/packages/sequencer/src/protocol/production/trigger/ManualBlockTrigger.ts @@ -1,5 +1,5 @@ import { inject } from "tsyringe"; -import { injectOptional } from "@proto-kit/common"; +import { injectOptional, log } from "@proto-kit/common"; import { sequencerModule } from "../../../sequencer/builder/SequencerModule"; import { SettleableBatch } from "../../../storage/model/Batch"; @@ -65,7 +65,10 @@ export class ManualBlockTrigger public async produceBlock( enqueueInSettlementQueue: boolean = true ): Promise { - return await super.produceBlock(enqueueInSettlementQueue); + log.time("trigger.produceBlock"); + const block = await super.produceBlock(enqueueInSettlementQueue); + log.timeEnd("trigger.produceBlock"); + return block; } public async produceBlockWithResult( diff --git a/packages/sequencer/test-integration/tps.test.ts b/packages/sequencer/test-integration/tps.test.ts new file mode 100644 index 00000000..d20beb8e --- /dev/null +++ b/packages/sequencer/test-integration/tps.test.ts @@ -0,0 +1,291 @@ +import "reflect-metadata"; +import { + AppChain, + BlockStorageNetworkStateModule, + InMemorySigner, + InMemoryTransactionSender, + StateServiceQueryModule, +} from "@proto-kit/sdk"; +import { + Runtime, + runtimeMethod, + runtimeModule, + state, +} from "@proto-kit/module"; +import { Protocol, State } from "@proto-kit/protocol"; +import { + Balance, + VanillaProtocolModules, + VanillaRuntimeModules, + Balances as BaseBalances, + TokenId, +} from "@proto-kit/library"; +import { PrismaRedisDatabase } from "@proto-kit/persistance"; +import { NoConfig, log } from "@proto-kit/common"; +import { PrivateKey, PublicKey } from "o1js"; + +import { + BlockProducerModule, + DatabasePruneModule, + LocalTaskQueue, + ManualBlockTrigger, + Sequencer, +} from "../src"; +// we import PrivateMempool from dist to satisfy constraints of InMemoryTransactionSender +import { PrivateMempool } from "../dist"; + +@runtimeModule() +export class Balances extends BaseBalances { + @state() public circulatingSupply = State.from(Balance); + + @runtimeMethod() + public async addBalance( + tokenId: TokenId, + address: PublicKey, + amount: Balance + ): Promise { + await this.mint(tokenId, address, amount); + } +} + +export async function duration(cb: () => Promise) { + const startTime = performance.now(); + const result = await cb(); + + return { + duration: performance.now() - startTime, + result, + }; +} + +export async function createAppChain() { + const appChain = AppChain.from({ + Runtime: Runtime.from({ + modules: VanillaRuntimeModules.with({ + Balances, + }), + }), + Protocol: Protocol.from({ + modules: VanillaProtocolModules.with({}), + }), + Sequencer: Sequencer.from({ + modules: { + Database: PrismaRedisDatabase, + Mempool: PrivateMempool, + BlockProducerModule: BlockProducerModule, + TaskQueue: LocalTaskQueue, + DatabasePruneModule: DatabasePruneModule, + BlockTrigger: ManualBlockTrigger, + }, + }), + modules: { + Signer: InMemorySigner, + TransactionSender: InMemoryTransactionSender, + QueryTransportModule: StateServiceQueryModule, + NetworkStateTransportModule: BlockStorageNetworkStateModule, + }, + }); + + appChain.configure({ + Runtime: { + Balances: {}, + }, + Protocol: { + ...VanillaProtocolModules.defaultConfig(), + }, + Sequencer: { + DatabasePruneModule: { + pruneOnStartup: false, + }, + Database: { + redis: { + host: "localhost", + port: 6379, + password: "password", + }, + prisma: { + connection: + "postgresql://admin:password@localhost:5432/protokit?schema=public", + }, + }, + BlockProducerModule: {}, + BlockTrigger: {}, + Mempool: {}, + TaskQueue: {}, + }, + Signer: { + signer: PrivateKey.random(), + }, + QueryTransportModule: {}, + TransactionSender: {}, + NetworkStateTransportModule: {}, + }); + + await appChain.start(); + + return appChain; +} + +const timeout = 600000; + +// TODO: make this run in CI +// run this first in stack: +// docker compose up --build +// and then from sequencer: +// npx dotenv-cli -e ./../stack/.env -- npm run prisma:migrate +describe("tps", () => { + let appChain: Awaited>; + let privateKeys: PrivateKey[] = []; + let balances: Balances; + + async function mint(signer: PrivateKey, amount: number, nonce: number = 0) { + appChain.resolve("Signer").config.signer = signer; + + const address = signer.toPublicKey(); + const tx = await appChain.transaction( + address, + async () => { + await balances.addBalance( + TokenId.from(0), + address, + Balance.from(amount) + ); + }, + { + nonce, + } + ); + + await tx.sign(); + await tx.send(); + } + + async function fundKeys(totalKeys: number) { + const batchSize = 20; + + for (let i = 0; i < totalKeys / batchSize; i++) { + for (let j = 0; j < batchSize; j++) { + const privateKey = PrivateKey.random(); + privateKeys.push(privateKey); + await mint(privateKey, 100_000); + } + await appChain.sequencer.resolve("BlockTrigger").produceBlock(); + } + } + + beforeEach(async () => { + appChain = await createAppChain(); + + const db = appChain.sequencer.resolve("Database"); + await db.pruneDatabase(); + + balances = appChain.runtime.resolve("Balances"); + + await fundKeys(200); + // log.enableTiming(); + }, timeout); + + it("should produce an empty block", async () => { + const produceBlockDuration = await duration(async () => { + return await appChain.sequencer.resolve("BlockTrigger").produceBlock(); + }); + + expect(produceBlockDuration.duration).toBeLessThan(200); + }); + + it( + "should produce a block with unique txs", + async () => { + console.log("should produce a block with unique txs"); + const transactionCount = 100; + for (let i = 0; i < transactionCount; i++) { + const fromPrivateKey = privateKeys[0]; + const toPrivateKey = privateKeys[1]; + privateKeys.splice(0, 2); + + appChain.resolve("Signer").config.signer = fromPrivateKey; + + const from = fromPrivateKey.toPublicKey(); + const to = toPrivateKey.toPublicKey(); + + const tx = await appChain.transaction( + from, + // eslint-disable-next-line @typescript-eslint/no-loop-func + async () => { + await balances.transferSigned( + TokenId.from(0), + from, + to, + Balance.from(1) + ); + } + ); + + await tx.sign(); + await tx.send(); + } + + const produceBlockDuration = await duration(async () => { + return await appChain.sequencer.resolve("BlockTrigger").produceBlock(); + }); + + console.log("txs", produceBlockDuration.result?.transactions.length); + + const tps = transactionCount / (produceBlockDuration.duration / 1000); + + console.log("duration multiple txs", produceBlockDuration.duration); + console.log("tps with state unique txs", tps); + + expect(tps).toBeGreaterThan(2.5); + }, + timeout + ); + + it("should produce a block with state cachable txs", async () => { + const transactionCount = 100; + + const fromPrivateKey = privateKeys[0]; + const from = fromPrivateKey.toPublicKey(); + const toPrivateKey = privateKeys[1]; + const to = toPrivateKey.toPublicKey(); + + appChain.resolve("Signer").config.signer = fromPrivateKey; + + for (let i = 0; i < transactionCount; i++) { + const tx = await appChain.transaction( + from, + // eslint-disable-next-line @typescript-eslint/no-loop-func + async () => { + await balances.transferSigned( + TokenId.from(0), + from, + to, + Balance.from(1) + ); + }, + { nonce: i } + ); + + await tx.sign(); + await tx.send(); + } + + const produceBlockDuration = await duration(async () => { + return await appChain.sequencer.resolve("BlockTrigger").produceBlock(); + }); + + const tps = transactionCount / (produceBlockDuration.duration / 1000); + + console.log("duration multiple txs", produceBlockDuration.duration); + console.log("tps with state cachable txs", tps); + + expect(tps).toBeGreaterThan(10); + }, 600000); + + afterEach(async () => { + privateKeys = []; + log.disableTiming(); + const db = appChain.sequencer.resolve("Database"); + await db.close(); + }); +}); diff --git a/packages/stack/.env b/packages/stack/.env index 0be8564d..adbc02bb 100644 --- a/packages/stack/.env +++ b/packages/stack/.env @@ -1,8 +1,10 @@ -COMPOSE_PROFILES=simple-sequencer,db,worker +# COMPOSE_PROFILES=simple-sequencer,db,worker +COMPOSE_PROFILES=db ## Database ## POSTGRES_URL='postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${POSTGRES_DB}?schema=public' POSTGRES_URL=postgresql://admin:password@protokit-postgres:5432/protokit?schema=public +DATABASE_URL=postgresql://admin:password@localhost:5432/protokit?schema=public POSTGRES_PASSWORD=password POSTGRES_USER=admin diff --git a/packages/stack/package.json b/packages/stack/package.json index baf488f9..16e8a268 100644 --- a/packages/stack/package.json +++ b/packages/stack/package.json @@ -8,11 +8,11 @@ "build": "tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch", "lint": "eslint ./src ./test", - "test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js", + "test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch", - "graphql": "npm run build && node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads --es-module-specifier-resolution=node ./dist/src/scripts/graphql/run-graphql.js", - "start": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads --es-module-specifier-resolution=node ./dist/start.js" + "graphql": "npm run build && node --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node ./dist/src/scripts/graphql/run-graphql.js", + "start": "node --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node ./dist/start.js" }, "main": "dist/index.js", "publishConfig": { From adb1d969b06cdf6d0301130977f00567e576e642 Mon Sep 17 00:00:00 2001 From: Matej Sima Date: Fri, 8 Nov 2024 10:59:04 +0100 Subject: [PATCH 4/4] update sequencer integration test command to match CI --- .github/workflows/pull-request-develop.yml | 1 + packages/sequencer/package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-develop.yml b/.github/workflows/pull-request-develop.yml index 402771cf..b7e306e7 100644 --- a/.github/workflows/pull-request-develop.yml +++ b/.github/workflows/pull-request-develop.yml @@ -101,6 +101,7 @@ jobs: REDIS_URL: localhost REDIS_CI: true DATABASE_URL: "postgresql://admin:password@localhost:5432/protokit?schema=public" + INDEXER_DATABASE_URL: "postgresql://admin:password@localhost:5432/protokit?schema=public" services: postgres: diff --git a/packages/sequencer/package.json b/packages/sequencer/package.json index 0495ba2c..6b64bbea 100644 --- a/packages/sequencer/package.json +++ b/packages/sequencer/package.json @@ -11,7 +11,7 @@ "test:file": "node --stack-size=1728 --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js", "test": "npm run test:file -- ./test/**", "test:watch": "npm run test:file -- ./test/** --watch", - "integration": "npm run test:file -- ./test-integration/** --runInBand", + "test:integration": "npm run test:file -- ./test-integration/** --runInBand", "start": "npm run build && node --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node ./dist/src/entry.js" }, "main": "dist/index.js",