Skip to content

op-devstack: resolve race conditions arising from dsl.EOA abuse #18063

@joshklop

Description

@joshklop

Acceptance tests often assume that they have complete ownership of a *dsl.EOA, when in fact multiple may be using the same account at the same time. There are three ways to solve this:

  1. Strengthen the *dsl.EOA abstraction to assume concurrent ownership of the onchain account is possible. This primarily impacts funding and nonce management.
  2. Run all tests serially and assume the account cannot be used concurrently outside of acceptance tests.
  3. Stop writing acceptance tests as normal Go unit tests. Make a custom test runner instead. Then we can compile a single program that contains all of the tests, and runs them in parallel or in sequence. EOA ownership could be regulated through a master wallet object that is injected into each test.

I'm currently leaning toward option 3: it's probably not even that hard to do. It should also help substantially decrease test times in CI, since we should be able to parallelize almost all of our acceptance tests. We can do Option 2 as well to solve problems where transactions sent by a previous owner of an EOA affect its current owner.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions