Skip to content

test(SC-002): upgrade storage integrity + proxy/impl storage-slot collision prevention - #1710

Open
esthertitilayo-dev wants to merge 1 commit into
StellarDevHub:mainfrom
esthertitilayo-dev:fix/1623-proxy-upgrade-storage-tests
Open

esthertitilayo-dev wants to merge 1 commit into
StellarDevHub:mainfrom
esthertitilayo-dev:fix/1623-proxy-upgrade-storage-tests

Conversation

@esthertitilayo-dev

Copy link
Copy Markdown
Contributor

Closes #1623

Summary

  • proxy: add test_proxy_state_persists_across_upgrade proving admin, pending-admin ceremony, registered wasm hashes, upgrade proposals, and storage version all survive execute_upgrade.
  • proxy: add test_proxy_and_impl_storage_keys_do_not_collide comparing XDR encodings of ProxyDataKey vs implementation_v1::ImplDataKey (impl proxy keys intentionally alias proxy keys; app-state keys must not) plus a behavioral check that both key families coexist in the same contract storage without clobbering each other.
  • proxy: add test_unauthorized_register_wasm regression (admin-only bytecode registration, AC1).
  • implementation_v2: new test suite (src/tests.rs) covering score/name storage isolation (additive Name(Address) key never disturbs Score(Address)), pre-upgrade V1 state readability (score written under implementation_v1::ImplDataKey::Score is read back by V2), overflow saturation, and admin gating (#2).

Test plan

  • cargo test -p proxy -p implementation_v1 -p implementation_v2 — 16 + 3 + 8 tests pass (workspace-local toolchain).
  • cargo fmt --check clean on all touched files (repo has pre-existing fmt drift in proxy/src/security_council.rs and EOF of proxy/src/tests.rs, untouched).

… storage-slot collisions (StellarDevHub#1623)

- Add proxy state-persistence test covering admin, pending admin, registered
  wasm hashes, proposals, and storage version before/after execute_upgrade
- Add storage-key collision test comparing XDR encodings of ProxyDataKey vs
  ImplDataKey and proving both key families coexist in contract storage
- Add unauthorized register_wasm regression test
- Add implementation_v2 test suite covering score/name storage isolation,
  pre-upgrade (V1) state readability, overflow saturation, and admin gating
@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

@esthertitilayo-dev is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@esthertitilayo-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SC-002] Upgradeable Transparent Proxy Pattern with Storage Slot Collision Prevention

1 participant