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

Update StagedContractUpdates to support unknown block height update boundary #12

Open
sisyphusSmiling opened this issue Dec 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@sisyphusSmiling
Copy link
Contributor

Description

Currently, the StagedContractUpdates contract requires a block update boundary value on deployment. The block height boundary for coordinated updates will be known up to a week in advance; however, waiting until that value is known to deploy limits the amount of time developers have to stage their updates.

Suggested Solution

The contract should be refactored to support unknown block update (blockUpdateBoundary: UInt64?) value on deployment and current logic around that value should handle the optional.

Additionally, to better support delegated updates on Updaters configured before that value was known, the Delegatee.blockUpdateBoundary value should override the Updater.blockUpdateBoundary value on Delegatee.delegate. A setter will also need to be added for the Delegatee.blockUpdateBoundary so the value can be updated.

Any refactor should also consider that since the Delegatee holds a Capability on the Updater, the underlying Updater can be replaced, thus potentially breaking any assumptions about the the Updater.blockUpdateBoundary overridden on delegation. In short, attempting to execute Updater.update from the Delegatee should not result in a panic which would interrupt iteration on Delegatee.update

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

No branches or pull requests

1 participant