fix(engine-core): fix broken test_proxy_upgrade_success blocking CI - #174
Merged
Conversation
update_current_contract_wasm requires the target Wasm hash to already be present in ledger storage (uploaded via Deployer::upload_contract_wasm), but the test passed an arbitrary unregistered hash and failed with "Wasm does not exist" on every run since it was introduced (#169), which broke CI on main. Upload an empty Wasm, the pattern soroban-env-host supports under testutils for cases like this, to get a valid hash. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
test_proxy_upgrade_success(added in fix(proxy): add reentrancy guards and test coverage to UpgradeableProxy #169) has been failing on every CI run since it merged tomain, including onmainitself — it passes an arbitrary, never-uploaded Wasm hash toUpgradeableProxy::upgrade, which panics withHostError: Error(Storage, MissingValue)becauseupdate_current_contract_wasmrequires the hash to correspond to Wasm already present in ledger storage.env.deployer().upload_contract_wasm(Bytes::new(&env))to get a real, valid hash.soroban-env-hostexplicitly supports zero-byte uploads under thetestutilsfeature for exactly this kind of storage-focused test (it skips real Wasm parsing/instantiation, which the test doesn't need).UpgradeableProxyitself changed.Test plan
cargo test -p engine-core— 83/83 pass (was 82 passed / 1 failed before this fix)cargo build --workspace --all-targets— clean