You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
I think we may need to exclude the removed user operation from consideration for next estimation loop.
file /pkg/modules/relay/relayer.go :
// SendUserOperation returns a BatchHandler that is used by the Bundler to send batches in a regular EOA// transaction.func (r*Relayer) SendUserOperation() modules.BatchHandlerFunc {
returnfunc(ctx*modules.BatchHandlerCtx) error {
opts:= transaction.Opts{
EOA: r.eoa,
Eth: r.eth,
ChainID: ctx.ChainID,
EntryPoint: ctx.EntryPoint,
Batch: ctx.Batch,
Beneficiary: r.beneficiary,
BaseFee: ctx.BaseFee,
Tip: ctx.Tip,
GasPrice: ctx.GasPrice,
GasLimit: 0,
WaitTimeout: r.waitTimeout,
}
// Estimate gas for handleOps() and drop all userOps that cause unexpected reverts.estRev:= []string{}
forlen(ctx.Batch) >0 {
est, revert, err:=transaction.EstimateHandleOpsGas(&opts)
iferr!=nil {
returnerr
} elseifrevert!=nil {
ctx.MarkOpIndexForRemoval(revert.OpIndex)
estRev=append(estRev, revert.Reason)
// Exclude the removed user operation from consideration for next estimation loop.opts.Batch=ctx.Batch
} else {
opts.GasLimit=estbreak
}
}
ctx.Data["estimate_revert_reasons"] =estRev...
}
}```