Skip to content

Conversation

@area
Copy link
Member

@area area commented Sep 23, 2024

I ran across this issue when writing a test in #1285 when adding a test to colony.js. There, old versions of contracts are deployed at the end of the test file, and as a result if transactions from accounts[0] are added to previous tests, they get deployed to different addresses.

Those addresses are recorded in deployOldUpgradeableVersion and reused if deemed appropriate. The check to whether they are appropriate or not is whether there is code at that address. The current codebase appears to have stumbled up to the edge of, but not into, the regime where the old versions deployed in colony.js overlap with the contracts deployed in meta-colony.js. By adding an extra transaction in the former, overlap occurs.

That means that when the address that we recorded deploying hmwss at is checked, there is code there and it's attempted to be reused; but it's actually a Token and so the tests fail.

By resetting the recorded addresses when we do a revert in the fixture, everything is brought in line again.

@area area force-pushed the maint/robust-snapshot-reverts branch from 661b817 to 8211ab9 Compare September 23, 2024 10:57
@area area marked this pull request as ready for review September 23, 2024 13:21
@area area force-pushed the maint/robust-snapshot-reverts branch 3 times, most recently from 2d05b41 to 01e689d Compare September 24, 2024 06:17
@area
Copy link
Member Author

area commented Sep 24, 2024

I've also cherry-picked a commit changing RetryProvider in here that I originally had in #1285 - which speeds up builds by about 30 minutes.

@area area force-pushed the maint/robust-snapshot-reverts branch 2 times, most recently from 1b68e2d to 29f94dd Compare September 26, 2024 08:30
Copy link
Contributor

@kronosapiens kronosapiens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't have been an easy bug to catch, bravo

@area area force-pushed the maint/robust-snapshot-reverts branch 3 times, most recently from 7198324 to 9e67f9e Compare October 2, 2024 16:28
@kronosapiens kronosapiens force-pushed the maint/robust-snapshot-reverts branch from 9e67f9e to 4f89877 Compare October 7, 2024 14:57
@kronosapiens kronosapiens merged commit 60b6744 into develop Oct 7, 2024
@kronosapiens kronosapiens deleted the maint/robust-snapshot-reverts branch October 7, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants