Skip to content

refactor(storage-optimization): migrate admin and protocol parameters… - #750

Open
Escelit wants to merge 1 commit into
SoroLabs:mainfrom
Escelit:refactor/issue-90-storage-optimization
Open

refactor(storage-optimization): migrate admin and protocol parameters…#750
Escelit wants to merge 1 commit into
SoroLabs:mainfrom
Escelit:refactor/issue-90-storage-optimization

Conversation

@Escelit

@Escelit Escelit commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrate immutable protocol parameters and admin addresses from high-cost Persistent storage to Instance storage to reduce rent fees.

Changes

Proxy Contract (contracts/proxy/)

  • Migrated Admin, Implementation, and Counter data keys from env.storage().persistent() to env.storage().instance()
  • Storage(BytesN<32>) remains as Persistent since it holds arbitrary user-defined storage

CrossChainVerifier (contracts/cross-chain-verifier/)

  • Migrated SignerCount from Persistent to Instance storage
  • Fixed broken test_verify_message_no_root test that expected a panic on missing state root (now gracefully returns false)
  • Removed stale test snapshots that referenced old Persistent storage durability

Testing

All 27 tests pass across both contracts:

  • cargo test --package proxy — 2/2 passed
  • cargo test --package cross-chain-verifier — 25/25 passed

Closes #648

… from Persistent to Instance storage

Migrate Proxy contract (Admin, Implementation, Counter) and
CrossChainVerifier (SignerCount) from high-cost Persistent storage
to Instance storage to reduce rent fees. Fix broken tests and
stale snapshot files.
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Escelit 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

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.

[Contract] Add Storage Footprint Optimization using Instance vs Persistent Storage

1 participant