From 67ceb0ceeed456a8b9d5bc9ea99e7ddf03c026de Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:40:45 +0000 Subject: [PATCH] prune unused flags --- src/cli/config/bundler.ts | 7 +------ src/cli/config/options.ts | 27 +-------------------------- src/rpc/validation/SafeValidator.ts | 13 ------------- src/rpc/validation/UnsafeValidator.ts | 12 ++++-------- 4 files changed, 6 insertions(+), 53 deletions(-) diff --git a/src/cli/config/bundler.ts b/src/cli/config/bundler.ts index f0524ebd..334c165d 100644 --- a/src/cli/config/bundler.ts +++ b/src/cli/config/bundler.ts @@ -32,14 +32,10 @@ export const bundlerArgsSchema = z.object({ "min-entity-stake": z.number().int().min(0), "min-entity-unstake-delay": z.number().int().min(0), - "max-bundle-wait": z.number().int().min(0), - "max-bundle-size": z.number().int().min(0), - "gas-price-bump": z .string() .transform((val) => BigInt(val)) .default("100"), - "gas-price-floor-percent": z.number().int().min(0), "gas-price-expiry": z.number().int().min(0), "gas-price-multipliers": z .string() @@ -193,8 +189,7 @@ export const debugArgsSchema = z.object({ "enable-debug-endpoints": z.boolean(), "expiration-check": z.boolean(), "dangerous-skip-user-operation-validation": z.boolean(), - "deploy-simulations-contract": z.boolean(), - tenderly: z.boolean() + "deploy-simulations-contract": z.boolean() }) export const gasEstimationArgsSchema = z.object({ diff --git a/src/cli/config/options.ts b/src/cli/config/options.ts index dc6ce2a1..9a4b9c89 100644 --- a/src/cli/config/options.ts +++ b/src/cli/config/options.ts @@ -38,19 +38,6 @@ export const bundlerOptions: CliCommandOptions = { require: true, default: 1 }, - "max-bundle-wait": { - description: "Maximum time to wait for a bundle to be submitted (ms)", - type: "number", - require: true, - default: 1000 - }, - "max-bundle-size": { - description: - "Maximum number of operations allowed in the mempool before a bundle is submitted", - type: "number", - require: true, - default: 10 - }, "safe-mode": { description: "Enable safe mode (enforcing all ERC-4337 rules)", type: "boolean", @@ -63,13 +50,6 @@ export const bundlerOptions: CliCommandOptions = { require: false, default: "100" }, - "gas-price-floor-percent": { - description: - "The minimum percentage of incoming user operation gas prices compared to the gas price used by the bundler to submit bundles", - type: "number", - require: true, - default: 101 - }, "gas-price-expiry": { description: "Maximum that the gas prices fetched using pimlico_getUserOperationGasPrice will be accepted for (seconds)", @@ -417,6 +397,7 @@ export const rpcOptions: CliCommandOptions = { "max-block-range": { description: "Max block range for getLogs calls", type: "number", + default: 2000, require: false }, "block-tag-support": { @@ -536,12 +517,6 @@ export const debugOptions: CliCommandOptions = { type: "boolean", require: true, default: true - }, - tenderly: { - description: "RPC url follows the tenderly format", - type: "boolean", - require: true, - default: false } } diff --git a/src/rpc/validation/SafeValidator.ts b/src/rpc/validation/SafeValidator.ts index d30b187f..0a6c9aa2 100644 --- a/src/rpc/validation/SafeValidator.ts +++ b/src/rpc/validation/SafeValidator.ts @@ -189,7 +189,6 @@ export class SafeValidator async getValidationResultV07({ userOperation, - queuedUserOperations, entryPoint, preCodeHashes }: { @@ -203,14 +202,6 @@ export class SafeValidator referencedContracts?: ReferencedCodeHashes } > { - if (this.config.tenderly) { - return super.getValidationResultV07({ - userOperation, - queuedUserOperations, - entryPoint - }) - } - if (preCodeHashes && preCodeHashes.addresses.length > 0) { const { hash } = await this.getCodeHashes(preCodeHashes.addresses) if (hash !== preCodeHashes.hash) { @@ -278,10 +269,6 @@ export class SafeValidator storageMap: StorageMap } > { - if (this.config.tenderly) { - return super.getValidationResultV06({ userOperation, entryPoint }) - } - if (preCodeHashes && preCodeHashes.addresses.length > 0) { const { hash } = await this.getCodeHashes(preCodeHashes.addresses) if (hash !== preCodeHashes.hash) { diff --git a/src/rpc/validation/UnsafeValidator.ts b/src/rpc/validation/UnsafeValidator.ts index 6cf883c6..0f8f14e0 100644 --- a/src/rpc/validation/UnsafeValidator.ts +++ b/src/rpc/validation/UnsafeValidator.ts @@ -21,7 +21,6 @@ import { type UserOperation, ValidationErrors, type ValidationResultWithAggregation, - entryPointErrorsSchema, entryPointExecutionErrorSchemaV06, entryPointExecutionErrorSchemaV07 } from "@alto/types" @@ -79,8 +78,7 @@ export class UnsafeValidator implements InterfaceValidator { isVersion06: boolean, errorResult: unknown, logger: Logger, - simulationType: "validation" | "execution", - usingTenderly = false + simulationType: "validation" | "execution" ): Promise< ValidationResult | ValidationResultWithAggregation | ExecutionResult > { @@ -88,9 +86,8 @@ export class UnsafeValidator implements InterfaceValidator { ? entryPointExecutionErrorSchemaV06 : entryPointExecutionErrorSchemaV07 - const entryPointErrorSchemaParsing = usingTenderly - ? entryPointErrorsSchema.safeParse(errorResult) - : entryPointExecutionErrorSchema.safeParse(errorResult) + const entryPointErrorSchemaParsing = + entryPointExecutionErrorSchema.safeParse(errorResult) if (!entryPointErrorSchemaParsing.success) { try { @@ -236,8 +233,7 @@ export class UnsafeValidator implements InterfaceValidator { isVersion06(userOperation), simulateValidationResult, this.logger, - "validation", - this.config.tenderly + "validation" )) as ValidationResultV06 | ValidationResultWithAggregationV06), storageMap: {} }