diff --git a/src/README.md b/src/README.md index 0678505..b0a0c4a 100644 --- a/src/README.md +++ b/src/README.md @@ -153,7 +153,8 @@ See [`AltoParameters`](https://github.com/wevm/prool/blob/801ede06ded8b2cb2d59c9 #### Requirements - [Rundler](https://github.com/alchemyplatform/rundler) binary installed - - [Download](https://github.com/alchemyplatform/rundler/releases) + - [Download v0.3.x](https://github.com/alchemyplatform/rundler/releases/tag/v0.3.0) + - Add to `PATH` #### Usage diff --git a/src/instances/rundler.ts b/src/instances/rundler.ts index b9ddf1e..7d036df 100644 --- a/src/instances/rundler.ts +++ b/src/instances/rundler.ts @@ -12,13 +12,6 @@ export type RundlerParameters = { */ binary?: string - /** - * The version of the entrypoint to use - * - * @default 0.6.0 - */ - entryPointVersion?: '0.6.0' | '0.7.0' - /** * Network to look up a hardcoded chain spec. * @default dev @@ -129,6 +122,31 @@ export type RundlerParameters = { */ mempoolConfigPath?: string + /** + * Disables entry point version v0.6. + * @default false + */ + disableEntryPointV0_6?: boolean + + /** + * The number of builder accounts to use for entry point version v0.6. + * + * @default 1 + */ + numBuildersV0_6?: number + + /** + * Disables entry point version v0.7. + * @default false + */ + disableEntryPointV0_7?: boolean + + /** + * The number of builder accounts to use for entry point version v0.7. + * @default 1 + */ + numBuildersV0_7?: number + metrics?: { /** * Port to listen on for metrics requests. @@ -261,18 +279,20 @@ export type RundlerParameters = { builder?: { /** - * Private key to use for signing transactions. + * Private keys to use for signing transactions. * If used with awsKmsKeyIds, then explicitly pass in `null` here. * - * @default 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 + * @default ['0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80','0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] */ - privateKey?: string + privateKeys?: string[] /** - * AWS KMS key IDs to use for signing transactions (comma-separated). - * Only required if privateKey is not provided. + * AWS KMS key IDs to use for signing transactions. + * Only required if privateKeys is not provided. + * + * @default null */ - awsKmsKeyIds?: string + awsKmsKeyIds?: string[] /** * Redis URI to use for KMS leasing. @@ -304,9 +324,21 @@ export type RundlerParameters = { /** * Choice of what sender type to use for transaction submission. * @default raw - * options: raw, conditional, flashbots, polygon_bloxroute + * options: raw, flashbots, polygon_bloxroute + */ + sender?: 'raw' | 'flashbots' | 'polygonBloxroute' + + /** + * Use the submit URL for transaction status checks. + * @default false + */ + use_submit_for_status?: boolean + + /** + * If the sender supports the 'dropped' status. Many senders do not support this status, and only support 'pending' or 'mined'. + * @default false */ - sender?: 'raw' | 'conditional' | 'flashbots' | 'polygonBloxroute' + dropped_status_unsupported?: boolean /** * After submitting a bundle transaction, the maximum number of blocks to wait for that transaction to mine before trying to resend with higher gas fees. @@ -321,11 +353,16 @@ export type RundlerParameters = { replacementFeePercentIncrease?: number /** - * Maximum number of fee increases to attempt. - * Seven increases of 10% is roughly 2x the initial fees. - * @default 7 + * Maximum number of fee increases to attempt during a cancellation. + * @default 15 */ - maxFeeIncreases?: number + maxCancellationFeeIncreases?: number + + /** + * The maximum number of blocks to spend in a replacement underpriced state before issuing a transaction cancellation. + * @default 20 + */ + maxReplacementUnderpricedBlocks?: number /** * Additional builders to send bundles to through the Flashbots relay RPC (comma-separated). @@ -392,11 +429,11 @@ export const rundler = defineInstance((parameters?: RundlerParameters) => { ...args, builder: { ...args.builder, - privateKey: - args.builder?.privateKey ?? + privateKeys: args.builder?.privateKeys ?? [ '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', + '0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d', + ], }, - entryPointVersion: undefined, maxVerificationGas: args.maxVerificationGas ?? 10000000, network: args.network ?? 'dev', nodeHttp: args.nodeHttp ?? 'http://localhost:8545', @@ -413,23 +450,13 @@ export const rundler = defineInstance((parameters?: RundlerParameters) => { args.userOperationEventBlockDistance ?? 100, } satisfies RundlerParameters - const entrypointArgs = (() => { - if (args.entryPointVersion === '0.6.0') - return ['--disable_entry_point_v0_7'] - return ['--disable_entry_point_v0_6'] - })() - return await process.start( ($) => - $( - binary, - ['node', ...toArgs(args_, { casing: 'snake' }), ...entrypointArgs], - { - env: { - RUST_LOG: 'debug', - }, + $(binary, ['node', ...toArgs(args_, { casing: 'snake' })], { + env: { + RUST_LOG: 'debug', }, - ), + }), { ...options, resolver({ process, reject, resolve }) {