Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract Upgrade #1449

Merged
merged 172 commits into from
Aug 3, 2023
Merged

Contract Upgrade #1449

merged 172 commits into from
Aug 3, 2023

Conversation

Cashmaney
Copy link
Member

Basic functionality of contract upgrades - this adds the functionality needed to do the code replacement. Does not support already-deployed contracts - we still need to figure this out eventually. Nor does it support any kind of different permissions for upgrade - the admin can just do whatever he wants

assafmo and others added 14 commits January 19, 2023 11:46
Also implement UpdateAdmin & ClearAdmin in keeper
# Conflicts:
#	cosmwasm/enclaves/shared/contract-engine/src/contract_validation.rs
#	x/compute/internal/keeper/keeper.go
#	x/compute/internal/types/keys.go
#	x/compute/internal/types/types.go
Up next: migrate contract key & update validation function on exec
Fixed proto files
Added validation for new contract key & proof
(...other tests kind of broken still, but hey, progress)
Added check for admin == sender in keeper
Added tests to check that storage can be read post-migration
Added test for trying to migrate with different address
@assafmo assafmo changed the title Contract Upgrade (without backwards compatability) Contract Upgrade Jun 5, 2023
@assafmo assafmo changed the title Contract Upgrade Contract Upgradability Jun 7, 2023
@assafmo assafmo changed the title Contract Upgradability Contract Upgrade Jun 12, 2023
assafmo and others added 9 commits August 2, 2023 20:54
For contracts that were deployed before v1.10 and have been migrated using the hardcoded admin feature. These contracts might have other contracts that call them with a wrong code_hash, because those other contracts have it stored from before the migration.
@assafmo assafmo dismissed eshelB’s stale review August 3, 2023 10:45

Fixed everything

@assafmo assafmo merged commit 7c46f98 into master Aug 3, 2023
14 checks passed
@assafmo assafmo deleted the contract-upgrade-v2 branch August 3, 2023 11:48
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.

3 participants