feat(#323): optimize emergency_pause storage keys footprint - #368
Conversation
|
@iexwr 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! 🚀 |
|
@iexwr Fix failed CI |
2a10bbf to
f6ce416
Compare
|
CI / PR status update This branch has been rebuilt as a clean, isolated change on top of the latest What this PR now contains (Closes #323)Storage-key optimization for the emergency-pause flags:
Applied consistently in Note on the test jobThe
Any PR targeting current |
- annotate test modules with #[cfg(test)] so the wasm build succeeds without dev-dependencies - make setup_funded_escrow pub(crate) and fix test imports so sibling test modules can use it (Address::generate requires testutils trait) - remove redundant admin.require_auth() before require_admin in admin_override_cancel_refund; require_admin already performs the signature check, and env-host 22.1.3 rejects the double auth with Error(Auth, ExistingValue) - fund a terminal-state cancel test through the zero-balance boundary guard in cancel_escrow so its invalid-amount assertion stays intact - add missing admin_override_cancel_tests snapshot files (untracked, would otherwise fail CI on a fresh checkout)
…e on-ledger footprint Rename the emergency-pause instance storage keys to shorter symbols: EmergencyPaused -> Ep (2 chars vs 16) EmergencyPauseLock -> EpLk (4 chars vs 19) Applied consistently across the milestone-escrow contract and the reports copy, and updated the affected test snapshots so the on-ledger symbol assertions match the shorter keys. This is an isolated, self-contained change (Closes Goldii-locks#323).
f6ce416 to
44ec225
Compare
|
CI build repaired. I rebased this branch onto the repaired base and it is now green:
Head is now |
Closes #323
What changed
Optimize the emergency-pause storage keys to reduce on-ledger footprint:
EmergencyPaused->Ep(2 chars vs 16, ~16 bytes saved per entry)EmergencyPauseLock->EpLk(4 chars vs 19, ~15 bytes saved per entry)milestone-escrowand thereportscopy, with the affected test snapshots updated to the new on-ledger symbols.CI / verification
Rebased this branch onto a repaired base that fixes the pre-existing main-wide test-profile breakage (test modules now under
#[cfg(test)],setup_funded_escrowexposed, missingadmin_override_cancel_testssnapshots added). The branch now contains two commits:fix: repair milestone-escrow CI build and tests(prerequisite, mirrored by PR feat(#321): guard emergency_pause_claim_refund on zero balance #430)fix(#323): optimize emergency-pause storage keys(this PR)Verified locally:
cargo test --manifest-path contracts/milestone-escrow/Cargo.toml→ 463 passed, 0 failed.The earlier stale note about the main tip not compiling no longer applies — this branch carries the fix.