substrate icon indicating copy to clipboard operation
substrate copied to clipboard

[Feature] Add a migration that drains and refunds stored calls

Open ruseinov opened this issue 3 years ago • 5 comments

ruseinov avatar Sep 20 '22 14:09 ruseinov

git rebase

ruseinov avatar Sep 20 '22 14:09 ruseinov

bot rebase

ruseinov avatar Sep 20 '22 14:09 ruseinov

Branch is already up-to-date

@ggwpez recently mentioned that using try-runtime on-runtime-upgrade with --sync=warp is quite viable, perhaps that would help you.

kianenigma avatar Sep 20 '22 16:09 kianenigma

Looks broadly good, do you have any run outputs on kusama/polkadot? based on how many ongoing multisigs we have there, how big this migration is?

Not yet, will check with try-runtime precheck I guess.

ruseinov avatar Sep 21 '22 09:09 ruseinov

bot rebase

ruseinov avatar Sep 28 '22 09:09 ruseinov

Branch is already up-to-date

bot rebase

ruseinov avatar Sep 28 '22 09:09 ruseinov

Rebased

This needs to be tested with try-runtime to see if we need any sort of batching, but it seems like the latest substrate master is not compatible with polkadot, so I'm going to retry this in the coming days.

ruseinov avatar Sep 28 '22 10:09 ruseinov

bot rebase

ruseinov avatar Sep 29 '22 07:09 ruseinov

Rebased

@kianenigma @ggwpez tried that on a couple weeks old snap on pdot, seems like this migration with MaxWeight definitely works and even is an overkill:

2022-09-29 12:23:54.050  INFO main runtime::multisig: [11802239] ✍️ Number of calls to refund and delete: 4
2022-09-29 12:23:54.051 DEBUG main try-runtime::cli: proof size: 17.94 KB (18368 bytes)
2022-09-29 12:23:54.051 DEBUG main try-runtime::cli: compact proof size: 16.91 KB (17314 bytes)
2022-09-29 12:23:54.051 DEBUG main try-runtime::cli: zstd-compressed compact proof 15.69 KB (16069 bytes)
2022-09-29 12:23:54.575  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = 512021368576011, total weight = 512000000000011 (1.0000417355)

ruseinov avatar Sep 29 '22 10:09 ruseinov

Merging this, please continue reviewing this in the parent PR: https://github.com/paritytech/substrate/pull/12072

ruseinov avatar Sep 29 '22 14:09 ruseinov

im not a fan that this PR doesnt have a clear description, reasoning, follow up actions, and stuff...

do you assume everyone affected by this will just read code? or that code represents why things are happening?

shawntabrizi avatar Sep 29 '22 15:09 shawntabrizi