Skip to content

Commit

Permalink
remove call to mempool.removeSubmitted during AA95 resubmissions (#403)
Browse files Browse the repository at this point in the history
* don't remove op from submitted mempool during onchain AA95

* free on handleTransactionUnderpriced

---------

Co-authored-by: mouseless <[email protected]>
  • Loading branch information
mouseless0x and mouseless0x authored Jan 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 24b4055 commit 8695d4c
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 7 additions & 3 deletions src/executor/executor.ts
Original file line number Diff line number Diff line change
@@ -665,7 +665,7 @@ export class Executor {
if (isTransactionUnderPriced) {
await this.handleTransactionUnderPriced({
nonce: request.nonce,
executor: request.from
executor: request.account
})
}

@@ -681,15 +681,15 @@ export class Executor {
async handleTransactionUnderPriced({
nonce,
executor
}: { nonce: number; executor: Address }) {
}: { nonce: number; executor: Account }) {
const submitted = this.mempool.dumpSubmittedOps()

const conflictingOps = submitted
.filter((submitted) => {
const tx = submitted.transactionInfo

return (
tx.executor.address === executor &&
tx.executor.address === executor.address &&
tx.transactionRequest.nonce === nonce
)
})
@@ -702,6 +702,10 @@ export class Executor {
this.mempool.removeSubmitted(op.userOperationHash)
this.mempool.add(op.mempoolUserOperation, op.entryPoint)
})

if (conflictingOps.length > 0) {
this.markWalletProcessed(executor)
}
}

async bundle(
4 changes: 0 additions & 4 deletions src/executor/executorManager.ts
Original file line number Diff line number Diff line change
@@ -498,10 +498,6 @@ export class ExecutorManager {
(transactionInfo.transactionRequest.gas * multiplier) / 100n
transactionInfo.transactionRequest.nonce += 1

opInfos.map(({ userOperationHash }) => {
this.mempool.removeSubmitted(userOperationHash)
})

await this.replaceTransaction(transactionInfo, "AA95")
} else {
await Promise.all(

0 comments on commit 8695d4c

Please sign in to comment.