Open kanej opened 4 weeks ago
We merged in a bug fix for some race conditions in some of our dynamic import patterns: https://github.com/NomicFoundation/hardhat/pull/5899
We need to add integration tests to cover the bug: https://github.com/NomicFoundation/hardhat-v3-alpha-testing/blob/8bf0bf69b6207a979ba16f59a13c8ee9f6c17a35/viem-provider-error/test/Lock.ts#L6
Specifically adding a second describe block that makes a second connection and uses it can cause issues where a race condition means both networks have the same network id (leading to incorrect accessing of cached data by network id).
We may not be able to create a deterministic and stable test. We were a bit lucky with the two describes.
Lets timebox the investigation here to 2hrs.
We merged in a bug fix for some race conditions in some of our dynamic import patterns: https://github.com/NomicFoundation/hardhat/pull/5899
We need to add integration tests to cover the bug: https://github.com/NomicFoundation/hardhat-v3-alpha-testing/blob/8bf0bf69b6207a979ba16f59a13c8ee9f6c17a35/viem-provider-error/test/Lock.ts#L6
Specifically adding a second describe block that makes a second connection and uses it can cause issues where a race condition means both networks have the same network id (leading to incorrect accessing of cached data by network id).