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

Add strict rules about upgrading to next versions of colony/OneTxPayment #1181

Merged
merged 6 commits into from
Nov 8, 2023

Conversation

area
Copy link
Member

@area area commented Nov 2, 2023

With the merging of #1150, we are presented with a bit of a dilemma in terms of the user experience we want and the practicalities on the contracts, at least in combination with the restriction of putting as little extra dev work on the frontend team as possible. This comes around because the next version of OneTxPayment needs an additional permission to work, and the next version of Colony won't support old OneTxPayment versions.

The top-level requirement is that users of the frontend shouldn't be able to (with regular usage) get in to a state where OneTxPayment doesn't work, with as little work on the frontend as possible. Some work will be required (to award the new permission required) but that should be a trivial change in both frontends, and so is acceptable.

The approach I've taken here is to (if OneTxPayment is installed)

  • Do not allow OneTxPayments to be upgraded 5->6 with the usual flow (i.e. by calling upgradeExtension).
  • Upgrade OneTxPayments from 5->6 when the colony is upgraded 13->14, and award the new permission at the same time (if appropriate).
  • Require OneTxPayments to be v5 when upgrading the colony from 13->14

If OneTxPayments is not installed, the colony can upgrade 13->14 as normal. If OneTxPayments is installed, but doesn't have permissions in the root domain (the implication being non-standard use exclusively in subdomains), then the same restrictions apply to the upgrade, but the extension won't be awarded the arbitration permission in the root domain. In this scenario, the user will have to award the new permission manually to OneTxPayments - but to get in to that state, they've had to do that anyway, so it has been deemed to be acceptable.

Placing these restrictions in the contracts means that (hopefully) helpful messages will bubble-up to the frontend with no extra work from them.

This PR also changes the upgrade tests that were in #1150 to use the deploy-old-colony-version functionality that I had to add here to test this functionality as I wanted.

@area area force-pushed the maint/voting-reputation-upgrade-help branch from 4d67870 to 4f8933c Compare November 2, 2023 14:12
@kronosapiens kronosapiens force-pushed the maint/voting-reputation-upgrade-help branch 2 times, most recently from 691ccac to f4f7e11 Compare November 7, 2023 17:11
test/contracts-network/colony.js Outdated Show resolved Hide resolved
test/contracts-network/colony.js Outdated Show resolved Hide resolved
test/contracts-network/colony.js Show resolved Hide resolved
@area area force-pushed the maint/voting-reputation-upgrade-help branch 2 times, most recently from 2f34380 to 907f74c Compare November 8, 2023 14:31
helpers/test-data-generator.js Show resolved Hide resolved
test/extensions/one-tx-payment.js Outdated Show resolved Hide resolved
@area area force-pushed the maint/voting-reputation-upgrade-help branch from 907f74c to 19e10f9 Compare November 8, 2023 16:22
@kronosapiens kronosapiens merged commit 6a12f65 into develop Nov 8, 2023
2 checks passed
@kronosapiens kronosapiens deleted the maint/voting-reputation-upgrade-help branch November 8, 2023 19:23
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.

2 participants