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

Do not rely on the pre_upgrade hook #1

Open
luc-mercier opened this issue Oct 6, 2020 · 3 comments
Open

Do not rely on the pre_upgrade hook #1

luc-mercier opened this issue Oct 6, 2020 · 3 comments

Comments

@luc-mercier
Copy link

The wallet canisters stores valuable data, so we need to make sure it is upgradable without loosing data.

This means that pre_upgrade cannot be used, because:

The solution, for critical canisters, before we have a nice stable memory API, is simply to move this code to be ran at the end of each update method. This way, if any change in (persistent but not stable) state causes some failure in the persistence in stable memory, then that call is immediately rejected.

@hansl hansl transferred this issue from another repository Oct 6, 2020
@luc-mercier
Copy link
Author

In addition, there's evidence that pre-upgrade has not been tested very thoroughly: https://dfinity.slack.com/archives/C014CQ9N2G5/p1602056869013100

@p-shahi
Copy link
Contributor

p-shahi commented Feb 10, 2021

@luc-mercier this is still the case right? Has there been any new conclusion not captured here: https://docs.google.com/document/d/13GCGj5SaUe7JhgiMmiW7GSIzejtQ4c1uohJFY89tobc/edit# (is pre_upgrade still banned in NNS and should it be banned here too)

@luc-mercier
Copy link
Author

Yes, nothing has changed, and this is still one of the issue that scares me the most wrt to the health of the IC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants