Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hpmaxi
marked this pull request as ready for review
October 16, 2026 23:09
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aha G: only the vault could be upgraded, and its admin changed settings at once.
Our reply: the share token and the oracle become upgradeable under the vault's timelock, with one crate holding the rules for every contract. This PR adds that crate and moves the vault's upgrades onto its change queue; the token and the oracle follow in the next PRs.
Changes
timelockcrate: delay bounds, a queue of pending changes, pause accounting, a setup window and the clock traitspropose_change,cancel_changeandapply_change;pending_changeslists what waitstimelock_clock()timelock::DAY_DURATIONDeviations
NotInitialized(6030).ChangeCancelled.Acceptance criteria
timelock_clock()through a contract traitTest plan
Automated tests
cargo test --locked: all green, with 19 tests intimelockand 248 inasync-vault.stellar contract build --manifest-path fixtures/upgrade-target/Cargo.toml, thencargo test --locked -p async-vault --features upgrade_wasm with_wasm: 3 passed. The CI step "Run the upgrade tests against built Wasm" runs the same two commands. Its commit is not pushed yet: the push token lacks theworkflowscope.Manual verification
stellar contract build --package async-vault.propose_change,cancel_change,apply_change,pending_changesandtimelock_clock, and no*_upgradefunction.Breaking changes
The change queue replaces
propose_upgrade,propose_upgrade_delay,cancel_upgrade,apply_upgradeandupgrade_proposal, and threeChange*events replace the fiveUpgrade*ones. Codes 6056 and 6057 becomeChangeNotFoundandChangeNotReady; 6063TooManyPendingChangesis new. Fresh deployments only: there is no in-place upgrade from the current testnet vault. The app is unchanged: it builds against testnet's contracts.Checklist
Screenshots
None.