Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-e2e: Fix bug in TestWithdrawals #5931

Merged

Commits on Jun 8, 2023

  1. op-e2e: Fix bug in TestWithdrawals

    The existing TestWithdrawals test attempts to assert that the total fees
    of the prove and finalize transactions are accounted for in the L1
    balance.  But, it re-uses the `calcGasFees` function and passes in the
    `GasTipCap` and the `GasFeeCap` from the L2 transaction, not from the
    actual L1 transactions.  In the event that the gas fee differs on the L2
    from the L1, then the test will fail.
    
    To keep the diff small, this change simply multiplies the GasUsed and
    `EffectiveGasPrice` from the receipts.  This could be moved into a
    helper function like `calcGasFees`.  Using the `EffectiveGasPrice` seems
    just as good or better than relying on the parameters of the original
    transaction, and could be similarly utilized higher in the test for the
    L2 fees.  If we really want to get the parameters from the tx, then
    `ProveAndFinalizeWithdrawal` would need to be modified to return the
    txes.
    jyellick committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    769fe00 View commit details
    Browse the repository at this point in the history