Repository navigation
Conversation
After setup, a Compliance or IdentityVerifier change waited for the vault's timelock, but nothing checked the new contract. Rules that did not list the token, or ran on another vault's clock, landed and stopped every mint, transfer and burn. A verifier that refused the vault or did not answer made holders look delisted. propose_change and apply_change now refuse such a swap. New rules must name the token's vault with their setup closed and list the token in linked_tokens (ComplianceNotBound, 7017). A new verifier must accept the vault's address (VerifierRefusesVault, 7018). The calls go through try_ clients, so a contract that is missing or fails counts as a refusal instead of aborting the call. The vault test that pinned an unbound swap landing now expects the refusal. The design notes, the kit spec, the authorization matrix and the test map list the checks.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The guard that checks the compliance account cannot propose a token change named the compliance contract as the new identity verifier. The token now refuses a verifier that does not accept the vault, so the call failed in simulation instead of on the missing signature. Propose the deployed verifier, so the signature is the only reason left.
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
Closes #332
After setup, a compliance or verifier swap on the share token waited for the timelock, but nothing checked the new contract. A compliance contract that did not list the token stopped every mint, transfer and burn. A verifier that did not answer made every holder look delisted.
The token now checks the new contract when the swap is proposed and again when it applies, as the vault does for a new oracle feed.
Changes
ComplianceNotBound, 7017).VerifierRefusesVault, 7018).Deviations
Acceptance criteria
Test plan
Automated tests
SOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V2=1 cargo test --locked. Expect 728 passed, 0 failed (721 before: 7 new tests, 2 updated).cargo clippy --locked --all-targets -- -D warnings. Expect no warnings.cargo fmt --all -- --check. Expect no output.stellar contract build --package share-token. Expect 56,531 bytes optimized (55,315 before).SOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V2=1 cargo test --locked -p async-vault -p nav-oracle --features upgrade_wasm with_wasm. Expect 7 passed, includingthe_token_upgrades_under_live_balances_and_open_requests.scripts/harnesswithHARNESS_NETWORK=local:npm run deploy,npm run test:happy-path,npm run test:guards, then build the vault withCARGO_TARGET_DIR=target/short-wind-down stellar contract build --package async-vault --features short_wind_downand runnpm run test:wind-down. Expect 24, 50 and 6 passed.Manual verification
None.
Breaking changes
After setup, a compliance swap to a contract that does not answer
VaultBindingis refused, thoughfinish_setupaccepts such an external module. The design doc now says so. Generated clients gain two error variants.Checklist
Screenshots
None.