try-runtime-cli: nudge users to use snapshots #14278
Description
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 withtry-runtime-cli create-snapshot <good arg suggestions>
INFO: 2. Next time you run this command, replacelive ws://<their-node-uri>
withsnap 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
Metadata
Metadata
Assignees
Labels
Type
Projects
Status