Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

try-runtime-cli: nudge users to use snapshots #14278

Closed
liamaharon opened this issue May 31, 2023 · 1 comment
Closed

try-runtime-cli: nudge users to use snapshots #14278

liamaharon opened this issue May 31, 2023 · 1 comment
Labels
T1-runtime This PR/Issue is related to the topic “runtime”. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@liamaharon
Copy link
Contributor

liamaharon commented May 31, 2023

Related #13975

The 'straight forward' way of getting commands like execute-block, on-runtime-upgrade, etc to work is using live ws://host-uri. However, it can be quite slow.

If a developer wants to run these commands repeatedly, it's much more efficient to run create-snapshot once to create a snapshot, and thereafter use the snapshot instead of fetching the live state each time. Snapshots load most of the time <1s.

Developers are sometimes not aware of the benefit of snapshots, I suggest nudge them with some logs when they use live. Something very roughly along the lines of:

INFO: If you are repeatedly running this command with the live option, you may benefit from using snapshots which have close to instantaneous load times.
INFO: 1. Create a snapshot with try-runtime-cli create-snapshot <good arg suggestions>
INFO: 2. Next time you run this command, replace live ws://<their-node-uri> with snap node-state.snapshot


          I was thinking when someone executes a command like `on-runtime-upgrade live ws://...`, they probably want to take a snapshot and from then on use `snap` instead of `live`. Not sure why the sync mode would matter, maybe I misunderstand?

_Originally posted by @liamaharon in paritytech/polkadot-sdk#174

@liamaharon liamaharon added U3-nice_to_have Issue is worth doing eventually. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder labels May 31, 2023
@liamaharon liamaharon moved this from Backlog to To Do in Runtime / FRAME May 31, 2023
@liamaharon liamaharon removed the U3-nice_to_have Issue is worth doing eventually. label Jun 5, 2023
@juangirini juangirini added the T1-runtime This PR/Issue is related to the topic “runtime”. label Jun 7, 2023
@liamaharon
Copy link
Contributor Author

Moved to paritytech/try-runtime-cli#13

@github-project-automation github-project-automation bot moved this from To Do to Done in Runtime / FRAME Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T1-runtime This PR/Issue is related to the topic “runtime”. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
Status: Done
Development

No branches or pull requests

2 participants