diff --git a/lerna.json b/lerna.json index 94ed2541..e845c700 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,7 @@ ], "npmClient": "yarn", "useWorkspaces": true, - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "stream": "true", "command": { "version": { diff --git a/package.json b/package.json index 53dd9d45..8d969090 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "root", "private": true, - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "engines": { "node": ">=18.0.0" }, diff --git a/packages/api/package.json b/packages/api/package.json index fba01a47..12d4140d 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "api", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "The API module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -35,13 +35,13 @@ "class-transformer": "0.5.1", "class-validator": "0.14.0", "ethers": "5.7.2", - "executor": "^1.0.40-alpha", + "executor": "^1.0.41-alpha", "fastify": "4.14.1", - "monitoring": "^1.0.40-alpha", + "monitoring": "^1.0.41-alpha", "pino": "8.11.0", "pino-pretty": "10.0.0", "reflect-metadata": "0.1.13", - "types": "^1.0.40-alpha" + "types": "^1.0.41-alpha" }, "devDependencies": { "@types/connect": "3.4.35" diff --git a/packages/cli/package.json b/packages/cli/package.json index bcffb068..ab4e913e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "cli", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "> TODO: description", "author": "zincoshine ", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -38,15 +38,15 @@ "@libp2p/peer-id-factory": "2.0.1", "@libp2p/prometheus-metrics": "1.1.3", "@multiformats/multiaddr": "12.1.3", - "api": "^1.0.40-alpha", - "db": "^1.0.40-alpha", - "executor": "^1.0.40-alpha", + "api": "^1.0.41-alpha", + "db": "^1.0.41-alpha", + "executor": "^1.0.41-alpha", "find-up": "5.0.0", "got": "12.5.3", "js-yaml": "4.1.0", - "monitoring": "^1.0.40-alpha", - "node": "^1.0.40-alpha", - "types": "^1.0.40-alpha", + "monitoring": "^1.0.41-alpha", + "node": "^1.0.41-alpha", + "types": "^1.0.41-alpha", "yargs": "17.6.2" }, "devDependencies": { diff --git a/packages/db/package.json b/packages/db/package.json index d7d34e8d..c665e49b 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "db", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "The DB module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://github.com/etherspot/etherspot-bundler#readme", @@ -33,7 +33,7 @@ "dependencies": { "@chainsafe/ssz": "0.10.1", "@farcaster/rocksdb": "5.5.0", - "types": "^1.0.40-alpha" + "types": "^1.0.41-alpha" }, "devDependencies": { "@types/rocksdb": "3.0.1", diff --git a/packages/executor/package.json b/packages/executor/package.json index 8b145697..89ae23f6 100644 --- a/packages/executor/package.json +++ b/packages/executor/package.json @@ -1,6 +1,6 @@ { "name": "executor", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "The Relayer module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -34,8 +34,8 @@ "@flashbots/ethers-provider-bundle": "0.6.2", "async-mutex": "0.4.0", "ethers": "5.7.2", - "monitoring": "^1.0.40-alpha", - "params": "^1.0.40-alpha", - "types": "^1.0.40-alpha" + "monitoring": "^1.0.41-alpha", + "params": "^1.0.41-alpha", + "types": "^1.0.41-alpha" } } diff --git a/packages/executor/src/services/BundlingService/relayers/base.ts b/packages/executor/src/services/BundlingService/relayers/base.ts index d38faf0f..418c9dd0 100644 --- a/packages/executor/src/services/BundlingService/relayers/base.ts +++ b/packages/executor/src/services/BundlingService/relayers/base.ts @@ -105,6 +105,7 @@ export abstract class BaseRelayer implements IRelayingMode { } else { // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (failedEntry) { + this.logger.debug(`${failedEntry.hash} reverted on chain. Deleting...`); await this.mempoolService.remove(failedEntry); this.logger.error( `Failed handleOps sender=${failedEntry.userOp.sender}` diff --git a/packages/executor/src/services/BundlingService/relayers/classic.ts b/packages/executor/src/services/BundlingService/relayers/classic.ts index 036318db..2596c512 100644 --- a/packages/executor/src/services/BundlingService/relayers/classic.ts +++ b/packages/executor/src/services/BundlingService/relayers/classic.ts @@ -123,6 +123,11 @@ export class ClassicRelayer extends BaseRelayer { // some chains, like Bifrost, don't allow setting gasLimit in estimateGas await relayer.estimateGas(txWithoutGasLimit); } catch (err) { + this.logger.debug( + `${entries + .map((entry) => entry.userOpHash) + .join("; ")} failed on chain estimation. deleting...` + ); this.logger.error(err); await this.mempoolService.removeAll(entries); this.reportFailedBundle(); @@ -166,8 +171,14 @@ export class ClassicRelayer extends BaseRelayer { } else { await relayer .sendTransaction(transaction) + .then(async ({ hash }) => { + this.logger.debug(`Bundle submitted: ${hash}`); + this.logger.debug( + `User op hashes ${entries.map((entry) => entry.userOpHash)}` + ); + await this.mempoolService.removeAll(entries); + }) .catch((err: any) => this.handleUserOpFail(entries, err)); - await this.mempoolService.removeAll(entries); } }); } diff --git a/packages/executor/src/services/BundlingService/relayers/flashbots.ts b/packages/executor/src/services/BundlingService/relayers/flashbots.ts index 7734f6c0..b20f59b7 100644 --- a/packages/executor/src/services/BundlingService/relayers/flashbots.ts +++ b/packages/executor/src/services/BundlingService/relayers/flashbots.ts @@ -84,6 +84,11 @@ export class FlashbotsRelayer extends BaseRelayer { // checking for tx revert await relayer.estimateGas(transactionRequest); } catch (err) { + this.logger.debug( + `${entries + .map((entry) => entry.userOpHash) + .join("; ")} failed on chain estimation. deleting...` + ); this.logger.error(err); await this.mempoolService.removeAll(entries); this.reportFailedBundle(); diff --git a/packages/executor/src/services/BundlingService/relayers/merkle.ts b/packages/executor/src/services/BundlingService/relayers/merkle.ts index 37fef4e0..53347f04 100644 --- a/packages/executor/src/services/BundlingService/relayers/merkle.ts +++ b/packages/executor/src/services/BundlingService/relayers/merkle.ts @@ -99,6 +99,11 @@ export class MerkleRelayer extends BaseRelayer { // checking for tx revert await relayer.estimateGas(transactionRequest); } catch (err) { + this.logger.debug( + `${entries + .map((entry) => entry.userOpHash) + .join("; ")} failed on chain estimation. deleting...` + ); this.logger.error(err); await this.mempoolService.removeAll(entries); return; diff --git a/packages/executor/src/services/BundlingService/service.ts b/packages/executor/src/services/BundlingService/service.ts index 6d8151a1..da128665 100644 --- a/packages/executor/src/services/BundlingService/service.ts +++ b/packages/executor/src/services/BundlingService/service.ts @@ -148,7 +148,11 @@ export class BundlingService { if (this.networkConfig.enforceGasPrice) { let { maxPriorityFeePerGas, maxFeePerGas } = gasFee; const { enforceGasPriceThreshold } = this.networkConfig; - if (chainsWithoutEIP1559.some((chainId) => chainId === this.chainId)) { + if ( + chainsWithoutEIP1559.some( + (chainId: number) => chainId === this.chainId + ) + ) { maxFeePerGas = maxPriorityFeePerGas = gasFee.gasPrice; } // userop max fee per gas = userop.maxFee * (100 + threshold) / 100; @@ -188,7 +192,9 @@ export class BundlingService { if (!entity) continue; const status = await this.reputationService.getStatus(entity); if (status === ReputationStatus.BANNED) { - this.logger.debug(`Removing banned ${title} - ${entity}`); + this.logger.debug( + `${title} - ${entity} is banned. Deleting userop ${entry.userOpHash}...` + ); await this.mempoolService.remove(entry); continue; } else if ( @@ -224,7 +230,9 @@ export class BundlingService { entry.hash ); } catch (e: any) { - this.logger.debug(`failed 2nd validation: ${e.message}`); + this.logger.debug( + `${entry.userOpHash} failed 2nd validation: ${e.message}. Deleting...` + ); await this.mempoolService.remove(entry); continue; } @@ -370,7 +378,10 @@ export class BundlingService { ); if (invalidEntries.length > 0) { this.logger.debug( - `Found ${invalidEntries.length} problematic user ops, deleting...` + `Found ${invalidEntries.length} that reached max submit attemps, deleting them...` + ); + this.logger.debug( + invalidEntries.map((entry) => entry.userOpHash).join("; ") ); await this.mempoolService.removeAll(invalidEntries); entries = await this.mempoolService.getNewEntriesSorted( diff --git a/packages/monitoring/package.json b/packages/monitoring/package.json index 60d2c4e9..28539d48 100644 --- a/packages/monitoring/package.json +++ b/packages/monitoring/package.json @@ -1,6 +1,6 @@ { "name": "monitoring", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "The Monitoring module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://github.com/etherspot/etherspot-bundler#readme", @@ -32,6 +32,6 @@ }, "dependencies": { "prom-client": "15.1.0", - "types": "^1.0.40-alpha" + "types": "^1.0.41-alpha" } } diff --git a/packages/node/package.json b/packages/node/package.json index 0c55e2bf..32d9cdfb 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "node", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "The bundler node module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -56,25 +56,25 @@ "@libp2p/tcp": "6.1.0", "@multiformats/multiaddr": "11.4.0", "abstract-leveldown": "7.2.0", - "api": "^1.0.40-alpha", + "api": "^1.0.41-alpha", "datastore-core": "8.0.1", - "db": "^1.0.40-alpha", + "db": "^1.0.41-alpha", "ethers": "5.7.2", - "executor": "^1.0.40-alpha", + "executor": "^1.0.41-alpha", "it-filter": "1.0.2", "it-map": "1.0.5", "it-sort": "1.0.0", "it-take": "1.0.1", "libp2p": "0.42.2", - "monitoring": "^1.0.40-alpha", - "params": "^1.0.40-alpha", + "monitoring": "^1.0.41-alpha", + "params": "^1.0.41-alpha", "prettier": "2.8.4", "snappy": "7.2.2", "snappyjs": "0.7.0", "stream-to-it": "0.2.4", "strict-event-emitter-types": "2.0.0", - "types": "^1.0.40-alpha", - "utils": "^1.0.40-alpha", + "types": "^1.0.41-alpha", + "utils": "^1.0.41-alpha", "varint": "6.0.0", "xxhash-wasm": "1.0.2" }, diff --git a/packages/params/package.json b/packages/params/package.json index 11775a6c..da3ec3fd 100644 --- a/packages/params/package.json +++ b/packages/params/package.json @@ -1,6 +1,6 @@ { "name": "params", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "Various bundler parameters", "author": "Etherspot", "homepage": "https://github.com/etherspot/skandha#readme", @@ -26,8 +26,8 @@ "@eth-optimism/sdk": "3.0.0", "@mantleio/sdk": "0.2.1", "ethers": "5.7.2", - "types": "^1.0.40-alpha", - "utils": "^1.0.40-alpha" + "types": "^1.0.41-alpha", + "utils": "^1.0.41-alpha" }, "scripts": { "clean": "rm -rf lib && rm -f *.tsbuildinfo", diff --git a/packages/params/src/eip1559.ts b/packages/params/src/eip1559.ts index cd4f09ab..60b30bd0 100644 --- a/packages/params/src/eip1559.ts +++ b/packages/params/src/eip1559.ts @@ -1,6 +1,5 @@ export const chainsWithoutEIP1559: number[] = [ 122, // "fuse" - 123, // "fuseSparknet" 56, // "bsc" 97, // "bscTest" 1442, // "polygonzkevm" diff --git a/packages/types/package.json b/packages/types/package.json index 40f31d83..cb77bdc3 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "types", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "The types of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", diff --git a/packages/utils/package.json b/packages/utils/package.json index 766af9a3..b3eacb40 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "utils", - "version": "1.0.40-alpha", + "version": "1.0.41-alpha", "description": "utils of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -37,6 +37,6 @@ "case": "^1.6.3", "pino": "8.11.0", "pino-pretty": "10.0.0", - "types": "^1.0.40-alpha" + "types": "^1.0.41-alpha" } }