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

try-runtime Report Zero Weight Despite Successful Migration Execution #997

Open
sameh-farouk opened this issue Aug 23, 2024 · 6 comments
Open
Assignees
Labels
tfchain tfchain issue type_bug Something isn't working
Milestone

Comments

@sameh-farouk
Copy link
Member

sameh-farouk commented Aug 23, 2024

I'm currently testing a storage migration on my branch development-contracts-billing-refactor with try-runtime but encountered an issue where the weight returned by ʼExecutive::try_runtime_upgrade(checks).unwrap();ʼ is 0.

The migration logic itself seems to be working correctly, as logging within the migration function shows that the proper weight is being calculated and returned. However, when running try-runtime-cli, even though the migration logic is triggered, the reported runtime ref_time consumed is 0.

End of logs:

2024-08-21T23:30:31Z DEBUG wasm-heap] allocator dropped: AllocationStats { bytes_allocated: 56, bytes_allocated_peak: 696, bytes_allocated_sum: 336360, address_space_used: 1312 }
2024-08-21T23:30:31Z DEBUG try-runtime::cli] Proof: 0x5ed41e5e16056765bc84... / 1201 nodes
2024-08-21T23:30:31Z DEBUG try-runtime::cli] Encoded proof size: 147.0 KB
2024-08-21T23:30:31Z DEBUG try-runtime::cli] Compact proof size: 108.3 KB
2024-08-21T23:30:31Z INFO  try-runtime::cli] PoV size (zstd-compressed compact proof): 66.6 KB. For parachains, it's your responsibility to verify that a PoV of this size fits within any relaychain constraints.
2024-08-21T23:30:31Z INFO  try-runtime::cli] Consumed ref_time: 0s (0.00% of max 2s)
2024-08-21T23:30:31Z INFO  try-runtime::cli] ✅ No weight safety issues detected. Please note this does not guarantee a successful runtime upgrade. Always test your runtime upgrade with recent state, and ensure that the weight usage of your migrations will not drastically differ between testing and actual on-chain execution.

I tried to pass --checks=none and --checks=all to on-runtime-upgrade, but the result remains the same—0 weight is reported, even though the migration logic is executed always as expected.

@sameh-farouk
Copy link
Member Author

sameh-farouk commented Aug 23, 2024

I found that this issue is also reproducible in the development branch with any migration.
I also verified that it has been there since we upgraded to Polkadot v1.0.0.
It Seems the try-runtime is broken with that release.

@sameh-farouk
Copy link
Member Author

sameh-farouk commented Aug 23, 2024

@renauter brought good news that the migration issue is fixed in Polkadot v1.1.0.
He also pinpointed the related PR containing this bug fix paritytech/substrate#14793 from the v1.1.0 release notes.

He already has a draft pull request to upgrade to v1.1.0, so we will push it forward.

@sameh-farouk sameh-farouk added type_bug Something isn't working tfchain tfchain issue labels Aug 23, 2024
@sameh-farouk sameh-farouk moved this to Accepted in 3.15.x Aug 23, 2024
@sameh-farouk sameh-farouk added this to the 2.9.0 milestone Aug 23, 2024
@sameh-farouk sameh-farouk moved this from Accepted to In Progress in 3.15.x Aug 26, 2024
@sameh-farouk sameh-farouk moved this from In Progress to Pending Deployment in 3.15.x Aug 26, 2024
@renauter
Copy link
Collaborator

Indeed, #902 should fix this issue

@Mik-TF
Copy link

Mik-TF commented Sep 30, 2024

Can we close? As 902 is fixed? Thanks

@renauter
Copy link
Collaborator

renauter commented Sep 30, 2024

Generally every issue that needs to be checked by QA team after deployment, stays open, until they close it after validation.
This one is directly linked to #903.

@Mik-TF
Copy link

Mik-TF commented Oct 1, 2024

Ok! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tfchain tfchain issue type_bug Something isn't working
Projects
Status: In Verification
Development

No branches or pull requests

3 participants