Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make short-circuiting old version deployments more robust to snapshotting #1293

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

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 from 9b5ddea to 1b68e2d Compare September 24, 2024 14:38
@area area force-pushed the maint/robust-snapshot-reverts branch from 1b68e2d to 29f94dd Compare September 26, 2024 08:30
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.

1 participant