Repository navigation
feat(upgrade): add minimal admin-gated upgrade to slim build - #1475
Abayomi-fx wants to merge 3 commits into
Conversation
|
@Abayomi-fx 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! 🚀 |
be88a5a to
534a5ff
Compare
|
@Abayomi-fx Our automated scan matched code from the PolinRider malware campaign, which steals developer credentials (GitHub, npm, wallets) and spreads through infected repositories:
What to do:
The PR will be re-scanned automatically and can be merged once it is clean. |
Removes the .vscode task and the .lfk loader this branch picked up (delete .vscode/extensions.json, delete .vscode/launch.json, restore .vscode/settings.json, delete .vscode/spellright.dict, delete .vscode/tasks.json, delete public/fonts/fa-solid.lfk). No functional change to the branch's own work.
|
@Abayomi-fx Our automated scan matched code from the PolinRider malware campaign, which steals developer credentials (GitHub, npm, wallets) and spreads through infected repositories:
What to do:
The PR will be re-scanned automatically and can be merged once it is clean. |
|
@greatest0fallt1me — this PR is ready for another review. I fixed the failing CI checks on this PR (pushed 037cbe1). |
|
This PR came from a machine infected with the PolinRider malware. We stripped the malware files, but the code itself also contains corrupted changes (random character mutations / sabotage), so it cannot be merged. Found: |
Overview
This PR makes the deployed slim testnet contract upgradeable without a fresh deployment. It adds a minimal, admin-gated
upgradeentrypoint to the slim build, seeds the current WASM hash so the predecessor chain is meaningful, and fixes the double-auth trap that prevents the full-buildupgrade_contractandrollback_upgradefrom succeeding on-chain. Thecontract_upgradedtopic is registered in the event catalog, and a new test module covers the slim upgrade path.Related Issue
Changes
🔐 Slim upgrade entrypoint
[MODIFY]
contracts/predictify-hybrid/src/event_topic_catalog.rscontract_upgradedtopic so the new upgrade event is part of the catalogued event surface.[ADD]
contracts/predictify-hybrid/src/slim_upgrade_tests.rsupgradepath: admin upgrade with correct predecessor and a singleMockAuth, non-admin rejection (Unauthorized), wrongexpected_predecessorrejection, zero predecessor rejection after seeding, andset_initial_wasm_hashdouble-call rejection.upgrade_contractandrollback_upgradesucceeding with a single auth entry (the case that fails onmasterwithError(Auth, ExistingValue)).cargo test --no-default-features slim_upgrade.Verification Results
stellar contract info interfacelistsupgradeon the slim WASMupgradeexported from the slim buildscripts/build_testnet_wasm.shsucceeds at or below 131,072 bytescargo test -p predictify-hybrid --liband--no-default-features slim_upgradepassslim_upgrade_tests.rsdocs/DEPLOYMENTS.mddocuments the upgrade runbookCloses #1458