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

contracts: Fix incorrect storage alias in mirgration (#1687) #1703

Closed
wants to merge 1 commit into from

Conversation

pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Sep 25, 2023

Backporting a migration bug from #1687 to 1.1.0

# Description

We are recently trying to upgrade our Substrate version from
`polkadot-v0.9.43` to `polkadot-v1.0.0` and we noticed a critical issue:
all deployed contracts seem to be experiencing a `CodeNotFound` error.
After a thorough investigation, it appears that the root cause of this
issue lies in the mismatch between the storage alias of `CodeInfoOf<T>`
in the migration and its original definition.

This PR corrects the storage alias to align it with its original
definition

I am uncertain about the proper approach for adding tests to this
change. Would the team consider taking over this PR to bring it to
completion?

---------

Co-authored-by: pgherveou <pgherveou@gmail.com>
@pgherveou pgherveou added T7-smart_contracts This PR/Issue is related to smart contracts. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. I2-bug The node fails to follow expected behavior. labels Sep 25, 2023
@pgherveou pgherveou requested a review from a team September 27, 2023 12:04
@pgherveou
Copy link
Contributor Author

@kvinwang are you able to just use v1.2.0 branch that was cut after this bug fix?
If yes let's close this PR

@kvinwang
Copy link
Contributor

kvinwang commented Oct 9, 2023

@kvinwang are you able to just use v1.2.0 branch that was cut after this bug fix?
If yes let's close this PR

It's OK to me. However, that would mean v1.1.0 and v1.0.0 would be invalid for users running contracts.

@pgherveou
Copy link
Contributor Author

@kvinwang are you able to just use v1.2.0 branch that was cut after this bug fix?
If yes let's close this PR

It's OK to me. However, that would mean v1.1.0 and v1.0.0 would be invalid for users running contracts.

yes unless you start from this branch and don't need migration

@pgherveou pgherveou closed this Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. I2-bug The node fails to follow expected behavior. T7-smart_contracts This PR/Issue is related to smart contracts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants