Skip to content

postOp gas accounting on OOG failures #606

@Tejanadh

Description

@Tejanadh

Hi team,

I'm working on understanding ERC-4337 gas accounting edge cases and have a technical question about EntryPoint v0.8.0 behavior.

Scenario: When a paymaster's postOp call runs out of gas (OOG), the try-catch block in _postExecution catches the failure, but the subsequent gas calculation preGas - gasleft() appears to charge the full gas consumed up to OOG.

Question: Is this the intended behavior? Should the charged amount be capped to the paymasterPostOpGasLimit (stipend) even on OOG failures?

Observed: In my testing, I see ~220k gas charged vs ~100k stipend limit.

Just trying to understand if this is expected behavior or if there's something I'm missing in the gas accounting logic.

Thanks for any clarification!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions