-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Description
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:
- Strengthen the
*dsl.EOAabstraction to assume concurrent ownership of the onchain account is possible. This primarily impacts funding and nonce management. - Run all tests serially and assume the account cannot be used concurrently outside of acceptance tests.
- 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.