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

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

Closed
@liamaharon

Description

@liamaharon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    T1-runtimeThis PR/Issue is related to the topic “runtime”.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coderZ6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions