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

implement upgrade catalyst functionality #5

Closed
noahlitvin opened this issue Jul 12, 2022 · 0 comments
Closed

implement upgrade catalyst functionality #5

noahlitvin opened this issue Jul 12, 2022 · 0 comments

Comments

@noahlitvin
Copy link
Member

when a cannonfile is updated, all of its deployments are nuked and paved.

This is actually probably right functionality for local chains. but for live network deployments, some protocols may have special requirements. additionally, projects which have not used cannon in the past (that is, all of them right now) should have a way to link their own deployments to their cannonfile without actually having cannon deploy them.

Introducing upgrade catalysts

When invoking the ChainBuilder, it will take in an option, upgradeCatalyst, which is a function (label: string, config: Config) => InternalOutputs | null that gets executed before the actual steps are executed. If the step should be skipped with alternate inputs, the upgrade catalyst returns the internal outputs that should be returned. Otherwise, it returns null.

cannon will provide a default upgrade catalyst for packages that have used cannon for a previous deployment but do not need to be deployed again. this will allow for general-purpose, minimal system upgrades without needing to redeploy everything, if that is how your protocol works. Alternately if the protocol is a type which has major upgrades which do not depend on the previous, the upgrade can be implemented that way as well.

(originally usecannon/cannon-legacy#45)

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