Skip to content

Implement own RemovePallet logic taking into account limit value#1441

Closed
dmitrylavrenov wants to merge 9 commits intomasterfrom
pallet-remove-partially
Closed

Implement own RemovePallet logic taking into account limit value#1441
dmitrylavrenov wants to merge 9 commits intomasterfrom
pallet-remove-partially

Conversation

@dmitrylavrenov
Copy link
Contributor

@dmitrylavrenov dmitrylavrenov commented Feb 18, 2025

Thanks @quasiyoke by noting that consumed weight is much higher than a total weight at #1433 (comment). The root cause comes from #1434.

Proposing to add RemovePallet based on [frame_support::migrations::RemovePallet], but doesn't focus just on removing all storage items per one runtime upgrade in one block. Additionally, it allows to use capabilities of clear_prefix with limit that can be used to partially delete a prefix storage in case it is too large to delete in one block.

try-runtime over current master with offences removal

2025-02-18 13:04:47.930  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (**10102150000000** ps, 0 byte), total weight = (**2000000000000** ps, 18446744073709551615 byte) (**505.11 %**, 0.00 %).    
Test succeeded

try-runtime over proposed code with offences removal

2025-02-18 16:01:30.514  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (**1250375000000** ps, 0 byte), total weight = (**2000000000000** ps, 18446744073709551615 byte) (**62.52 %**, 0.00 %).    
Test succeeded

@dmitrylavrenov dmitrylavrenov marked this pull request as ready for review February 18, 2025 16:03
@dmitrylavrenov dmitrylavrenov marked this pull request as draft February 18, 2025 16:37
@dmitrylavrenov
Copy link
Contributor Author

It's better to wait substrate deps update containing - https://github.com/paritytech/substrate/issues/13690 instead of doing it by ourself for now

@MOZGIII
Copy link
Contributor

MOZGIII commented Feb 19, 2025

Please create an issue for this

@dmitrylavrenov
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants