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 17, 2026 12:27
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
The oracle's limits could be changed at once, and the oracle could not be upgraded.
Every oracle config change except a shorter freshness window now waits for the vault's timelock, and the oracle upgrades under that timelock. Attester, guardian and admin grants wait too. Tightening waits as well, because a tighter fall cap or a longer cooldown can hold the price above a real loss. A one-time setup window keeps the deploy's own wiring instant.
Changes
bind_vaultandfinish_setup: oracle admin changes are instant only until setup finishes, and setup cannot finish while a hand-over offered during setup is pendingset_configis instant only for a shorterfreshness_duration; every other change goes throughpropose_change/apply_change, checked against the bounds when proposed and when appliedclear_lateststay instant;set_role_adminis always refusedVaultBindingmigratein a probe buildnpm run extendalso extends the oracle's pending changesDeviations
workflowscope).shortens_freshness_onlycompares the whole config except freshness, so a field added later waits.Acceptance criteria
set_configis instant only for a shorterfreshness_duration; any other change, tighter limits included, waitspropose_change/apply_changeclear_lateststay instant; setup cannot finish while a hand-over from setup is pendingTest plan
Automated tests
cargo test --locked: all green, with 80 tests innav-oracle(39 new), 51 inshare-tokenand 328 inasync-vault.CARGO_TARGET_DIR=target/upgrade-probe stellar contract build --package nav-oracle --features upgrade_probe), thencargo test --locked -p async-vault -p nav-oracle --features upgrade_wasm with_wasm: 7 passed, includingthe_oracle_upgrades_under_a_live_valuationand the two…_exposes_no_immediate_upgradetests. CI does not run this yet (see Deviations).HARNESS_NETWORK=local npm run deploy -w scripts/harness, thentest:happy-path(24 passed) andtest:guards(43 passed).Manual verification
HARNESS_NETWORK=local npm run deploy -w scripts/harness. It prints "nav_oracle bound to the vault, setup finished".STELLAR_ACCOUNT=<funded account> npm run extend -w scripts/harness -- --env development --config scripts/harness/deployed.local.json. It prints "nav_oracle pending change live until ledger …".Breaking changes
After
finish_setup, the oracle refusesgrant_role,transfer_admin_rolewith a non-zero ledger, and everyset_configexcept a shorterfreshness_durationwithUseTimelock(3015);set_role_adminis always refused. The deploy must callbind_vaultandfinish_setupon the oracle. New error codes 3011–3021 and 3025. The console still calls the instant setters and adapts at the testnet redeploy.Checklist
Screenshots
None.