test: multi-contract state isolation integration test (#169) - #308
Merged
N-thnI merged 4 commits intoAug 30, 2026
Merged
Conversation
…col#169) Deploy two VeroContract instances in the same test environment and assert that instance storage is fully isolated across all state dimensions. Five tests added to tests/multi_contract_isolation.rs: - test_guardian_state_does_not_leak_between_instances: guardian added to instance A is invisible to instance B (is_guardian, get_reputation) - test_state_registered_in_b_does_not_appear_in_a: bidirectional check - test_admin_state_is_isolated_per_instance: each instance stores its own admin independently - test_overlapping_task_ids_are_isolated_per_instance: same task ID and guardian address in both instances hold independent state - test_pause_state_is_isolated_per_instance: pausing A does not affect B All five tests pass (cargo test --test multi_contract_isolation). Closes Vero-protocol#169
Contributor
|
This needs a |
N-thnI
approved these changes
Aug 26, 2026
deploy_instance was passing lock_threshold=0, which is rejected by validate_lock_threshold (ContractError::InvalidAmount, Vero-protocol#19) since commit 186c349 wired that validation into initialize(). Change all 10 call sites across the 5 test functions from 0 to 1, the minimum positive value accepted by the protocol. Fixes CI failure on PR Vero-protocol#308.
Closed
1 task
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
Adds
tests/multi_contract_isolation.rs— an integration test that deploys two independentVeroContractinstances in the same Soroban test environment and asserts that instance storage is fully isolated between them.Tests added
test_guardian_state_does_not_leak_between_instancesis_guardian=falseandget_reputation=Nonein B; task in A isget_task=Nonein Btest_state_registered_in_b_does_not_appear_in_atest_admin_state_is_isolated_per_instancetest_overlapping_task_ids_are_isolated_per_instancetest_pause_state_is_isolated_per_instanceAll five tests pass:
Acceptance criteria
Closes #169