Skip to content

Update upgrade_manager.rs#780

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
LELOUCH-Vii:Update-upgrade_manager.rs
Jun 29, 2026
Merged

Update upgrade_manager.rs#780
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
LELOUCH-Vii:Update-upgrade_manager.rs

Conversation

@LELOUCH-Vii

Copy link
Copy Markdown
Contributor

Closes #703

Dug into this one and wanted to be upfront about what I found.

The WASM hash chain verifier this issue asks for was already built in #619
and shipped in PR #754UpgradeRecord chaining, chain-aware rollback, and
an internal verify_upgrade_chain(env, depth) -> bool in UpgradeManager,
with solid test coverage (valid chains, broken chains, empty history).
#619 is closed and that work is real and correct.

What I found missing: verify_upgrade_chain was never wired into lib.rs
as a public contract entrypoint, unlike every other read-only upgrade query
(get_contract_version, check_upgrade_available, get_upgrade_history,
etc., all of which have a #[contractimpl] wrapper). That means no external
caller — auditor, indexer, frontend — could actually invoke it on a deployed
contract. It was only reachable from tests and from the internal call inside
rollback_upgrade.

That gap is what this PR closes: a public verify_upgrade_chain entrypoint
in lib.rs, plus tests that call it through the actual contract client
(PredictifyHybridClient) instead of the internal module path, to prove it's
reachable end-to-end.

PR: #619

Flagging the overlap with #619/#754 transparently rather than claiming this
as new work from scratch — the verification logic itself was already done;
this closes the "surfaced public" requirement that was specified but not
fully delivered.

@greatest0fallt1me greatest0fallt1me merged commit d278d13 into Predictify-org:master Jun 29, 2026
1 check failed
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.

Add WASM hash chain verifier prefix to UpgradeManager

2 participants