From 90ae79810643e128ea2bbe61ff10aaa1173ccb7c Mon Sep 17 00:00:00 2001 From: marie-fourier Date: Tue, 25 Jul 2023 16:56:47 +0500 Subject: [PATCH 1/2] make receipt lookup range configurable --- packages/executor/src/config.ts | 1 + packages/executor/src/interfaces.ts | 5 +++++ packages/executor/src/modules/eth.ts | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/executor/src/config.ts b/packages/executor/src/config.ts index fc14aa27..b37a70a0 100644 --- a/packages/executor/src/config.ts +++ b/packages/executor/src/config.ts @@ -112,6 +112,7 @@ const bundlerDefaultConfigs: BundlerConfig = { estimationBaseFeeDivisor: 25, estimationStaticBuffer: 21000, validationGasLimit: 10e6, + receiptLookupRange: 1024, }; const RELAYER_ENV = (network: NetworkName): string | undefined => diff --git a/packages/executor/src/interfaces.ts b/packages/executor/src/interfaces.ts index 00e80c01..a761ebbc 100644 --- a/packages/executor/src/interfaces.ts +++ b/packages/executor/src/interfaces.ts @@ -106,7 +106,12 @@ export interface NetworkConfig { // 21000 by default estimationStaticBuffer: number; // gas limit during simulateHandleOps and simulateValidation calls + // default = 10e6 validationGasLimit: number; + // limits the block range of getUserOperationByHash and getUserOperationReceipt + // if requests to those endpoints are timing out, reduce this value + // default = 1024 + receiptLookupRange: number; } export type BundlerConfig = Omit< diff --git a/packages/executor/src/modules/eth.ts b/packages/executor/src/modules/eth.ts index 1979ed94..11fbb492 100644 --- a/packages/executor/src/modules/eth.ts +++ b/packages/executor/src/modules/eth.ts @@ -413,7 +413,7 @@ export class Eth { const contract = EntryPoint__factory.connect(addr, this.provider); try { const blockNumber = await this.provider.getBlockNumber(); - let fromBlockNumber = blockNumber - 15000; // limit query to 15k blocks, otherwise it throw timeout error + let fromBlockNumber = blockNumber - this.config.receiptLookupRange; // underflow check if (fromBlockNumber < 0) { fromBlockNumber = blockNumber; From 27a59d3fa1b414a98f0e2ebd346eb453ad736985 Mon Sep 17 00:00:00 2001 From: marie-fourier Date: Tue, 25 Jul 2023 16:57:36 +0500 Subject: [PATCH 2/2] chore(release): v0.0.20 --- lerna.json | 2 +- package.json | 2 +- packages/api/package.json | 6 +++--- packages/cli/package.json | 10 +++++----- packages/db/package.json | 4 ++-- packages/executor/package.json | 6 +++--- packages/params/package.json | 4 ++-- packages/types/package.json | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lerna.json b/lerna.json index fa6ed85d..1e1c3962 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,7 @@ ], "npmClient": "yarn", "useWorkspaces": true, - "version": "0.0.19", + "version": "0.0.20", "stream": "true", "command": { "version": { diff --git a/package.json b/package.json index 0e9b6110..2e20bc63 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "root", "private": true, - "version": "0.0.19", + "version": "0.0.20", "engines": { "node": ">=18.0.0" }, diff --git a/packages/api/package.json b/packages/api/package.json index 7878679b..300e22bc 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "api", - "version": "0.0.19", + "version": "0.0.20", "description": "The API module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -35,12 +35,12 @@ "class-transformer": "0.5.1", "class-validator": "0.14.0", "ethers": "5.7.2", - "executor": "^0.0.19", + "executor": "^0.0.20", "fastify": "4.14.1", "pino": "8.11.0", "pino-pretty": "10.0.0", "reflect-metadata": "0.1.13", - "types": "^0.0.19" + "types": "^0.0.20" }, "devDependencies": { "@types/connect": "3.4.35" diff --git a/packages/cli/package.json b/packages/cli/package.json index aac445c4..76896c82 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "cli", - "version": "0.0.19", + "version": "0.0.20", "description": "> TODO: description", "author": "zincoshine ", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -31,13 +31,13 @@ "url": "https://https://github.com/etherspot/skandha/issues" }, "dependencies": { - "api": "^0.0.19", - "db": "^0.0.19", - "executor": "^0.0.19", + "api": "^0.0.20", + "db": "^0.0.20", + "executor": "^0.0.20", "find-up": "5.0.0", "got": "12.5.3", "js-yaml": "4.1.0", - "types": "^0.0.19", + "types": "^0.0.20", "yargs": "17.6.2" }, "devDependencies": { diff --git a/packages/db/package.json b/packages/db/package.json index bdacdb7e..26ff3c15 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "db", - "version": "0.0.19", + "version": "0.0.20", "description": "The DB module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://github.com/etherspot/etherspot-bundler#readme", @@ -37,6 +37,6 @@ "devDependencies": { "@types/rocksdb": "3.0.1", "prettier": "^2.8.4", - "types": "^0.0.19" + "types": "^0.0.20" } } diff --git a/packages/executor/package.json b/packages/executor/package.json index 400ed917..eaf53fe4 100644 --- a/packages/executor/package.json +++ b/packages/executor/package.json @@ -1,6 +1,6 @@ { "name": "executor", - "version": "0.0.19", + "version": "0.0.20", "description": "The Relayer module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -33,7 +33,7 @@ "dependencies": { "async-mutex": "0.4.0", "ethers": "5.7.2", - "params": "^0.0.19", - "types": "^0.0.19" + "params": "^0.0.20", + "types": "^0.0.20" } } diff --git a/packages/params/package.json b/packages/params/package.json index 1d5cff5e..130b7b0e 100644 --- a/packages/params/package.json +++ b/packages/params/package.json @@ -1,6 +1,6 @@ { "name": "params", - "version": "0.0.19", + "version": "0.0.20", "description": "Various bundler parameters", "author": "Etherspot", "homepage": "https://github.com/etherspot/skandha#readme", @@ -24,7 +24,7 @@ "@arbitrum/sdk": "3.1.4", "@eth-optimism/sdk": "3.0.0", "ethers": "5.7.2", - "types": "^0.0.19" + "types": "^0.0.20" }, "scripts": { "clean": "rm -rf lib && rm -f *.tsbuildinfo", diff --git a/packages/types/package.json b/packages/types/package.json index 9aa3afe8..0c30cc59 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "types", - "version": "0.0.19", + "version": "0.0.20", "description": "The types of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme",