Skip to content

Flaky withdraw e2e test #235

@karlb

Description

@karlb

The npm e2e test occasionally fails with

 ● execute a withdraw and a deposit in succession

    ContractFunctionExecutionError: The contract function "finalizeWithdrawalTransaction" reverted with the following reason:
    OptimismPortal: proven withdrawal finalization period has not elapsed

    Contract Call:
      address:   0x6509f2a854BA7441039fCE3b959d5bAdd2fFCFCD
      function:  finalizeWithdrawalTransaction((uint256 nonce, address sender, address target, uint256 value, uint256 gasLimit, bytes data))
      args:                                   ({"nonce":"1766847064778384329583297500742918515827483896875618958121606201292619776","sender":"0x976EA74026E726554dB657fA54763abd0C3a0aa9","target":"0x976EA74026E726554dB657fA54763abd0C3a0aa9","value":"1000000000000000000","gasLimit":"21000","data":"0x","withdrawalHash":"0x3c154e4d0dcefb2cb5473ba79c5dbbccd3efd61b79a64c309e06a99f498f7d1c"})

    Docs: https://viem.sh/docs/contract/estimateContractGas
    Version: [email protected]

Example from CI: https://app.circleci.com/pipelines/github/celo-org/optimism/1882/workflows/c8d6dc1b-9f24-4fac-9025-2a27052b9584/jobs/34786

Trying it out locally, it only fails for me if place a sleep between the node startup and the test:

--- a/op-e2e/celo/run_all_tests.sh
+++ b/op-e2e/celo/run_all_tests.sh
@@ -25,6 +25,8 @@ for _ in {1..10}; do
   sleep 0.2
 done
 
+sleep 300
+
 ## Run tests
 echo Start tests
 failures=0

Increasing the l2OutputOracleSubmissionInterval to prevent the L2OO from falling behind does not solve the issue, which is expected since that should not matter when fault proofs are turned on (which is the case for the devnet).

The flakyness started with the celo8 rebase.

@ezdac knows more about how viem deals with the withdrawal finalization period.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions