Skip to content

Commit

Permalink
Running 7702 bundler with preState tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
shahafn committed Dec 22, 2024
1 parent 3edada1 commit bd398e7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
20 changes: 20 additions & 0 deletions packages/bundler/localconfig/bundler.eip7702.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"chainId": 1337,
"gasFactor": "1",
"port": "3000",
"privateApiPort": "3001",
"network": "http://127.0.0.1:8545",
"tracerRpcUrl": "http://127.0.0.1:8545",
"entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"beneficiary": "0xd21934eD8eAf27a67f0A70042Af50A1D6d195E81",
"minBalance": "1",
"mnemonic": "./localconfig/mnemonic.txt",
"maxBundleGas": 30e6,
"minStake": "1",
"minUnstakeDelay": 0,
"autoBundleInterval": 3,
"autoBundleMempoolSize": 10,
"rip7560": false,
"rip7560Mode": "PULL",
"gethDevMode": true
}
1 change: 1 addition & 0 deletions packages/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"runop": "ts-node ./src/runner/runop.ts",
"bundler": "TS_NODE_TRANSPILE_ONLY=1 ts-node ./src/exec.ts --config ./localconfig/bundler.config.json",
"bundler-rip7560": "ts-node ./src/exec.ts --config ./localconfig/bundler.rip7560.config.json",
"bundler-eip7702": "ts-node ./src/exec.ts --config ./localconfig/bundler.eip7702.config.json",
"clear": "rm -rf dist artifacts cache src/types",
"hardhat-compile": "hardhat compile",
"hardhat-node": "npx hardhat node --no-deploy",
Expand Down
4 changes: 2 additions & 2 deletions packages/validation-manager/src/GethTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const debug = Debug('aa.tracer')

// the name of the native tracer.
// equivalent to the javascript "bundlerCollectorTracer".
export const bundlerNativeTracerName = 'bundlerCollectorTracer'
export const bundlerJSTracerName = 'bundlerCollectorTracer'
export const GethNativeTracerName = 'erc7562Tracer'

/**
Expand Down Expand Up @@ -55,7 +55,7 @@ export async function debug_traceCall (provider: JsonRpcProvider, tx: Deferrable
}

const ret = await prestateTracerProvider.send('debug_traceCall', [tx1, 'latest', {
tracer: bundlerNativeTracerName,
tracer: bundlerJSTracerName,
stateOverrides: preState
}])

Expand Down
4 changes: 2 additions & 2 deletions packages/validation-manager/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { JsonRpcProvider } from '@ethersproject/providers'
import { AddressZero, IEntryPoint__factory, OperationRIP7560, UserOperation } from '@account-abstraction/utils'
import { PreVerificationGasCalculator } from '@account-abstraction/sdk'

import { bundlerNativeTracerName, debug_traceCall, eth_traceRip7560Validation } from './GethTracer'
import { bundlerJSTracerName, debug_traceCall, eth_traceRip7560Validation } from './GethTracer'
import { bundlerCollectorTracer } from './BundlerCollectorTracer'
import { ValidateUserOpResult } from './IValidationManager'
import { ValidationManager } from './ValidationManager'
Expand All @@ -12,7 +12,7 @@ export * from './ValidationManager'
export * from './ValidationManagerRIP7560'
export * from './IValidationManager'

export async function supportsNativeTracer (provider: JsonRpcProvider, nativeTracer = bundlerNativeTracerName): Promise<boolean> {
export async function supportsNativeTracer (provider: JsonRpcProvider, nativeTracer = bundlerJSTracerName): Promise<boolean> {
try {
await provider.send('debug_traceCall', [{}, 'latest', { tracer: nativeTracer }])
return true
Expand Down

0 comments on commit bd398e7

Please sign in to comment.