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 10:47
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: "What is the plan if the token has a bug?" Today the share token cannot be upgraded, and its admin swaps rules, verifier and roles at once.
Our reply: the token upgrades under the vault's timelock, with a migration hook tested on built Wasm, and role, compliance and verifier changes wait for the same timelock. This PR delivers that for the share token. A one-time setup window keeps the deploy's own wiring instant.
Changes
bind_vaultandfinish_setup: admin changes are instant only until setup finishes, and setup cannot finish while a hand-over offered during setup is pendingmanager, admin hand-overs, rule and verifier swaps and upgrades go throughpropose_change/apply_change; a direct call is refused withUseTimelockcomplianceand cancelling a hand-over stay instant;set_role_adminis always refusedVaultBindingtraitmigratein a probe buildnpm run extendalso extends the token's pending changesDeviations
workflowscope. It waits as a patch, with the earlier Wasm CI step, for the owner to push.VaultBindingview, binding an address that is not a clock source, the instance TTL on every admin call, and the token's timelock on the local network.bind_vaultis refused withSetupClosed.Acceptance criteria
bind_vaultandfinish_setupwork once, during setup only; setup cannot finish while an admin hand-over offered during setup is pendingmanager, admin hand-over,set_complianceandset_identity_verifierare refused and go throughpropose_change; revokingcomplianceand cancelling a hand-over stay instantTest plan
Automated tests
cargo test --locked: all green, with 52 tests inshare-token(30 new) and 328 inasync-vault.CARGO_TARGET_DIR=target/upgrade-probe stellar contract build --package share-token --features upgrade_probe), thencargo test --locked -p async-vault --features upgrade_wasm with_wasm: 4 passed, includingthe_token_upgrades_under_live_balances_and_open_requests. CI does not run this yet (see Deviations).HARNESS_NETWORK=local npm run deploy -w scripts/harness, thentest:happy-path(24 passed) andtest:guards(40 passed).Manual verification
HARNESS_NETWORK=local npm run deploy -w scripts/harness. It prints "share_token bound to the vault, setup finished".STELLAR_ACCOUNT=<funded account> npm run extend -w scripts/harness -- --config scripts/harness/deployed.local.json. It prints "share_token pending change live until ledger …".Breaking changes
After
finish_setup, the token refusesgrant_role, revokingmanager,transfer_admin_rolewith a non-zero ledger,set_complianceandset_identity_verifierwithUseTimelock(7005);set_role_adminis always refused. The deploy must callbind_vaultandfinish_setupon the token. New error codes 7001–7011 and 7016. The console still calls the instant setters and adapts at the testnet redeploy.Checklist
Screenshots
None.